2015-03-31 17:54:00 +02:00
|
|
|
var gulp = require('gulp')
|
|
|
|
var minifyCSS = require('gulp-minify-css')
|
2015-03-31 17:34:14 +02:00
|
|
|
var coffee = require('gulp-coffee')
|
2015-03-31 17:54:00 +02:00
|
|
|
var uglify = require('gulp-uglify')
|
|
|
|
var clean = require('gulp-clean')
|
2015-03-31 17:34:14 +02:00
|
|
|
|
|
|
|
gulp.task('css',function(){
|
|
|
|
return gulp.src('src/*.css')
|
2015-03-31 17:54:00 +02:00
|
|
|
.pipe(minifyCSS())
|
|
|
|
.pipe(gulp.dest('dist/'))
|
2015-03-31 17:34:14 +02:00
|
|
|
})
|
2015-03-31 17:54:00 +02:00
|
|
|
|
2015-03-31 17:34:14 +02:00
|
|
|
gulp.task('coffee',function(){
|
|
|
|
return gulp.src('src/*.coffee')
|
2015-03-31 17:54:00 +02:00
|
|
|
.pipe(coffee({ bare: true }))
|
|
|
|
.pipe(uglify())
|
|
|
|
.pipe(gulp.dest('dist/'))
|
2015-03-31 17:34:14 +02:00
|
|
|
})
|
|
|
|
|
2015-03-31 17:54:00 +02:00
|
|
|
gulp.task('clean',function(){
|
|
|
|
return gulp.src('dist/*').pipe(clean())
|
|
|
|
})
|
2015-03-31 17:34:14 +02:00
|
|
|
|
|
|
|
gulp.task('watch',function(){
|
|
|
|
gulp.watch('src/*.coffee',['coffee'])
|
2015-03-31 17:54:00 +02:00
|
|
|
gulp.watch('src/*.css',['css'])
|
2015-03-31 17:34:14 +02:00
|
|
|
})
|
2015-03-31 17:54:00 +02:00
|
|
|
gulp.task('default',['css','coffee'])
|