mirror of
https://github.com/locomotivemtl/locomotive-boilerplate.git
synced 2026-01-15 00:55:08 +08:00
Add BrowserSync Grunt plugin and sync task
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
module.exports = function(grunt) {
|
||||
|
||||
|
||||
|
||||
function loadConfig(path) {
|
||||
var glob = require('glob');
|
||||
var object = {};
|
||||
@@ -27,6 +27,7 @@ module.exports = function(grunt) {
|
||||
|
||||
// Register tasks
|
||||
grunt.registerTask('default', ['watch', 'notify:watch']);
|
||||
grunt.registerTask('sync', ['browserSync', 'watch', 'notify:watch']);
|
||||
grunt.registerTask('build', [
|
||||
'concat',
|
||||
'sass',
|
||||
|
||||
17
www/modules/boilerplate/grunt_tasks/browserSync.js
Normal file
17
www/modules/boilerplate/grunt_tasks/browserSync.js
Normal file
@@ -0,0 +1,17 @@
|
||||
module.exports = {
|
||||
dev: {
|
||||
bsFiles: {
|
||||
src : [
|
||||
'assets/styles/dist/*.css'
|
||||
,'assets/scripts/dist/*.js'
|
||||
,'assets/templates/*.php'
|
||||
]
|
||||
},
|
||||
options: {
|
||||
proxy: "localhost",
|
||||
port: 3000,
|
||||
watchTask: true,
|
||||
notify: false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,7 @@
|
||||
"devDependencies": {
|
||||
"grunt": "0.0.0",
|
||||
"grunt-autoprefixer": "0.0.0",
|
||||
"grunt-browser-sync": "0.0.0",
|
||||
"grunt-contrib-concat": "0.0.0",
|
||||
"grunt-contrib-cssmin": "0.0.0",
|
||||
"grunt-contrib-uglify": "0.0.0",
|
||||
|
||||
Reference in New Issue
Block a user