UNPKG

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 (27 loc) 736 B
/** * `watch` * * --------------------------------------------------------------- * * Run predefined tasks whenever watched file patterns are added, changed or deleted. * * Watch for changes on: * - files in the `assets` folder * - the `tasks/pipeline.js` file * and re-run the appropriate tasks. * * For usage docs see: * https://github.com/gruntjs/grunt-contrib-watch * */ module.exports = function(grunt) { grunt.config.set('watch', { assets: { // Assets to watch: files: ['assets/**/*', 'tasks/pipeline.js', '!**/node_modules/**'], // When assets are changed: tasks: ['syncAssets' <%- linker ? ", 'linkAssets'" : '' %> ] } }); grunt.loadNpmTasks('grunt-contrib-watch'); };