Created
February 5, 2014 16:05
-
-
Save mbriggs/8826954 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var gulp = require('gulp'); | |
| var gutil = require('gulp-util'); | |
| var sass = require('gulp-ruby-sass'); | |
| var watch = require('gulp-watch'); | |
| var plumber = require('gulp-plumber'); | |
| var traceur = require('gulp-traceur'); | |
| var jshint = require('gulp-jshint'); | |
| var stylish = require('jshint-stylish'); | |
| var notify = require('gulp-notify'); | |
| gulp.task('default', ['sass', 'foundation', 'js']); | |
| gulp.task('js', function(){ | |
| gulp.src('client/app/**/*.js'). | |
| pipe(watch()). | |
| pipe(plumber()). | |
| pipe(jshint('.jshintrc')). | |
| pipe(jshint.reporter(stylish)). | |
| pipe(notify(function(file){ | |
| var message = ""; | |
| if(file.jshint.results){ | |
| file.jshint.results.forEach(function(err){ | |
| var path = err.file.replace(process.cwd() + '/'); | |
| message += err.error.reason + " - " + path; | |
| }); | |
| return message; | |
| } | |
| })). | |
| pipe(traceur({ sourceMap: true })). | |
| pipe(gulp.dest('client/js')). | |
| on("error", notify.onError()); | |
| }); | |
| /// styling | |
| gulp.task('sass', function(){ | |
| gulp.src('client/style/**/*.sass'). | |
| pipe(watch()). | |
| pipe(plumber()). | |
| pipe(sass({ lineNumbers: true })). | |
| pipe(gulp.dest('client/css')). | |
| on("error", notify.onError()); | |
| }); | |
| gulp.task('foundation', ['foundation:build'], function(){ | |
| gulp.watch('client/foundation/**/*.s[ac]ss', ['foundation:build']); | |
| }); | |
| gulp.task('foundation:build', function(){ | |
| gulp.src('client/foundation/foundation.sass'). | |
| pipe(sass({ lineNumbers: true })). | |
| pipe(gulp.dest('client/css/foundation')). | |
| on("error", notify.onError()); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment