next-translate 2.0.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -53,10 +53,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
53
53
|
exports.log = void 0;
|
|
54
54
|
var getConfig_1 = __importDefault(require("./getConfig"));
|
|
55
55
|
var getPageNamespaces_1 = __importDefault(require("./getPageNamespaces"));
|
|
56
|
-
var colorEnabled = process.env.NODE_DISABLE_COLORS == null &&
|
|
57
|
-
process.env.NO_COLOR == null &&
|
|
58
|
-
process.env.TERM !== 'dumb' &&
|
|
59
|
-
process.env.FORCE_COLOR !== '0';
|
|
60
56
|
function loadNamespaces(config) {
|
|
61
57
|
var _a, _b;
|
|
62
58
|
if (config === void 0) { config = {}; }
|
|
@@ -113,7 +109,11 @@ function removeTrailingSlash(path) {
|
|
|
113
109
|
function log(conf, _a) {
|
|
114
110
|
var page = _a.page, lang = _a.lang, namespaces = _a.namespaces;
|
|
115
111
|
if (conf.logBuild !== false && typeof window === 'undefined') {
|
|
116
|
-
var
|
|
112
|
+
var colorEnabled_1 = process.env.NODE_DISABLE_COLORS == null &&
|
|
113
|
+
process.env.NO_COLOR == null &&
|
|
114
|
+
process.env.TERM !== 'dumb' &&
|
|
115
|
+
process.env.FORCE_COLOR !== '0';
|
|
116
|
+
var color = function (c) { return (colorEnabled_1 ? "\u001B[36m".concat(c, "\u001B[0m") : c); };
|
|
117
117
|
console.log(color('next-translate'), "- compiled page:", color(page), '- locale:', color(lang), '- namespaces:', color(namespaces.join(', ')), '- used loader:', color(conf.loaderName || '-'));
|
|
118
118
|
}
|
|
119
119
|
}
|
|
@@ -47,10 +47,6 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
47
47
|
};
|
|
48
48
|
import getConfig from './getConfig';
|
|
49
49
|
import getPageNamespaces from './getPageNamespaces';
|
|
50
|
-
var colorEnabled = process.env.NODE_DISABLE_COLORS == null &&
|
|
51
|
-
process.env.NO_COLOR == null &&
|
|
52
|
-
process.env.TERM !== 'dumb' &&
|
|
53
|
-
process.env.FORCE_COLOR !== '0';
|
|
54
50
|
export default function loadNamespaces(config) {
|
|
55
51
|
var _a, _b;
|
|
56
52
|
if (config === void 0) { config = {}; }
|
|
@@ -106,7 +102,11 @@ function removeTrailingSlash(path) {
|
|
|
106
102
|
export function log(conf, _a) {
|
|
107
103
|
var page = _a.page, lang = _a.lang, namespaces = _a.namespaces;
|
|
108
104
|
if (conf.logBuild !== false && typeof window === 'undefined') {
|
|
109
|
-
var
|
|
105
|
+
var colorEnabled_1 = process.env.NODE_DISABLE_COLORS == null &&
|
|
106
|
+
process.env.NO_COLOR == null &&
|
|
107
|
+
process.env.TERM !== 'dumb' &&
|
|
108
|
+
process.env.FORCE_COLOR !== '0';
|
|
109
|
+
var color = function (c) { return (colorEnabled_1 ? "\u001B[36m".concat(c, "\u001B[0m") : c); };
|
|
110
110
|
console.log(color('next-translate'), "- compiled page:", color(page), '- locale:', color(lang), '- namespaces:', color(namespaces.join(', ')), '- used loader:', color(conf.loaderName || '-'));
|
|
111
111
|
}
|
|
112
112
|
}
|