forked from creativetimofficial/soft-ui-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
34 lines (29 loc) · 900 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')(require('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/soft-ui-dashboard.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, gulp.series('compile-scss'));
});
gulp.task('open', function() {
gulp.src('pages/dashboard.html')
.pipe(open());
});
gulp.task('open-app', gulp.parallel('open', 'watch'));