Skip to content

Commit

Permalink
Clean up tab spacing and variable declaration.
Browse files Browse the repository at this point in the history
  • Loading branch information
colindresj committed Mar 31, 2014
1 parent 5bbeaa3 commit e0e4f17
Showing 1 changed file with 47 additions and 48 deletions.
95 changes: 47 additions & 48 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,20 @@
// Load plugins

var gulp = require('gulp'),
gutil = require('gulp-util'),
watch = require('gulp-watch'),
lr = require('tiny-lr'),
server = lr(),
livereload = require('gulp-livereload'),
prefix = require('gulp-autoprefixer'),
minifyCSS = require('gulp-minify-css'),
sass = require('gulp-ruby-sass'),
less = require('gulp-less'),
stylus = require('gulp-stylus'),
csslint = require('gulp-csslint'),
concat = require('gulp-concat'),
uglify = require('gulp-uglify'),
preProcessor = 'sass',
preProcessorExtensions = {
'sass': '.scss',
'less': '.less',
'stylus': '.stylus'
};
var gulp = require('gulp'),
gutil = require('gulp-util'),
watch = require('gulp-watch'),
lr = require('tiny-lr'),
server = lr(),
livereload = require('gulp-livereload'),
prefix = require('gulp-autoprefixer'),
minifyCSS = require('gulp-minify-css'),
sass = require('gulp-ruby-sass'),
less = require('gulp-less'),
stylus = require('gulp-stylus'),
csslint = require('gulp-csslint'),
concat = require('gulp-concat'),
uglify = require('gulp-uglify'),
preProcessor = 'sass';


// Task to minify all css files in the css directory
Expand All @@ -44,51 +39,50 @@ gulp.task('minify-js', function() {

gulp.task('csslint', function(){
gulp.src('./css/*.css')
.pipe(csslint({
'compatible-vendor-prefixes': false,
'box-sizing': false,
'important': false,
'known-properties': false
}))
.pipe(csslint.reporter());

.pipe(csslint({
'compatible-vendor-prefixes': false,
'box-sizing': false,
'important': false,
'known-properties': false
}))
.pipe(csslint.reporter());
});


// Task that compiles scss files down to good old css

gulp.task('sass', function(){
gulp.src('./sass/*.scss')
.pipe(watch(function(files) {
return files.pipe(sass({loadPath: ['./sass/'], style: "compact"}))
.pipe(prefix())
.pipe(gulp.dest('./css/'))
.pipe(livereload(server));
}));
.pipe(watch(function(files) {
return files.pipe(sass({loadPath: ['./sass/'], style: "compact"}))
.pipe(prefix())
.pipe(gulp.dest('./css/'))
.pipe(livereload(server));
}));
});

// Task that compiles less files down to good old css

gulp.task('less', function () {
gulp.src('./less/*.less')
.pipe(watch(function(files) {
return files.pipe(less())
.pipe(prefix())
.pipe(gulp.dest('./css/'))
.pipe(livereload(server));
}));
gulp.src('./less/*.less')
.pipe(watch(function(files) {
return files.pipe(less())
.pipe(prefix())
.pipe(gulp.dest('./css/'))
.pipe(livereload(server));
}));
});

// Task that compiles stylus files down to good old css

gulp.task('stylus', function () {
gulp.src('./stylus/*.styl')
.pipe(watch(function(files) {
return files.pipe(stylus())
.pipe(prefix())
.pipe(gulp.dest('./css/'))
.pipe(livereload(server));
}));
gulp.src('./stylus/*.styl')
.pipe(watch(function(files) {
return files.pipe(stylus())
.pipe(prefix())
.pipe(gulp.dest('./css/'))
.pipe(livereload(server));
}));
});


Expand All @@ -104,6 +98,11 @@ gulp.task('stylus', function () {
*/

gulp.task('default', function(){
var preProcessorExtensions = {
'sass': '.scss',
'less': '.less',
'stylus': '.stylus'
};
gulp.run(preProcessor, 'csslint');
server.listen(35729, function (err) {
gulp.watch(['*.html', './' + preProcessor + '/*' + preProcessorExtensions[preProcessor]], function(event) {
Expand Down

0 comments on commit e0e4f17

Please sign in to comment.