From 3b3f0ef29723b29817c53a01449bd665d9fb59a7 Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Tue, 18 Jan 2022 11:23:41 +0300 Subject: [PATCH] [forms] replace inlined variables --- build/appforms.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/build/appforms.js b/build/appforms.js index f12e37e56..7d0238af6 100644 --- a/build/appforms.js +++ b/build/appforms.js @@ -65,6 +65,17 @@ module.exports = (grunt) => { } }, + replace: { + varsEnviroment: { + src: ['<%= pkg.forms.js.requirejs.options.out %>'], + overwrite: true, + replacements: [{ + from: /\{\{PRODUCT_VERSION\}\}/g, + to: packageFile.version + }, ...global.jsreplacements] + }, + }, + inline: { dist: { src: packageFile.forms.inline.src @@ -76,5 +87,5 @@ module.exports = (grunt) => { grunt.registerTask('deploy-app-forms', ['forms-app-init', 'clean:prebuild', /*'imagemin',*/ 'less', 'requirejs', 'concat', 'copy', 'inline', /*'json-minify',*/ - /*'replace:writeVersion',*/ /*'replace:prepareHelp',*/ 'clean:postbuild']); + 'replace:varsEnviroment', /*'replace:prepareHelp',*/ 'clean:postbuild']); } \ No newline at end of file