Skip to content

Instantly share code, notes, and snippets.

@exdeniz
Created January 11, 2014 22:34
Show Gist options
  • Save exdeniz/8377901 to your computer and use it in GitHub Desktop.
Save exdeniz/8377901 to your computer and use it in GitHub Desktop.
gulp simple config
var lr = require('tiny-lr'),
gulp = require('gulp'),
stylus = require('gulp-stylus'),
livereload = require('gulp-livereload'),
prefix = require('gulp-autoprefixer'),
csslint = require('gulp-csslint'),
myth = require('gulp-myth'),
server = lr();
gulp.task('stylus', function () {
gulp.src('static/css/stylus/screen.stylus')
.pipe(stylus())
.pipe(myth())
.pipe(gulp.dest('static/css/'))
.pipe(livereload(server));
});
gulp.task('haml', function () {
gulp.src('static/css/stylus/screen.stylus')
.pipe(livereload(server));
});
gulp.task('watch', function () {
server.listen(35729, function (err) {
if (err) return console.log(err);
gulp.watch('static/bem/**/*.styl', function () {
gulp.run('stylus');
});
gulp.watch('templates/html/**/*.haml', function () {
gulp.run('haml');
});
});
});
{
"name": "merz",
"version": "0.0.1",
"devDependencies": {
"tiny-lr": "0.0.5",
"gulp": "~3.3.1",
"gulp-csslint": "~0.1.3",
"gulp-myth-css": "~0.1.0",
"gulp-myth": "~0.1.0",
"gulp-livereload": "~0.2.0",
"gulp-autoprefixer": "0.0.3",
"gulp-coffee": "~1.2.5",
"gulp-stylus": "0.0.7"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment