1
0
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:
dominiclord
2015-12-08 12:35:32 -05:00
parent 581da4d658
commit 39d10692b3
17 changed files with 271 additions and 166 deletions

View File

@@ -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'