-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
67 lines (49 loc) · 1.46 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
const gulp = require('gulp');
const path = require('path');
const concat = require('gulp-concat');
const less = require('gulp-less');
const nodemon = require('gulp-nodemon');
const paths = {
BOWER:"client/lib",
FONTS: "./client/assets/fonts",
FONT_AWESOME_OUT: "./client/less/font-awesome"
};
// gulp.task('fonts', function() {
// return gulp.src(paths.BOWER + '/font-awesome/**/*.*')
// .pipe(gulp.dest(paths.FONT_AWESOME_OUT));
// });
gulp.task('less', function() {
return gulp.src('./client/customers/src/less/**/*.less')
.pipe(less({
paths: [path.join(__dirname,'includes' )]
}))
.pipe(concat('styles.css'))
.pipe(gulp.dest('./client/customers/dist/static/css'))
});
gulp.task('watch-less', function() {
return gulp.watch(__dirname + '/client/less/**/*.less', ['less']);
});
gulp.task('wp-proxy-less', function() {
// gulp.watch(__dirname + '/client/less/**/*.less', ['less']);
nodemon({
watch: ['client/less'],
ignore:['node_modules', 'client/lib', 'client/assets', 'client/dist'],
ext: 'less',
tasks: ['less']
});
});
gulp.task('watch-server', function() {
nodemon({
watch: ['server', 'server.js'],
ignore: ['node_modules', './client', 'client/dist'],
ext: 'js'
})
});
gulp.task('default', function() {
nodemon({
watch: ['server', 'server.js'],
ignore:['node_modules', 'client/lib', 'client/assets', 'client/dist'],
ext: 'js html less',
env: {'NODE_ENV': 'production'}
})
});