Skip to content

Instantly share code, notes, and snippets.

@DamnedScholar
Created May 16, 2016 05:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DamnedScholar/f923d3be960dfa1966263f95bacbed2c to your computer and use it in GitHub Desktop.
Save DamnedScholar/f923d3be960dfa1966263f95bacbed2c to your computer and use it in GitHub Desktop.
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