-
Notifications
You must be signed in to change notification settings - Fork 59
/
gulpfile.js
37 lines (32 loc) · 1000 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
35
36
37
'use strict';
var gulp = require('gulp');
var sass = require('gulp-sass');
var sourcemaps = require('gulp-sourcemaps');
// admin.css
gulp.task('admin-sass',function(){
return gulp.src('resources/assets/sass/admin.scss')
.pipe(sourcemaps.init())
.pipe(sass())
.pipe(sourcemaps.write('./'))
.pipe(gulp.dest('public/css/'));
});
// mall.css
gulp.task('mall-sass',function(){
return gulp.src('resources/assets/sass/mall.scss')
.pipe(sourcemaps.init())
.pipe(sass())
.pipe(sourcemaps.write('./'))
.pipe(gulp.dest('public/css/'));
});
// global.css
gulp.task('global-sass',function(){
return gulp.src('resources/assets/sass/global.scss')
.pipe(sourcemaps.init())
.pipe(sass())
.pipe(sourcemaps.write('./'))
.pipe(gulp.dest('public/css/'));
});
// gulp watch
gulp.task('watchsass',function () {
return gulp.watch('resources/assets/sass/*.scss',['admin-sass','mall-sass','global-sass']);
});