-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgulpfile.js
45 lines (40 loc) · 1.27 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
43
44
45
'use strict';
var gulp = require('gulp'),
sass = require('gulp-sass');
var critical = require('critical');
var concat = require('gulp-concat');
// Sass task
// Compile Our Sass from the "scss" directory
gulp.task('sass', function () {
gulp.src(['./scss/*.scss','!./scss/_*.scss'])
.pipe(sass({outputStyle: 'compressed'}).on('error', sass.logError))
.pipe(gulp.dest('./stylesheets'));
});
gulp.task('critical', function (cb) {
critical.generate({
base: './',
src: 'critical.html',
dimensions: [{
width: 320,
height: 480
},{
width: 768,
height: 1024
},{
width: 1280,
height: 960
}],
dest: 'views/custom-patterns/_critical.html',
minify: true,
extract: false,
ignore: ['font-face']
});
});
gulp.task('default',['sass'], function(){
gulp.watch(['scss/**/*.scss'], ['sass']);
});
gulp.task('scripts', function() {
return gulp.src(['./javascripts/vendor/responsive-nav.js', './javascripts/responsive-nav--custom.js', './javascripts/vendor/fontfaceobserver-1.5.1.js', './javascripts/fontfaceobserver__custom.js', './javascripts/vendor/wvu-nav-dropdowns.js', './javascripts/vendor/calendar-build.js'])
.pipe(concat('all.js'))
.pipe(gulp.dest('./javascripts/'));
});