parent
41cde55b5c
commit
98b2897594
|
@ -12,13 +12,18 @@ module.exports = function(grunt) {
|
||||||
' * Version: <%= pkg.version %> (build:<%= pkg.build %>)\n' +
|
' * Version: <%= pkg.version %> (build:<%= pkg.build %>)\n' +
|
||||||
' */\n';
|
' */\n';
|
||||||
|
|
||||||
|
let iconv_lite, encoding = process.env.SYSTEM_ENCODING;
|
||||||
grunt.log.writeln('platform: ' + process.platform.green);
|
grunt.log.writeln('platform: ' + process.platform.green);
|
||||||
|
|
||||||
let iconv_lite, encoding = process.env.SYSTEM_ENCODING || 'win1251';
|
|
||||||
if (process.platform == 'win32') {
|
if (process.platform == 'win32') {
|
||||||
const cmdencoding = require('child_process').execSync('chcp');
|
const cmdencoding = require('child_process').execSync('chcp');
|
||||||
grunt.log.writeln(cmdencoding);
|
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');
|
iconv_lite = require('iconv-lite');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
"grunt-svgmin": "^6.0.0",
|
"grunt-svgmin": "^6.0.0",
|
||||||
"grunt-text-replace": "0.3.11",
|
"grunt-text-replace": "0.3.11",
|
||||||
"iconsprite": "file:sprites",
|
"iconsprite": "file:sprites",
|
||||||
"iconv": "^2.3.5",
|
"iconv-lite": "^0.5.1",
|
||||||
"less-plugin-clean-css": "1.5.0",
|
"less-plugin-clean-css": "1.5.0",
|
||||||
"lodash": "^4.0.0",
|
"lodash": "^4.0.0",
|
||||||
"mocha": "^6.2.2",
|
"mocha": "^6.2.2",
|
||||||
|
|
Loading…
Reference in a new issue