From c2e5095b25dacd53d0532d5522dd55c69305042a Mon Sep 17 00:00:00 2001 From: Daniel Karlsson Date: Mon, 16 Mar 2015 10:23:27 +0100 Subject: [PATCH 1/3] [#1333] Made gulp print SASS errors when watching --- scripts/devhelpers/gulpfile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/devhelpers/gulpfile.js b/scripts/devhelpers/gulpfile.js index 92eb06bfc3..b3e9f79bba 100644 --- a/scripts/devhelpers/gulpfile.js +++ b/scripts/devhelpers/gulpfile.js @@ -20,7 +20,7 @@ gulp.task('jsx', function () { gulp.task('sass', function() { return gulp.src('../../akvo/rsr/static/rsr/v3/**/*.scss') - .pipe(sass()) + .pipe(sass({errLogToConsole: true})) .pipe(gulp.dest('../../akvo/rsr/static/rsr/v3')); }); From 76947aa10cc9d4ee807057b6f31242d5c55282e0 Mon Sep 17 00:00:00 2001 From: Daniel Karlsson Date: Mon, 16 Mar 2015 10:26:52 +0100 Subject: [PATCH 2/3] [#1333] Added copyright header to Gulpfile --- scripts/devhelpers/gulpfile.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/devhelpers/gulpfile.js b/scripts/devhelpers/gulpfile.js index b3e9f79bba..0a5cab9af9 100644 --- a/scripts/devhelpers/gulpfile.js +++ b/scripts/devhelpers/gulpfile.js @@ -1,3 +1,8 @@ +// Akvo RSR is covered by the GNU Affero General Public License. +// See more details in the license.txt file located at the root folder of the +// Akvo RSR module. For additional details on the GNU license please see +// < http://www.gnu.org/licenses/agpl.html >. + // Include Gulp var gulp = require('gulp'); From 22dc130dcba9ad4f25a115a0c87bc15589093b81 Mon Sep 17 00:00:00 2001 From: Daniel Karlsson Date: Mon, 16 Mar 2015 11:16:18 +0100 Subject: [PATCH 3/3] [#1333] Updated gulp deps + added plumber To prevent transpile errors to kill the watch process, added plumber that prints erros to std out. --- scripts/devhelpers/gulpfile.js | 23 ++++++++++++++--------- scripts/devhelpers/package.json | 33 +++++++++++++++++---------------- 2 files changed, 31 insertions(+), 25 deletions(-) diff --git a/scripts/devhelpers/gulpfile.js b/scripts/devhelpers/gulpfile.js index 0a5cab9af9..94412841b9 100644 --- a/scripts/devhelpers/gulpfile.js +++ b/scripts/devhelpers/gulpfile.js @@ -8,30 +8,35 @@ var gulp = require('gulp'); // Include Plugins var jshint = require('gulp-jshint'); +var plumber = require('gulp-plumber'); var react = require('gulp-react'); var sass = require('gulp-sass'); + gulp.task('lint', function() { - return gulp.src('../../akvo/rsr/static/rsr/v3/**/*.js') - .pipe(jshint()) - .pipe(jshint.reporter('default')); + return gulp.src('../../akvo/rsr/static/rsr/v3/**/*.js') + .pipe(plumber()) + .pipe(jshint()) + .pipe(jshint.reporter('default')); }); gulp.task('jsx', function () { - return gulp.src('../../akvo/rsr/static/rsr/v3/**/*.jsx') - .pipe(react()) - .pipe(gulp.dest('../../akvo/rsr/static/rsr/v3')); + return gulp.src('../../akvo/rsr/static/rsr/v3/**/*.jsx') + .pipe(plumber()) + .pipe(react()) + .pipe(gulp.dest('../../akvo/rsr/static/rsr/v3')); }); gulp.task('sass', function() { - return gulp.src('../../akvo/rsr/static/rsr/v3/**/*.scss') + return gulp.src('../../akvo/rsr/static/rsr/v3/**/*.scss') + .pipe(plumber()) .pipe(sass({errLogToConsole: true})) - .pipe(gulp.dest('../../akvo/rsr/static/rsr/v3')); + .pipe(gulp.dest('../../akvo/rsr/static/rsr/v3')); }); gulp.task('watch', function() { - gulp.watch('../../akvo/rsr/static/rsr/v3/js/**/*.jsx', ['jsx']); gulp.watch('../../akvo/rsr/static/rsr/v3/css/**/*.scss', ['sass']); + gulp.watch('../../akvo/rsr/static/rsr/v3/js/**/*.jsx', ['jsx']); }); // Default Task diff --git a/scripts/devhelpers/package.json b/scripts/devhelpers/package.json index bb940ff30d..9f45b27071 100644 --- a/scripts/devhelpers/package.json +++ b/scripts/devhelpers/package.json @@ -1,18 +1,19 @@ { - "name": "akvo-rsr-asset-pipeline", - "version": "0.0.1", - "description": "Asset pipeline for Akvo-rsr", - "main": "gulpfile.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "private": true, - "author": "Akvo foundation", - "license": "AGPL", - "devDependencies": { - "gulp": "^3.8.10", - "gulp-jshint": "^1.9.0", - "gulp-react": "^0.4.0", - "gulp-sass": "^1.1.0" - } + "name": "akvo-rsr-asset-pipeline", + "version": "0.0.2", + "description": "Asset pipeline for Akvo-rsr", + "main": "gulpfile.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "private": true, + "author": "Akvo foundation", + "license": "AGPL", + "devDependencies": { + "gulp": "^3.8.11", + "gulp-jshint": "^1.9.2", + "gulp-react": "^3.0.1", + "gulp-sass": "^1.3.3", + "gulp-plumber": "^1.0.0" + } }