-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgulpfile.js
30 lines (25 loc) · 1.34 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
var gulp = require("gulp"),
rev = require("gulp-rev"),
path = require("path");
gulp.task('css', () =>
gulp.src('themes/replicated-docs-theme/static/css/style.css', {base: path.join(process.cwd(), 'themes/replicated-docs-theme/static/css')})
.pipe(rev())
.pipe(gulp.dest('static/css')) // write rev'd assets to build dir
.pipe(rev.manifest(('manifest-css.json')))
.pipe(gulp.dest('data')) // write manifest to build dir
);
gulp.task('js-staging', () =>
gulp.src('themes/replicated-docs-theme/static/js/staging/autocomplete-search.js', {base: path.join(process.cwd(), 'themes/replicated-docs-theme/static/js/staging')})
.pipe(rev())
.pipe(gulp.dest('static/js/staging')) // write rev'd assets to build dir
.pipe(rev.manifest(('manifest-js-staging.json')))
.pipe(gulp.dest('data')) // write manifest to build dir
);
gulp.task('js-prod', () =>
gulp.src('themes/replicated-docs-theme/static/js/prod/autocomplete-search.js', {base: path.join(process.cwd(), 'themes/replicated-docs-theme/static/js/prod')})
.pipe(rev())
.pipe(gulp.dest('static/js/prod')) // write rev'd assets to build dir
.pipe(rev.manifest(('manifest-js-prod.json')))
.pipe(gulp.dest('data')) // write manifest to build dir
);
gulp.task('default', [ 'css', 'js-staging', 'js-prod' ]);