Created
July 10, 2014 16:10
-
-
Save robertlyall/ec9ab5884cac4500787a to your computer and use it in GitHub Desktop.
Gulpfile
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 rename = require('gulp-rename'); | |
| var autoprefixer = require('gulp-autoprefixer'); | |
| var cssshrink = require('gulp-cssshrink'); | |
| var sass = require('gulp-ruby-sass'); | |
| var coffee = require('gulp-coffee'); | |
| var concat = require('gulp-concat'); | |
| var uglify = require('gulp-uglify'); | |
| var paths = { | |
| scripts: ['src/coffee/**/*.coffee'], | |
| stylesheets: ['src/scss/**/*.scss'] | |
| }; | |
| gulp.task('scripts', function() { | |
| return gulp.src(paths.scripts) | |
| .pipe(coffee()) | |
| .pipe(concat('peerless.min.js')) | |
| .pipe(gulp.dest('assets/js')); | |
| }); | |
| gulp.task('stylesheets', function() { | |
| return gulp.src(paths.stylesheets) | |
| .pipe(sass({ bundleExec: true, compass: true })) | |
| .pipe(autoprefixer('last 1 version', '> 1%', 'ie 8')) | |
| .pipe(gulp.dest('assets/css')) | |
| .pipe(rename({ suffix: '.min' })) | |
| .pipe(cssshrink()) | |
| .pipe(gulp.dest('assets/css')); | |
| }); | |
| gulp.task('watch', function() { | |
| gulp.watch(paths.scripts, ['scripts']); | |
| gulp.watch(paths.stylesheets, ['stylesheets']); | |
| }); | |
| gulp.task('default', ['scripts', 'stylesheets', 'watch']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment