mirror of
https://github.com/locomotivemtl/locomotive-boilerplate.git
synced 2026-01-15 00:55:08 +08:00
Proceeding with ES6 modules (with the help of Browserify)
- Added necessary grunt tasks and npm packages - Concept of Global functions to be revised
This commit is contained in:
16
Gruntfile.js
16
Gruntfile.js
@@ -17,6 +17,7 @@ module.exports = function(grunt) {
|
||||
var config = {
|
||||
pkg: grunt.file.readJSON('package.json')
|
||||
}
|
||||
|
||||
grunt.loadTasks('grunt_tasks');
|
||||
grunt.util._.extend(config, loadConfig('./grunt_tasks/'));
|
||||
grunt.initConfig(config);
|
||||
@@ -24,20 +25,21 @@ module.exports = function(grunt) {
|
||||
// Load tasks
|
||||
require('load-grunt-tasks')(grunt);
|
||||
|
||||
|
||||
// Register tasks
|
||||
grunt.registerTask('default', ['watch', 'notify:watch']);
|
||||
grunt.registerTask('sync', ['browserSync', 'watch', 'notify:watch']);
|
||||
grunt.registerTask('build', [
|
||||
'concat',
|
||||
// CSS
|
||||
'sass',
|
||||
'svgstore',
|
||||
'postcss',
|
||||
'babel',
|
||||
'uglify',
|
||||
'cssmin',
|
||||
'svgmin',
|
||||
'imagemin'
|
||||
// JS
|
||||
'browserify:prod',
|
||||
'eslint',
|
||||
'uglify',
|
||||
// SVG
|
||||
'svgstore',
|
||||
'svgmin'
|
||||
]);
|
||||
grunt.registerTask('c', [
|
||||
'csscomb'
|
||||
|
||||
Reference in New Issue
Block a user