forked from cypress-io/cypress
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
38 lines (30 loc) · 874 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
const gulp = require('gulp')
const ghPages = require('gulp-gh-pages')
const gulpClean = require('gulp-clean')
const RevAll = require('gulp-rev-all')
const assets = () => {
const revAllOpts = {
dontGlobal: ['.ico', 'fira.css', 'javascript-logo.png'],
dontRenameFile: ['.ico', '.html', /fonts/],
dontSearchFile: ['.js'],
debug: false,
}
return gulp.src('./app/**/*')
.pipe(RevAll.revision(revAllOpts))
.pipe(gulp.dest('build'))
}
const cname = () => {
return gulp.src('CNAME', { allowEmpty: true })
.pipe(gulp.dest('build'))
}
const clean = () => {
return gulp.src('./build', { allowEmpty: true })
.pipe(gulpClean())
}
const pushGhPages = () => {
return gulp.src('build/**/*')
.pipe(ghPages())
}
const build = gulp.series(clean, gulp.parallel(assets, cname))
exports.build = build
exports.deploy = gulp.series(build, pushGhPages)