Skip to content

Instantly share code, notes, and snippets.

@5iDS
Created January 20, 2014 00:33
Show Gist options
  • Select an option

  • Save 5iDS/8512957 to your computer and use it in GitHub Desktop.

Select an option

Save 5iDS/8512957 to your computer and use it in GitHub Desktop.
var gulp = require('gulp'),
gutil = require('gulp-util'),
sass = require('gulp-sass'),
csso = require('gulp-csso'),
uglify = require('gulp-uglify'),
concat = require('gulp-concat');
gulp.task('css', function () {
gulp.src('./_includes/css/*.scss')
.pipe(sass({includePaths: ['_includes/css']}))
.pipe(csso())
.pipe(gulp.dest('./assets/css'));
});
gulp.task('js', function () {
gulp.src('./_includes/js/*.js')
.pipe(uglify())
.pipe(concat('all.js'))
.pipe(gulp.dest('./assets/js'));
});
gulp.task('default', function () {
gulp.run('css', 'js');
gulp.watch('./_includes/css/*', function () {
gulp.run('css');
});
gulp.watch('./_includes/js/*', function () {
gulp.run('js');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment