Skip to content

Instantly share code, notes, and snippets.

@mockra
Created February 3, 2014 22:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mockra/8794154 to your computer and use it in GitHub Desktop.
Save mockra/8794154 to your computer and use it in GitHub Desktop.
var gulp = require('gulp');
var concat = require('gulp-concat');
var stylus = require('gulp-stylus');
gulp.task('styles', function() {
gulp.src('./bower_components/bootstrap/dist/css/bootstrap.css')
.pipe(concat('vendor.css'))
.pipe(gulp.dest('./public'))
gulp.src('./assets/**/*.styl')
.pipe(stylus())
.pipe(concat('app.css'))
.pipe(gulp.dest('./public'))
})
gulp.task('scripts', function() {
gulp.src('./assets/**/*.js')
.pipe(concat('app.js'))
.pipe(gulp.dest('build'))
})
gulp.task('default', function(){
gulp.run('scripts', 'styles');
gulp.watch('./assets/js/**', function(event) {
gulp.run('scripts');
})
gulp.watch('./assets/css/**', function(event) {
gulp.run('styles');
})
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment