forked from elifesciences/xpub-responsive-proto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
39 lines (32 loc) · 1.19 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
"use strict";
const del = require('del');
const gulp = require('gulp');
const sourcemaps = require('gulp-sourcemaps');
const sassGlob = require('gulp-sass-glob');
const sass = require('gulp-sass');
gulp.task('css:clean', () => {
del(['./web/styles/css/*']);
});
gulp.task('sass:build', ['css:clean'], () => {
return gulp.src('web/styles/styles.scss')
.pipe(sourcemaps.init())
.pipe(sassGlob())
.pipe(sass().on('error', sass.logError))
// .pipe(rename('all.css'))
.pipe(sourcemaps.write('./'))
.pipe(gulp.dest('web/styles/css/'));
});
gulp.task('sass-css-grid-layout:build', ['sass:build'], () => {
return gulp.src('web/styles/styles-css-grid-layout.scss')
.pipe(sourcemaps.init())
.pipe(sassGlob())
.pipe(sass().on('error', sass.logError))
// .pipe(rename('all.css'))
.pipe(sourcemaps.write('./'))
.pipe(gulp.dest('web/styles/css/'));
});
gulp.task('sass:watch', ['sass-css-grid-layout:build'], () => {
gulp.watch('web/styles/*.scss', ['sass-css-grid-layout:build'])
});
gulp.task('watch', ['sass:watch']);
gulp.task('default', ['sass:build']);