mirror of
https://github.com/locomotivemtl/locomotive-boilerplate.git
synced 2026-01-15 00:55:08 +08:00
Improving Browserify speeds
This commit is contained in:
@@ -26,7 +26,7 @@ module.exports = function(grunt) {
|
||||
|
||||
// Register tasks
|
||||
grunt.registerTask('default', ['build']);
|
||||
grunt.registerTask('sync', ['browserSync', 'watch', 'notify:watch']);
|
||||
grunt.registerTask('sync', ['browserSync', 'browserify:dev', 'watch', 'notify:watch']);
|
||||
grunt.registerTask('build', [
|
||||
// CSS
|
||||
'sass',
|
||||
@@ -41,7 +41,7 @@ module.exports = function(grunt) {
|
||||
// Notify
|
||||
'notify:build'
|
||||
]);
|
||||
grunt.registerTask('w', ['watch', 'notify:watch']);
|
||||
grunt.registerTask('w', ['browserify:dev', 'watch', 'notify:watch']);
|
||||
grunt.registerTask('c', [
|
||||
'csscomb'
|
||||
]);
|
||||
|
||||
@@ -2,8 +2,10 @@ module.exports = {
|
||||
dev: {
|
||||
options: {
|
||||
transform: [['babelify', { presets: ['es2015'] }]],
|
||||
browserifyOptions: { debug: true },
|
||||
exclude: ''
|
||||
watch : true, // use watchify for incremental builds!
|
||||
browserifyOptions : {
|
||||
debug : true // source mapping
|
||||
}
|
||||
},
|
||||
files: {
|
||||
'www/assets/scripts/app.js': [
|
||||
|
||||
@@ -1,11 +1,4 @@
|
||||
module.exports = {
|
||||
javascript_app: {
|
||||
files: [
|
||||
'assets/scripts/**/*.js',
|
||||
'!assets/scripts/vendors/*.js'
|
||||
],
|
||||
tasks: ['browserify:dev', 'notify:javascript']
|
||||
},
|
||||
javascript_vendors: {
|
||||
files: [
|
||||
'assets/scripts/vendors/*.js'
|
||||
|
||||
Reference in New Issue
Block a user