Created
March 12, 2015 23:05
-
-
Save jhonnymoreira/525b007116889002fba6 to your computer and use it in GitHub Desktop.
Gulp with Stylus, Kouto Swiss, Jeet and BrowserSync
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 stylus = require('gulp-stylus'); | |
var browserSync = require('browser-sync'); | |
var koutoSwiss = require('kouto-swiss'); | |
var jeet = require('jeet'); | |
var reload = browserSync.reload; | |
var paths = { | |
stylusEntry: ["./stylus/main.styl"], | |
stylusAll: ["./stylus/*.styl"] | |
}; | |
gulp.task('stylus', function() { | |
gulp.src(paths.stylusEntry) | |
.pipe(stylus({ | |
use: [koutoSwiss(), jeet()] | |
})) | |
.pipe(gulp.dest('./assets/stylesheets/')) | |
.pipe(reload({ stream: true })); | |
}); | |
gulp.task('watch', function() { | |
gulp.watch("./index.html", reload); | |
gulp.watch(paths.stylusAll, ['stylus']); | |
}); | |
gulp.task('browser-sync', function() { | |
browserSync({ | |
server: { baseDir: "./" }, | |
port: 1337, | |
ui: { port: 1338 }, | |
browser: "Google Chrome Canary" | |
}); | |
}); | |
gulp.task('default', ['watch', 'browser-sync']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment