1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-13 23:03:32 +00:00

gulp postdist tasks for version file

This commit is contained in:
Kyle Spearrin
2018-07-21 00:11:55 -04:00
parent 58818dabc5
commit c1efe268d0
5 changed files with 24 additions and 15 deletions

View File

@@ -1,8 +1,12 @@
const gulp = require('gulp');
const googleWebFonts = require('gulp-google-webfonts');
const del = require('del');
const package = require('./package.json');
const fs = require('fs');
const paths = {
src: './src/',
build: './build/',
cssDir: './src/css/',
};
@@ -20,6 +24,12 @@ function webfonts() {
.pipe(gulp.dest(paths.cssDir));
};
function version() {
fs.writeFileSync(paths.build + 'version.json', '{"version":"' + package.version + '"}');
}
gulp.task('clean', clean);
gulp.task('webfonts', ['clean'], webfonts);
gulp.task('build', ['webfonts']);
gulp.task('prebuild', ['webfonts']);
gulp.task('version', version);
gulp.task('postdist', ['version']);