Created
May 16, 2016 05:42
-
-
Save DamnedScholar/f923d3be960dfa1966263f95bacbed2c 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 watch = require('gulp-watch'); | |
var shell = require('gulp-shell') | |
var stylus = require('gulp-stylus'); | |
var paths = { | |
'src':['./models/**/*.js','./routes/**/*.js', 'keystone.js', 'package.json'] | |
, | |
'style': { | |
main: './public/styles/site.styl', | |
all: './public/styles/**/*.styl', | |
output: './public/styles/' | |
} | |
}; | |
gulp.task('watch:stylus', function () { | |
gulp.watch(paths.style.all, ['stylus']); | |
}); | |
gulp.task('stylus', function () { | |
gulp.src(paths.style.main) | |
.pipe(stylus()) | |
.pipe(gulp.dest(paths.style.output)); | |
}); | |
gulp.task('runKeystone', shell.task('node keystone.js')); | |
gulp.task('watch', [ | |
'watch:stylus', | |
'watch:lint' | |
]); | |
gulp.task('default', ['watch', 'runKeystone']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment