mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-04-07 14:06:16 +08:00
@ -12,13 +12,18 @@ module.exports = function(grunt) {
|
||||
' * Version: <%= pkg.version %> (build:<%= pkg.build %>)\n' +
|
||||
' */\n';
|
||||
|
||||
let iconv_lite, encoding = process.env.SYSTEM_ENCODING;
|
||||
grunt.log.writeln('platform: ' + process.platform.green);
|
||||
|
||||
let iconv_lite, encoding = process.env.SYSTEM_ENCODING || 'win1251';
|
||||
if (process.platform == 'win32') {
|
||||
const cmdencoding = require('child_process').execSync('chcp');
|
||||
grunt.log.writeln(cmdencoding);
|
||||
if ( cmdencoding.includes('866') ) {
|
||||
if ( !encoding ) {
|
||||
if ( cmdencoding.includes('866') ) encoding = '1251'; else
|
||||
if ( cmdencoding.includes('437') ) encoding = '1252'; else
|
||||
if ( cmdencoding.includes('65001') ) encoding = 'utf8';
|
||||
}
|
||||
|
||||
if ( !!encoding && !/utf-?8/i.test(encoding) ) {
|
||||
iconv_lite = require('iconv-lite');
|
||||
}
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
"grunt-svgmin": "^6.0.0",
|
||||
"grunt-text-replace": "0.3.11",
|
||||
"iconsprite": "file:sprites",
|
||||
"iconv": "^2.3.5",
|
||||
"iconv-lite": "^0.5.1",
|
||||
"less-plugin-clean-css": "1.5.0",
|
||||
"lodash": "^4.0.0",
|
||||
"mocha": "^6.2.2",
|
||||
|
||||
Reference in New Issue
Block a user