Created
July 31, 2014 07:50
-
-
Save tanshio/cb4555d999aa0f927488 to your computer and use it in GitHub Desktop.
gulp20140731
This file contains 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
'use strict'; | |
var gulp = require('gulp'), | |
$ = require('gulp-load-plugins')(), | |
jade = require('gulp-jade'), | |
browserSync = require('browser-sync'), | |
reload = browserSync.reload, | |
runSequence = require('run-sequence'); | |
gulp.task('jade', function() { | |
var YOUR_LOCALS = {}; | |
return gulp.src('app/jade/*.jade') | |
.pipe($.plumber()) | |
.pipe(jade({ | |
locals: YOUR_LOCALS, | |
pretty: true | |
})) | |
.pipe(gulp.dest('dist')); | |
}); | |
//scss | |
gulp.task('scss', function () { | |
return gulp.src(['app/sass/*.scss']) | |
.pipe($.plumber()) | |
.pipe($.rubySass({ | |
style: 'expanded', | |
precision: 10, | |
loadPath: ['app/sass'] | |
})) | |
.pipe($.pleeease()) | |
.pipe(gulp.dest('dist/style')); | |
}); | |
//stylus | |
gulp.task('stylus', function () { | |
return gulp.src(['app/stylus/style.styl']) | |
.pipe($.plumber()) | |
.pipe($.stylus({compress: true})) | |
// .pipe($.pleeease()) | |
.pipe(gulp.dest('dist/style')); | |
}); | |
gulp.task('watch', function () { | |
browserSync.init(null, { | |
server: { | |
baseDir: ['dist'] | |
}, | |
notify: false | |
}); | |
gulp.watch('app/**/*.jade', reload); | |
gulp.watch('app/**/*.jade', ['jade']); | |
gulp.watch('app/**/*.scss', reload); | |
gulp.watch('app/**/*.scss', ['scss']); | |
gulp.watch('app/**/*.styl', reload); | |
gulp.watch('app/**/*.styl', ['stylus']); | |
}); |
This file contains 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
{ | |
"name": "jadetest", | |
"version": "0.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"author": "", | |
"license": "ISC", | |
"devDependencies": { | |
"browser-sync": "^1.3.0", | |
"gulp": "^3.8.6", | |
"gulp-jade": "^0.6.1", | |
"gulp-load-plugins": "^0.5.3", | |
"gulp-pleeease": "0.0.5", | |
"gulp-plumber": "^0.6.4", | |
"gulp-ruby-sass": "^0.5.0", | |
"gulp-stylus": "^1.1.0", | |
"gulp.spritesmith": "^1.1.1", | |
"run-sequence": "^0.3.6" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment