gruntjs - Grunt Usemin: How to define targets? -
i wondering how can use "targets" grunt usemin.
e.g. run sth. like: grunt usemin:app
this tried (error: warning: object # has no method 'indexof' use --force continue.) – same useminprepare
usemin: { app : { html: ['<%= config.app.dist %>/app/{,*/}*.html'], css: ['<%= config.app.dist %>/app/css/{,*/}*.css'], options: { dirs: ['<%= config.app.dist %>/app'] } }, site: { html: ['<%= config.site.dist %>/{,*/}*.html'], css: ['<%= config.site.dist %>/css/{,*/}*.css'], options: { dirs: ['<%= config.site.dist %>'] } } },
in grunt usemin targets defined in html page not in gruntfile.
<!-- build:js scripts/vendor.js --> <script src="bower_components/jquery/jquery.js"></script> <script src="bower_components/underscore/underscore.js"></script> <script src="bower_components/backbone/backbone.js"></script> <script src="bower_components/backbone.localstorage/backbone.localstorage-min.js"></script> <!-- endbuild -->
here scripts/vendor.js
target.
source : https://github.com/yeoman/grunt-usemin#the-useminprepare-task
Comments
Post a Comment