forked from jdiazfernandez/devops_taxonomies.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
34 lines (29 loc) · 841 Bytes
/
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
var gulp = require('gulp');
var path = require('path');
var sass = require('gulp-sass');
var autoprefixer = require('gulp-autoprefixer');
var sourcemaps = require('gulp-sourcemaps');
var open = require('gulp-open');
var Paths = {
HERE: './',
DIST: 'dist/',
CSS: './assets/css/',
SCSS_TOOLKIT_SOURCES: './assets/scss/paper-kit.scss',
SCSS: './assets/scss/**/**'
};
gulp.task('compile-scss', function() {
return gulp.src(Paths.SCSS_TOOLKIT_SOURCES)
.pipe(sourcemaps.init())
.pipe(sass().on('error', sass.logError))
.pipe(autoprefixer())
.pipe(sourcemaps.write(Paths.HERE))
.pipe(gulp.dest(Paths.CSS));
});
gulp.task('watch', function() {
gulp.watch(Paths.SCSS, ['compile-scss']);
});
gulp.task('open', function() {
gulp.src('index.html')
.pipe(open());
});
gulp.task('open-app', ['open', 'watch']);