-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
28 lines (24 loc) · 942 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
var gulp = require('gulp');
var sass = require('gulp-sass');
var ejs = require('gulp-ejs');
var gutil = require('gulp-util');
const PATH_CONFIG = require('./svnPath.js');
gulp.task('default', ['sass'], function () {
console.log('use gulp sass to run');
});
gulp.task('sass', function () {
return gulp.src('./scss/**/*.scss')
.pipe(sass({outputStyle: 'compact'}).on('error', sass.logError))
.pipe(gulp.dest('./assets/css'));
});
gulp.task('sass:watch', function () {
gulp.watch('./scss/**/*.scss', ['sass']);
});
gulp.task('toPic', ['sass'], function () {
gulp.src('js/**/*.js')
.pipe(gulp.dest(PATH_CONFIG.picSvnPath + '/js' + PATH_CONFIG.projectPath));
gulp.src('assets/css/**/*.css')
.pipe(gulp.dest(PATH_CONFIG.picSvnPath + '/styles' + PATH_CONFIG.projectPath));
gulp.src('img/**/*.png')
.pipe(gulp.dest(PATH_CONFIG.picSvnPath + '/img'));
});