forked from kalebheitzman/grav-plugin-events
-
Notifications
You must be signed in to change notification settings - Fork 11
/
gulpfile.js
42 lines (37 loc) · 1.15 KB
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
'use strict';
var gulp = require('gulp');
var gutil = require('gulp-util');
var sass = require('gulp-sass');
var plumber = require('gulp-plumber')
var coffee = require('gulp-coffee');
var concat = require('gulp-concat');
var sourcemaps = require('gulp-sourcemaps');
var uglify = require('gulp-uglify');
var minifyCSS = require('gulp-minify-css');
var autoprefixer = require('gulp-autoprefixer');
var rename = require('gulp-rename');
gulp.task('sass', function() {
return gulp.src('scss/**/*.scss')
.pipe(sourcemaps.init())
.pipe(plumber())
.pipe(sass())
.pipe(minifyCSS())
.pipe(concat('events.min.css'))
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('./assets'));
});
gulp.task('coffee', function() {
return gulp.src(['coffee/*.coffee','coffee/**/*.coffee','crafted/src/coffee/**/*.coffee'])
.pipe(sourcemaps.init())
.pipe(plumber())
.pipe(coffee())
.pipe(uglify())
.pipe(concat('events.min.js'))
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('./assets'));
})
gulp.task('watch', function() {
gulp.watch('scss/**/*.scss', ['sass']);
gulp.watch('coffee/**/*.coffee', ['coffee'])
});
gulp.task('default', ['watch']);