Skip to content
This repository has been archived by the owner on Aug 5, 2020. It is now read-only.
/ grunt-sync Public archive
forked from tomusdrw/grunt-sync

Grunt.js task providing one-way synchronization of directories. Instead of copying all files only those that has been changed are copied which actually results in much faster execution.

License

Notifications You must be signed in to change notification settings

mobify/grunt-sync

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Grunt-sync

A grunt task to keep directories in sync. It is very similar to grunt-contrib-copy but tries to copy only those files that has actually changed.

Usage

npm install grunt-sync --save

Within your grunt file:

  grunt.initConfig({

    sync: {
      main: {
        files: [{
          cwd: 'src',
          src: [
            '**', /* Include everything */
            '!**/*.txt' /* but exclude txt files */
          ],
          dest: 'bin',
        }],
        verbose: true // Display log messages when copying files
      }
    }

  });

  grunt.loadNpmTasks('grunt-sync');
  grunt.registerTask('default', 'sync');

More examples

sync: {
  main: {
    files: [
      {src: ['path/**'], dest: 'dest/'}, // includes files in path and its subdirs
      {cwd: 'path/', src: ['**/*.js', '**/*.css'], dest: 'dest/'}, // makes all src relative to cwd
    ],
    verbose: true
  }
}

TODO

Task does not remove any files and directories in dest that are no longer in src.

About

Grunt.js task providing one-way synchronization of directories. Instead of copying all files only those that has been changed are copied which actually results in much faster execution.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published