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) • 878 B
JavaScript
/**
* `concat`
*
* ---------------------------------------------------------------
*
* Concatenates the contents of multiple JavaScript and/or CSS files
* into two new files, each located at `concat/production.js` and
* `concat/production.css` respectively in `.tmp/public/concat`.
*
* This is used as an intermediate step to generate monolithic files
* that can then be passed in to `uglify` and/or `cssmin` for minification.
*
* For usage docs see:
* https://github.com/gruntjs/grunt-contrib-concat
*
*/
module.exports = function(grunt) {
grunt.config.set('concat', {
js: {
src: require('../pipeline').jsFilesToInject,
dest: '.tmp/public/concat/production.js'
},
css: {
src: require('../pipeline').cssFilesToInject,
dest: '.tmp/public/concat/production.css'
}
});
grunt.loadNpmTasks('grunt-contrib-concat');
};