Created
April 25, 2015 05:44
-
-
Save MSakamaki/42584a8f8f63503c678b to your computer and use it in GitHub Desktop.
grunt injector
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
injector: { | |
options: { | |
// Task-specific options go here. | |
}, | |
scripts: { | |
options: { | |
transform: function(filePath) { | |
filePath = filePath.replace('/app/', ''); | |
filePath = filePath.replace('/.tmp/', ''); | |
return '<script src="' + filePath + '"></script>'; | |
}, | |
starttag: '<!-- injector:js -->', | |
endtag: '<!-- endinjector -->' | |
}, | |
files: { | |
'app/index.html': [ | |
['<%= config.app %>/{scripts,components}/**/*.js', | |
'!<%= config.app %>/scripts/main.js'] | |
] | |
} | |
} | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment