-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
64 lines (53 loc) · 1.53 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
var gulp = require('gulp');
var pug = require('gulp-pug');
var sass = require('gulp-sass');
var gulpCopy = require('gulp-copy');
var replace = require('gulp-replace');
gulp.task('pug', function () {
return gulp
.src('src/pug/**/*.pug')
.pipe(pug({pretty: true}))
.pipe(replace('../../scss/', '../../css/'))
.pipe(gulp.dest('./dist/html'));
});
gulp.task('html', function () {
return gulp
.src('src/pug/pages/**/*.pug')
.pipe(pug({pretty: true}))
.pipe(replace('../../scss/', '../../css/'))
.pipe(replace('../../', './'))
.pipe(gulp.dest('./dist'));
});
gulp.task('sass', function () {
return gulp
.src('./src/scss/style.scss')
.pipe(sass())
.pipe(gulp.dest('./dist/css'));
});
gulp.task('img', function () {
return gulp
.src('./src/img/**/*')
.pipe(gulp.dest('./dist/img'));
});
gulp.task('fonts', function () {
return gulp
.src('./src/fonts/**/*')
.pipe(gulp.dest('./dist/fonts'));
});
gulp.task('vendor', function () {
return gulp
.src('./src/vendor/**/*')
.pipe(gulp.dest('./dist/vendor'));
});
gulp.task('data', function () {
return gulp
.src('./src/data/**/*')
.pipe(gulp.dest('./dist/data'));
});
gulp.task('js', function () {
return gulp
.src('./src/js/**/*')
.pipe(gulp.dest('./dist/js'));
});
gulp.task('assets', gulp.series('img', 'fonts', 'data', 'vendor','js'));
gulp.task('default', gulp.series('pug', 'html', 'sass', 'assets'));