Friday 19 May 2017

Grunt Copy files but not delete them

i have a UI Project that grunts the files and copies to the dist folder. The problem is - the dist folder has some static js files on its own. (for eg library files )
So for eg : my UI folder has 1.js, 2.js My Dist file has 1.js, 2.js and also lib1.js, lib2.js.

When i run my run copy command, i am expecting to copy 1.js and 2.js and place it in my dist folder - which happens. But what it also does is- it deletes the other files and folders like lib1.js and lib2.js.

Anyway I can only "Overwrite" the files but not delete anything else?

I use the following :

     {
       expand: true,
       cwd: '<%= globalConfig.path.build %>/js/pages/',
       src: ['*.js'],
       dest: '<%= globalConfig.path.dist %>/js/pages/'
   }



via Night Monger

No comments:

Post a Comment