gulpfile.js 429 B

12345678910111213141516
  1. const gulp = require('gulp')
  2. const replace = require('gulp-replace')
  3. const pack = require('./package.json')
  4. gulp.task('copy_resource', () => {
  5. return gulp.src('./func/*')
  6. .pipe(gulp.dest('./'))
  7. })
  8. gulp.task('update_version', () => {
  9. return gulp.src('./func/ctor.js')
  10. .pipe(replace(/'@VERSION'/, `'${pack.version}'`))
  11. .pipe(gulp.dest('./'))
  12. })
  13. gulp.task('build', gulp.series('copy_resource', 'update_version'))