weboptimizer 4.0.16 → 4.0.17
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.
- package/browser.js +4 -3
- package/package.json +12 -6
- package/type.js +0 -4
package/browser.js
CHANGED
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
// region imports
|
|
19
19
|
import { CONSOLE_METHODS, Logger, timeout } from 'clientnode';
|
|
20
|
+
import webOptimizerDefaultTemplate from 'webOptimizerDefaultTemplateFilePath';
|
|
20
21
|
// endregion
|
|
21
22
|
// region declaration
|
|
22
23
|
|
|
@@ -92,6 +93,7 @@ if (typeof TARGET_TECHNOLOGY === 'undefined' || TARGET_TECHNOLOGY === 'node')
|
|
|
92
93
|
virtualConsole
|
|
93
94
|
});
|
|
94
95
|
};
|
|
96
|
+
let evaluatedContent = '';
|
|
95
97
|
if (typeof NAME === 'undefined' || NAME === 'webOptimizer') {
|
|
96
98
|
const filePath = path.join(import.meta.dirname, 'index.html.ejs');
|
|
97
99
|
/*
|
|
@@ -102,15 +104,14 @@ if (typeof TARGET_TECHNOLOGY === 'undefined' || TARGET_TECHNOLOGY === 'node')
|
|
|
102
104
|
const content = await (await import('fs')).promises.readFile(filePath, {
|
|
103
105
|
encoding: 'utf-8'
|
|
104
106
|
});
|
|
105
|
-
let evaluatedContent = '';
|
|
106
107
|
await ejsLoader.bind({
|
|
107
108
|
resourcePath: filePath,
|
|
108
109
|
async: (error, result) => {
|
|
109
110
|
if (error) throw error;else evaluatedContent = result;
|
|
110
111
|
}
|
|
111
112
|
})(content);
|
|
112
|
-
|
|
113
|
-
|
|
113
|
+
} else evaluatedContent = webOptimizerDefaultTemplate;
|
|
114
|
+
render(evaluatedContent);
|
|
114
115
|
// endregion
|
|
115
116
|
})().catch(error => {
|
|
116
117
|
log.error(error);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "weboptimizer",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.17",
|
|
4
4
|
"description": "A generic web optimizer, (module) bundler and development environment.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"webpack",
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"babel-plugin-polyfill-corejs3": "^1.0.0",
|
|
96
96
|
"babel-plugin-transform-rewrite-imports": "^1.5.4",
|
|
97
97
|
"babel-preset-minify": "^0.5.2",
|
|
98
|
-
"clientnode": "4.0.
|
|
98
|
+
"clientnode": "4.0.1439",
|
|
99
99
|
"core-js": "^3.49.0",
|
|
100
100
|
"ejs": "^6.0.1",
|
|
101
101
|
"exports-loader": "^5.0.0",
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
"webpack-sources": "^3.5.1"
|
|
115
115
|
},
|
|
116
116
|
"devDependencies": {
|
|
117
|
-
"@babel/cli": "^8.0.
|
|
117
|
+
"@babel/cli": "^8.0.4",
|
|
118
118
|
"@babel/eslint-parser": "^8.0.1",
|
|
119
119
|
"@eslint/js": "^10.0.1",
|
|
120
120
|
"@stylistic/eslint-plugin": "^5.10.0",
|
|
@@ -333,7 +333,8 @@
|
|
|
333
333
|
"exports": {
|
|
334
334
|
".": "/.index.js",
|
|
335
335
|
"./browser": "./browser.js",
|
|
336
|
-
"./ejsLoader": "./ejsLoader.js"
|
|
336
|
+
"./ejsLoader": "./ejsLoader.js",
|
|
337
|
+
"./type": "./type.js"
|
|
337
338
|
},
|
|
338
339
|
"webDocumentation": {
|
|
339
340
|
"trackingCode": "UA-40192634-11"
|
|
@@ -741,8 +742,7 @@
|
|
|
741
742
|
"cascadingStyleSheetFileExtension": "css",
|
|
742
743
|
"isWeb": true,
|
|
743
744
|
"supportedBrowsers": [
|
|
744
|
-
"last 2 major versions"
|
|
745
|
-
"> 5%"
|
|
745
|
+
"last 2 major versions"
|
|
746
746
|
],
|
|
747
747
|
"testCommandLine": "node --experimental-vm-modules node_modules/.bin/jest --config node_modules/weboptimizer/jest.json --noStackTrace --test-regex",
|
|
748
748
|
"testCommandLineCoverageArguments": "--ci --coverage --coverage-reporters=text --coverage-reporters=text-summary --silent --test-location-in-results"
|
|
@@ -1529,6 +1529,12 @@
|
|
|
1529
1529
|
"offline": null
|
|
1530
1530
|
},
|
|
1531
1531
|
"webpack": {
|
|
1532
|
+
"output": {
|
|
1533
|
+
"environment": {
|
|
1534
|
+
"dynamicImport": true,
|
|
1535
|
+
"module": true
|
|
1536
|
+
}
|
|
1537
|
+
},
|
|
1532
1538
|
"watchOptions": {
|
|
1533
1539
|
"ignored": [
|
|
1534
1540
|
"./*.js",
|