gruntjs - How to copy a sub directory to a root directory using grunt-contrib-copy? -
my structure below. want copy assets folder app directory dist directory?
app assets imgs css fonts index.html dist
set current working directory app. select subdirs , files of assets. set destination dest.
grunt.initconfig({ copy: { dist: { cwd: 'app', src: ['assets/**/*'], dest: 'dist/', expand: true } } }); grunt.loadnpmtasks('grunt-contrib-copy'); grunt.registertask('default', ['copy:dist']);
Comments
Post a Comment