Is it possible to get grunt-usemin to only make html changes? -
i involved in project using require js. in gruntfile using requirejs produce single optimised js file. want create single css file go , want utilize grunt-usemin this.
my problem usemin doesn't seem want transform javascript import statements in index.html without attemting transform javascript well.
<script src="bower_components/requirejs/require.js" data-main="app/main.js"></script>
i desperately want usemin alter to:
<script src="main.js"></script>
,but not create changes javascript. possible? right useminprepare stop @ script import error "require.js blocks no more supported."
i tried configuring 'empty' flow useminprepare ('flow': {'html': {'steps': {'js': []}}}) sadly didn't work.
if these tasks impossible combine usemin, suggestions other grunt plugins utilize instead (or in addition) appreciated.
i decided avoid problems usemin , started using grunt-regex-replace alter script import.
gruntfile.coffee:
'regex-replace': html: src: ['<%= settings.tempdirectory %>/index.html'] actions:[ search: '<script src="bower_components/requirejs/require.js" data-main="app/main"></script>' replace: '<script src="main"></script>' ]
grunt-usemin
No comments:
Post a Comment