[Gradle, JS] Update evaluate reporting

#KT-32721 fixed
This commit is contained in:
Ilya Goncharov
2020-03-31 14:44:39 +03:00
parent dd320040cd
commit f55998a015
@@ -131,11 +131,12 @@ data class KotlinWebpackConfig(
appendln(
"""
// save evaluated config file
var util = require('util');
var fs = require("fs");
var evaluatedConfig = util.inspect(config, {showHidden: false, depth: null, compact: false});
fs.writeFile($filePath, evaluatedConfig, function (err) {});
;(function(config) {
const util = require('util');
const fs = require('fs');
const evaluatedConfig = util.inspect(config, {showHidden: false, depth: null, compact: false});
fs.writeFile($filePath, evaluatedConfig, function (err) {});
})(config);
""".trimIndent()
)
}
@@ -257,7 +258,7 @@ data class KotlinWebpackConfig(
;(function(config) {
const webpack = require('webpack');
const handler = (percentage, message, ...args) => {
let p = percentage * 100;
const p = percentage * 100;
let msg = `${"$"}{Math.trunc(p / 10)}${"$"}{Math.trunc(p % 10)}% ${"$"}{message} ${"$"}{args.join(' ')}`;
${if (progressReporterPathFilter == null) "" else """
msg = msg.replace(new RegExp(${progressReporterPathFilter.jsQuoted()}, 'g'), '');