Skip to content

Commit

Permalink
更改版本号获取位置:package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
iamscottxu committed Sep 24, 2020
1 parent 1eb5bdd commit 5a8559c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,20 @@ const sourcemaps = require('gulp-sourcemaps');
const babel = require("gulp-babel");
const eslint = require('gulp-eslint');
const buildConfig = require('./build.json');
const packageConfig = require('./package.json');

gulp.task('doc', (cb) => {
let config = require('./jsdoc.json');
config.opts.destination = `./docs/${buildConfig.version}`;
config.opts.destination = `./docs/${/^[0-9]*.[0-9]*/.exec(packageConfig.version)}`;
gulp.src(['README.md', 'src/**/*.js', '!src/lib/**/*', '!src/renderers/**/*'], { read: false })
.pipe(jsdoc(config, cb));
});

gulp.task('es6', gulp.series(gulp.parallel(() => {
return gulp.src("./build.json")
.pipe(jeditor({
'buildDate': new Date().toUTCString()
'buildDate': new Date().toUTCString(),
'version': packageConfig.version
}))
.pipe(gulp.dest('dist'))
}, () => {
Expand Down

0 comments on commit 5a8559c

Please sign in to comment.