weboptimizer 3.0.8 → 3.0.9
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/ejsLoader.js +5 -4
- package/package.json +10 -10
package/ejsLoader.js
CHANGED
|
@@ -174,13 +174,14 @@ var loader = exports.loader = function loader(source) {
|
|
|
174
174
|
}
|
|
175
175
|
if (step === compileSteps && (_givenOptions$compres2 = givenOptions.compress) !== null && _givenOptions$compres2 !== void 0 && _givenOptions$compres2.html) result = compressHTML(result);
|
|
176
176
|
if (step === compileSteps && compileSteps % 2) {
|
|
177
|
-
|
|
177
|
+
/*
|
|
178
|
+
We have to use the templace class directly to get
|
|
179
|
+
the generated source code.
|
|
180
|
+
*/
|
|
178
181
|
var templateInstance = new _ejs["default"].Template(template, options);
|
|
179
|
-
|
|
180
|
-
// Generiert den JS-Code der Funktion als String
|
|
181
182
|
templateInstance.compile();
|
|
182
183
|
var compiledSourceCode = templateInstance.source;
|
|
183
|
-
result = "\n module.exports = function(".concat(options.localsName, ") {\n var escapeFn = function(value) {\n return String(value)\n .replace(\n /[&<>\"']/g,\n function(char) {\n return {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": \"'\"\n }[char]\n }\n )\n };\n var include = function() {\n throw new Error('Include not implemented.')\n };\n var rethrow = function rethrow(err, str, flnm, lineno, esc) {\n var lines = str.split('\\n');\n var start = Math.max(lineno - 3, 0);\n var end = Math.min(lines.length, lineno + 3);\n var filename = esc(flnm);\n // Error context\n var context = lines.slice(start, end).map(function (line, i) {\n
|
|
184
|
+
result = "\n module.exports = function(\n ".concat(options.localsName, "\n ) {\n var escapeFn = function(value) {\n return String(value)\n .replace(\n /[&<>\"']/g,\n function(char) {\n return {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": \"'\"\n }[char]\n }\n )\n };\n var include = function() {\n throw new Error('Include not implemented.')\n };\n var rethrow = function rethrow(\n err, str, flnm, lineno, esc\n ) {\n var lines = str.split('\\n');\n var start = Math.max(lineno - 3, 0);\n var end = Math.min(\n lines.length, lineno + 3\n );\n var filename = esc(flnm);\n // Error context\n var context = lines\n .slice(start, end)\n .map(function (line, i) {\n var curr = i + start + 1;\n return (\n curr == lineno ?\n ' >> ' :\n ' '\n ) +\n curr +\n '| ' +\n line;\n })\n .join('\\n');\n // Alter exception message\n err.path = filename;\n err.message =\n (filename || 'ejs') +\n ':' +\n lineno +\n '\\n' +\n context +\n '\\n\\n' +\n err.message;\n throw err;\n };\n ").concat(compiledSourceCode, "\n };\n ").trim();
|
|
184
185
|
} else result = _ejs["default"].compile(result, options);
|
|
185
186
|
}
|
|
186
187
|
} else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "weboptimizer",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.9",
|
|
4
4
|
"description": "A generic web optimizer, (module) bundler and development environment.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"webpack",
|
|
@@ -92,13 +92,13 @@
|
|
|
92
92
|
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6",
|
|
93
93
|
"@babel/plugin-syntax-top-level-await": "^7.14.5",
|
|
94
94
|
"@babel/plugin-transform-runtime": "^7.29.0",
|
|
95
|
-
"@babel/preset-env": "^7.29.
|
|
95
|
+
"@babel/preset-env": "^7.29.2",
|
|
96
96
|
"@babel/preset-typescript": "^7.28.5",
|
|
97
|
-
"@babel/runtime": "^7.
|
|
97
|
+
"@babel/runtime": "^7.29.2",
|
|
98
98
|
"babel-loader": "^10.1.1",
|
|
99
99
|
"babel-plugin-transform-modern-regexp": "^0.0.6",
|
|
100
100
|
"babel-preset-minify": "^0.5.2",
|
|
101
|
-
"clientnode": "4.0.
|
|
101
|
+
"clientnode": "4.0.1359",
|
|
102
102
|
"ejs": "^5.0.1",
|
|
103
103
|
"exports-loader": "^5.0.0",
|
|
104
104
|
"extract-loader": "^5.1.0",
|
|
@@ -110,9 +110,9 @@
|
|
|
110
110
|
"jest-environment-jsdom": "^30.3.0",
|
|
111
111
|
"rimraf": "^6.1.3",
|
|
112
112
|
"script-loader": "^0.7.2",
|
|
113
|
-
"typescript": "^
|
|
113
|
+
"typescript": "^6.0.2",
|
|
114
114
|
"webpack": "^5.105.4",
|
|
115
|
-
"webpack-cli": "^7.0.
|
|
115
|
+
"webpack-cli": "^7.0.2",
|
|
116
116
|
"webpack-sources": "^3.3.4"
|
|
117
117
|
},
|
|
118
118
|
"devDependencies": {
|
|
@@ -130,11 +130,11 @@
|
|
|
130
130
|
"@types/postcss-url": "^10.0.4",
|
|
131
131
|
"@types/webpack-env": "^1.18.8",
|
|
132
132
|
"@types/webpack-sources": "^3.2.3",
|
|
133
|
-
"@typescript-eslint/parser": "^8.57.
|
|
133
|
+
"@typescript-eslint/parser": "^8.57.2",
|
|
134
134
|
"css-loader": "^7.1.4",
|
|
135
135
|
"cssnano": "^7.1.3",
|
|
136
136
|
"documentation-website": "^1.0.401",
|
|
137
|
-
"eslint": "^10.0
|
|
137
|
+
"eslint": "^10.1.0",
|
|
138
138
|
"eslint-config-google": "^0.14.0",
|
|
139
139
|
"eslint-plugin-jsdoc": "^62.8.0",
|
|
140
140
|
"favicons": "^7.2.0",
|
|
@@ -155,10 +155,10 @@
|
|
|
155
155
|
"postcss-url": "^10.1.3",
|
|
156
156
|
"shx": "^0.4.0",
|
|
157
157
|
"style-loader": "^4.0.0",
|
|
158
|
-
"stylelint": "^17.
|
|
158
|
+
"stylelint": "^17.5.0",
|
|
159
159
|
"stylelint-config-standard": "^40.0.0",
|
|
160
160
|
"stylelint-config-standard-scss": "^17.0.0",
|
|
161
|
-
"typescript-eslint": "^8.57.
|
|
161
|
+
"typescript-eslint": "^8.57.2",
|
|
162
162
|
"typescript-plugin-css-modules": "^5.2.0",
|
|
163
163
|
"workbox-webpack-plugin": "^7.4.0"
|
|
164
164
|
},
|