sails-generate-frontend
Version:
Default generator for frontend code files in new Sails projects. Creates the default contents of the `assets/` folder when you run `sails new` on the command-line. Also creates a subset of the boilerplate Grunt task files (in `tasks/`); specifically, the
32 lines (29 loc) • 776 B
JavaScript
/**
* `sync`
*
* ---------------------------------------------------------------
*
* Synchronize files from the `assets` folder to `.tmp/public`,
* smashing anything that's already there.
*
* This task synchronizes one directory with another (like rsync).
* In the default Sails asset pipeline, it plays very similar role
* to `grunt-contrib-copy`, but copies only those files that have
* actually changed since the last time the task was run.
*
* For usage docs see:
* https://github.com/tomusdrw/grunt-sync
*
*/
module.exports = function(grunt) {
grunt.config.set('sync', {
dev: {
files: [{
cwd: './assets',
src: ['**/*.!(coffee|less)'],
dest: '.tmp/public'
}]
}
});
grunt.loadNpmTasks('grunt-sync');
};