gruntjs - Adding a task with in a task in a gruntfile -


i have gruntfile below:

       concat: {         options: {             banner: '<%= banner %>',             stripbanners: true         },         one: {             src: ['src/**/*.js'],             dest: 'dist/<%= pkg.name %>_ac.js'         },          two: {             src: ['/types/**/*.js'],             dest: 'dist/<%= pkg.name %>_lib.js'         },          all: {         }     },.....  , on 

now if register task like: grunt.registertask('basic', ['concat:all']);

i want both 1 , 2 run. how shall add option in

     all: {           // need add here include 1 , 2 both?      } 

no need add target if you're registering task point 2 targets. do:

grunt.registertask('basic', ['concat:one', 'concat:two']); 

otherwise if you're intending on concatenating files 1 , 2 do:

grunt.initconfig({   concat: {     one: {       src: ['src/**/*.js'],       dest: 'dist/<%= pkg.name %>_ac.js'     },     two: {       src: ['/types/**/*.js'],       dest: 'dist/<%= pkg.name %>_lib.js'     },     all: {       src: ['<%= concat.one.src %>', '<%= concat.two.src %>'],       dest: 'dist/<%= pkg.name %>_all.js'     }   } }); 

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -