0

My structure is like below. I want to copy assets folder from app directory to dist directory?

app
   assets
      imgs
      css
      fonts
   index.html
dist
Tapas Jena
  • 1,069
  • 4
  • 14
  • 23

1 Answers1

1

Set the current working directory to app. Select all subdirs and files of assets. Set the destination to dest.

grunt.initConfig({
    copy: {
        dist: {
            cwd: 'app',
            src: ['assets/**/*'],
            dest: 'dist/',
            expand: true
        }
    }
});

grunt.loadNpmTasks('grunt-contrib-copy');
grunt.registerTask('default', ['copy:dist']);
Daniel Olszewski
  • 13,995
  • 6
  • 58
  • 65