Skip to content

Commit

Permalink
FIO-9482 fixed setting Formio version (#5974)
Browse files Browse the repository at this point in the history
  • Loading branch information
HannaKurban authored Jan 10, 2025
1 parent 3a4aca1 commit 6a5e5bc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const replace = require('gulp-replace');
const rename = require('gulp-rename');
const cleanCSS = require('gulp-clean-css');
const clean = require('gulp-clean');
const packageJson = require('./package.json');

// Clean lib folder.
gulp.task('clean:dist', () => {
Expand All @@ -22,6 +23,12 @@ gulp.task('builder-fonts', function builderFonts() {
return gulp.src('./node_modules/bootstrap-icons/font/fonts/*').pipe(gulp.dest('dist/fonts'));
});

gulp.task('version', () => {
return gulp.src(['./lib/**/Formio.js', './lib/**/Embed.js'])
.pipe(replace('FORMIO_VERSION', packageJson.version))
.pipe(gulp.dest('lib'));
})

// Generate styles
const compileStyles = (styles, file) => {
const sassFilter = filter('**/*.scss', { restore: true });
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"build": "yarn doc && yarn lib && yarn dist",
"doc": "typedoc",
"dist": "gulp clean:dist && webpack --config webpack.config.js && webpack --config webpack.prod.js && gulp build",
"lib": "gulp clean:lib && tsc --project tsconfig.cjs.json && tsc --project tsconfig.mjs.json && yarn lib:package",
"lib": "gulp clean:lib && tsc --project tsconfig.cjs.json && tsc --project tsconfig.mjs.json && yarn lib:package && gulp version",
"lib:package": "node ./libpackage.js",
"version": "node -e 'console.log(require(`./package.json`).version)'",
"build-app": "yarn build-app:create-app && yarn build-app:jekyll && yarn build-app:remove-app",
Expand Down

0 comments on commit 6a5e5bc

Please sign in to comment.