-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
40 lines (34 loc) · 888 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
38
39
40
const gulp = require('gulp');
const postcss = require('gulp-postcss');
const rsync = require('gulp-rsync');
// process CSS
gulp.task('css', function () {
return gulp.src('./_src/css/styles.css')
.pipe(postcss())
.pipe(gulp.dest('./css'));
});
// watching
gulp.task('watch:css', function() {
return gulp.watch(['./_src/css/**/*.css'],
gulp.series('css'));
});
gulp.task('watch', gulp.parallel('watch:css'));
// deafult task
gulp.task('default', gulp.parallel('watch'));
// build task
gulp.task('build', gulp.parallel('css'));
//deployment
gulp.task('deploy', function(){
return gulp.src('_site/**')
.pipe(rsync({
root: '_site/',
username: 'flucoma',
hostname: 'flucoma',
destination: '~/www',
archive: true,
silent: false,
compress: true,
delete: false,
chmod: 'u=rwX,Dg=rX,Do=rX,Fg=r,Fu=r'
}));
});