Skip to content

Commit

Permalink
Merge pull request #1337 from akvo/1333_gulp_errors
Browse files Browse the repository at this point in the history
[#1333] Gulp errors are not intuative
  • Loading branch information
KasperBrandt committed Mar 17, 2015
2 parents 1eb59c3 + 22dc130 commit d2be13a
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 26 deletions.
30 changes: 20 additions & 10 deletions scripts/devhelpers/gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,42 @@
// 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');

// 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')
.pipe(sass())
.pipe(gulp.dest('../../akvo/rsr/static/rsr/v3'));
return gulp.src('../../akvo/rsr/static/rsr/v3/**/*.scss')
.pipe(plumber())
.pipe(sass({errLogToConsole: true}))
.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
Expand Down
33 changes: 17 additions & 16 deletions scripts/devhelpers/package.json
Original file line number Diff line number Diff line change
@@ -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"
}
}

0 comments on commit d2be13a

Please sign in to comment.