ActivityPub-federated video streaming platform using P2P directly in your web browser
Add livereload for sass files
Chocobozzzaf82cae07dc5
diff --git a/Gruntfile.js b/Gruntfile.jsindex df7958c4f7..028a7773d3 100644--- a/Gruntfile.js+++ b/Gruntfile.js@@ -33,6 +33,12 @@ module.exports = function (grunt) {}}},+ concurrent: {+ options: {+ logConcurrentOutput: true+ },+ dev: [ 'watch:livereload', 'watch:sass', 'express:dev' ]+ },copy: {dev: {cwd: 'node_modules/bootstrap-sass/assets/',@@ -59,7 +65,7 @@ module.exports = function (grunt) {port: 9000,node_env: 'development',debug: true,- background: true+ background: false}}},@@ -71,57 +77,28 @@ module.exports = function (grunt) {}},watch: {- express: {- files: [ paths.main, paths.routes, paths.src ],- tasks: [ 'express:dev' ],- options: {- livereload: true,- spawn: false- }- },- dev: {+ livereload: {files: [ paths.jade, paths.css, paths.browserified ],+ tasks: [ ],options: {- livereload: true,- nospawn: false+ livereload: true}+ },+ sass: {+ files: [ paths.scss ],+ tasks: [ 'sass:dev' ]}}})- // Build client javascript and copy bootstrap dependencies- grunt.registerTask('build', [], function () {- grunt.loadNpmTasks('grunt-sass')- grunt.loadNpmTasks('grunt-browserify')- grunt.loadNpmTasks('grunt-contrib-copy')- grunt.loadNpmTasks('grunt-newer')+ // Load automatically all the tasks+ require('load-grunt-tasks')(grunt)- // TODO: SASS --> newer- grunt.task.run(- 'sass:dev',- 'newer:browserify:dev',- 'newer:copy:dev'- )- })+ // Build client javascript and copy bootstrap dependencies+ grunt.registerTask('build', [ 'sass:dev', 'newer:browserify:dev', 'newer:copy:dev' ])// Start in dev mode (reload front end files without refresh)- grunt.registerTask('dev', [], function () {- grunt.loadNpmTasks('grunt-sass')- grunt.loadNpmTasks('grunt-browserify')- grunt.loadNpmTasks('grunt-contrib-watch')- grunt.loadNpmTasks('grunt-express-server')- grunt.loadNpmTasks('grunt-contrib-copy')- grunt.loadNpmTasks('grunt-newer')-- // TODO: SASS --> newer- grunt.task.run(- 'sass:dev',- 'newer:browserify:dev',- 'newer:copy:dev',- 'express:dev',- 'watch'- )- })+ grunt.registerTask('dev', [ 'sass:dev', 'newer:browserify:dev', 'newer:copy:dev', 'concurrent:dev' ])// Clean buildgrunt.registerTask('clean', [], function () {diff --git a/package.json b/package.jsonindex 0cdd11afed..9b92e01526 100644--- a/package.json+++ b/package.json@@ -35,6 +35,7 @@"express-validator": "^2.11.0","grunt": "^0.4.5","grunt-browserify": "^4.0.1",+ "grunt-concurrent": "^2.1.0","grunt-contrib-clean": "^0.6.0","grunt-contrib-copy": "0.8.0","grunt-contrib-watch": "^0.6.1",@@ -44,6 +45,7 @@"jade": "^1.10.0","jquery": "^2.1.4","js-yaml": "^3.3.1",+ "load-grunt-tasks": "^3.3.0","mkdirp": "^0.5.1","mongoose": "^4.0.5","morgan": "^1.5.3",