gruntjs - Running multiple Grunt tasks of the same task type -
i need able run multiple tasks of same type of task within grunt (grunt-contrib-concat). i've tried couple of things below neither work. ideas on how appreciated.
concat: { dist: { src: [ 'js/foo1/bar1.js', 'js/foo1/bar2.js' ], dest: 'js/foo1.js', src: [ 'js/foo2/bar1.js', 'js/foo2/bar2.js' ], dest: 'js/foo2.js' } }
and..
concat: { dist: { src: [ 'js/foo1/bar1.js', 'js/foo1/bar2.js' ], dest: 'js/foo1.js' } }, concat: { dist: { src: [ 'js/foo2/bar1.js', 'js/foo2/bar2.js' ], dest: 'js/foo2.js' } }
and..
concat: { dist: { src: [ 'js/foo1/bar1.js', 'js/foo1/bar2.js' ], dest: 'js/foo1.js' }, dist: { src: [ 'js/foo2/bar1.js', 'js/foo2/bar2.js' ], dest: 'js/foo2.js' } }
first define 2 targets task:
concat: { dist1: { src: [ 'js/foo1/bar1.js', 'js/foo1/bar2.js' ], dest: 'js/foo1.js' }, dist2: { src: [ 'js/foo2/bar1.js', 'js/foo2/bar2.js' ], dest: 'js/foo2.js' } }
register new task runs both:
grunt.registertask('dist', ['concat:dist1', 'concat:dist2']);
then run using
grunt dist
Comments
Post a Comment