[build] refactoring

This commit is contained in:
Maxim Kadushkin 2022-01-18 11:22:44 +03:00 committed by Julia Radzhabova
parent 0f7cd84acf
commit d53adf634d

View file

@ -33,7 +33,7 @@ module.exports = function(grunt) {
return !!string && !!iconv_lite ? iconv_lite.encode(string,encoding) : string;
};
var jsreplacements = [
global.jsreplacements = [
{
from: /\{\{SUPPORT_EMAIL\}\}/g,
to: _encode(process.env.SUPPORT_EMAIL) || 'support@onlyoffice.com'
@ -355,12 +355,12 @@ module.exports = function(grunt) {
replacements: [{
from: /\{\{PRODUCT_VERSION\}\}/g,
to: packageFile.version
}]
}, ...global.jsreplacements]
},
prepareHelp: {
src: ['<%= pkg.main.copy.help[0].dest %>/ru/**/*.htm*'],
overwrite: true,
replacements: []
replacements: [...helpreplacements]
}
},
@ -427,10 +427,10 @@ module.exports = function(grunt) {
}
});
var replace = grunt.config.get('replace');
replace.writeVersion.replacements.push(...jsreplacements);
replace.prepareHelp.replacements.push(...helpreplacements);
grunt.config.set('replace', replace);
// var replace = grunt.config.get('replace');
// replace.writeVersion.replacements.push(...global.jsreplacements);
// replace.prepareHelp.replacements.push(...helpreplacements);
// grunt.config.set('replace', replace);
});
grunt.registerTask('deploy-reporter', function(){