Advertisement
Guest User

Untitled

a guest
Jan 28th, 2015
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. var gulp = require('gulp')
  2. , jade = require('gulp-jade')
  3. , stylus = require('gulp-stylus')
  4. , livereload = require('gulp-livereload')
  5. , autoprefixer = require('autoprefixer-stylus');
  6.  
  7. gulp.task('templates', function() {
  8. return gulp.src('./index.jade')
  9. .pipe(jade({
  10. pretty: true
  11. }))
  12. .pipe(gulp.dest('./'))
  13. .pipe(livereload());
  14. });
  15.  
  16. gulp.task('stylus', function () {
  17. gulp.src('./styles/stylus/app.styl')
  18. .pipe(stylus({
  19. use: [autoprefixer('iOS >= 7', 'last 1 Chrome version')]
  20. }))
  21. .pipe(gulp.dest('./styles/css'))
  22. .pipe(livereload());
  23. });
  24.  
  25. gulp.task('watch', function () {
  26. livereload.listen();
  27.  
  28. gulp.watch('./*.jade',['templates']);
  29. gulp.watch('./styles/stylus/**/*.styl',['stylus']);
  30.  
  31. });
  32.  
  33. // Default Task
  34. gulp.task('default', ['templates', 'stylus', 'watch']);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement