[forms] replace inlined variables

This commit is contained in:
Maxim Kadushkin 2022-01-18 11:23:41 +03:00
parent 8395c4d481
commit 3b3f0ef297

View file

@ -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: { inline: {
dist: { dist: {
src: packageFile.forms.inline.src src: packageFile.forms.inline.src
@ -76,5 +87,5 @@ module.exports = (grunt) => {
grunt.registerTask('deploy-app-forms', ['forms-app-init', 'clean:prebuild', /*'imagemin',*/ 'less', grunt.registerTask('deploy-app-forms', ['forms-app-init', 'clean:prebuild', /*'imagemin',*/ 'less',
'requirejs', 'concat', 'copy', 'inline', /*'json-minify',*/ 'requirejs', 'concat', 'copy', 'inline', /*'json-minify',*/
/*'replace:writeVersion',*/ /*'replace:prepareHelp',*/ 'clean:postbuild']); 'replace:varsEnviroment', /*'replace:prepareHelp',*/ 'clean:postbuild']);
} }