weboptimizer 2.0.1101 → 2.0.1110
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/configurator.d.ts +3 -2
- package/configurator.js +309 -283
- package/ejsLoader.js +8 -7
- package/helper.js +2 -2
- package/index.d.ts +3 -1
- package/index.js +138 -120
- package/package.json +53 -36
- package/stylelintConfigurator.js +2 -1
- package/type.d.ts +7 -1
- package/type.js +1 -1
- package/webpackConfigurator.js +173 -152
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "weboptimizer",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1110",
|
|
4
4
|
"description": "A generic web optimizer, (module) bundler and development environment.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"webpack",
|
|
@@ -136,7 +136,6 @@
|
|
|
136
136
|
"favicons": "*",
|
|
137
137
|
"favicons-webpack-plugin": "*",
|
|
138
138
|
"image-minimizer-webpack-plugin": "*",
|
|
139
|
-
"imagemin": "*",
|
|
140
139
|
"jest": "*",
|
|
141
140
|
"jsdoc": "*",
|
|
142
141
|
"mini-css-extract-plugin": "*",
|
|
@@ -490,6 +489,8 @@
|
|
|
490
489
|
"'**/plugins/*'",
|
|
491
490
|
"--ignore-pattern",
|
|
492
491
|
"'*.d.ts'",
|
|
492
|
+
"--resolve-plugins-relative-to",
|
|
493
|
+
".",
|
|
493
494
|
"'**/*.{jsx,ts,tsx}'"
|
|
494
495
|
],
|
|
495
496
|
"command": "eslint",
|
|
@@ -1002,35 +1003,37 @@
|
|
|
1002
1003
|
"image": {
|
|
1003
1004
|
"content": {
|
|
1004
1005
|
"minimizer": {
|
|
1005
|
-
"
|
|
1006
|
-
[
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1006
|
+
"options": {
|
|
1007
|
+
"plugins": [
|
|
1008
|
+
[
|
|
1009
|
+
"gifsicle",
|
|
1010
|
+
{
|
|
1011
|
+
"colors": 256,
|
|
1012
|
+
"interlanced": false,
|
|
1013
|
+
"optimizationLevel": 3
|
|
1014
|
+
}
|
|
1015
|
+
],
|
|
1016
|
+
[
|
|
1017
|
+
"jpegtran",
|
|
1018
|
+
{
|
|
1019
|
+
"arithmetic": true,
|
|
1020
|
+
"progressive": true
|
|
1021
|
+
}
|
|
1022
|
+
],
|
|
1023
|
+
[
|
|
1024
|
+
"optipng",
|
|
1025
|
+
{
|
|
1026
|
+
"optimizationLevel": 7
|
|
1027
|
+
}
|
|
1028
|
+
],
|
|
1029
|
+
[
|
|
1030
|
+
"svgo",
|
|
1031
|
+
{
|
|
1032
|
+
"plugins": []
|
|
1033
|
+
}
|
|
1034
|
+
]
|
|
1032
1035
|
]
|
|
1033
|
-
|
|
1036
|
+
}
|
|
1034
1037
|
},
|
|
1035
1038
|
"exclude": {
|
|
1036
1039
|
"__evaluate__": "self.debug || 2 < self.givenCommandLineArguments.length && self.givenCommandLineArguments[2] !== 'build' ? /.*/ : self.debug && console.warn(`Image compression disabled. Use configuration: \"{module:{optimizer:{image:{content:{exclude:undefined}}}}}\" to enable default image file including.`) || /.*/"
|
|
@@ -1038,11 +1041,7 @@
|
|
|
1038
1041
|
},
|
|
1039
1042
|
"loader": []
|
|
1040
1043
|
},
|
|
1041
|
-
"minimize": true
|
|
1042
|
-
"minimizer": {
|
|
1043
|
-
"#": "HTML-Templates shouldn't be transformed via terser to avoid html webpack plugin throwing to not get markup as intermediate result.",
|
|
1044
|
-
"__evaluate__": "[new (require('terser-webpack-plugin'))({exclude: /\\.html(?:\\.js)?(?:\\?.*)?$/, extractComments: false, parallel: true})]"
|
|
1045
|
-
}
|
|
1044
|
+
"minimize": true
|
|
1046
1045
|
},
|
|
1047
1046
|
"preprocessor": {
|
|
1048
1047
|
"cascadingStyleSheet": {
|
|
@@ -1357,6 +1356,24 @@
|
|
|
1357
1356
|
"__evaluate__": "self.files.compose.image ? path.resolve(self.path.source.asset.image, path.relative(self.path.target.asset.image, self.files.compose.image)) : null"
|
|
1358
1357
|
}
|
|
1359
1358
|
],
|
|
1359
|
+
"tidyUpGlobs": {
|
|
1360
|
+
"options": {
|
|
1361
|
+
"glob": {
|
|
1362
|
+
"ignore": [
|
|
1363
|
+
"node_modules/**/*.css.js",
|
|
1364
|
+
"**/node_modules/**/*.css.js"
|
|
1365
|
+
]
|
|
1366
|
+
}
|
|
1367
|
+
},
|
|
1368
|
+
"pattern": [
|
|
1369
|
+
{
|
|
1370
|
+
"__evaluate__": "path.resolve(self.path.target.base, '*.css.js')"
|
|
1371
|
+
},
|
|
1372
|
+
{
|
|
1373
|
+
"__evaluate__": "path.resolve(self.path.target.base, '**/*.css.js')"
|
|
1374
|
+
}
|
|
1375
|
+
]
|
|
1376
|
+
},
|
|
1360
1377
|
"tidyUpOnClear": [
|
|
1361
1378
|
{
|
|
1362
1379
|
"__evaluate__": "path.resolve(self.path.target.base, 'yarn-error.log')"
|
|
@@ -1634,7 +1651,7 @@
|
|
|
1634
1651
|
"files": {
|
|
1635
1652
|
"compose": {
|
|
1636
1653
|
"cascadingStyleSheet": {
|
|
1637
|
-
"__evaluate__": "self.debug && 2 < self.givenCommandLineArguments.length && ['serve', 'test:browser'].includes(self.givenCommandLineArguments[2]) ? null : `${path.resolve(self.path.target.asset.cascadingStyleSheet,
|
|
1654
|
+
"__evaluate__": "self.debug && 2 < self.givenCommandLineArguments.length && ['serve', 'test:browser'].includes(self.givenCommandLineArguments[2]) ? null : ({chunk: {name}}) => `${path.relative(self.path.target.base, path.resolve(self.path.target.asset.cascadingStyleSheet, `${path.basename(name, '.css')}${self.path.target.asset.cascadingStyleSheet === self.path.source.asset.cascadingStyleSheet ? '.compiled' : ''}.css`))}?${self.hashAlgorithm}=[chunkhash]`"
|
|
1638
1655
|
}
|
|
1639
1656
|
},
|
|
1640
1657
|
"defaultHTML": {
|
package/stylelintConfigurator.js
CHANGED
|
@@ -27,7 +27,8 @@ exports["default"] = void 0;
|
|
|
27
27
|
var _configurator = _interopRequireDefault(require("./configurator"));
|
|
28
28
|
|
|
29
29
|
// endregion
|
|
30
|
-
|
|
30
|
+
var configuration = (0, _configurator["default"])();
|
|
31
|
+
module.exports = configuration.stylelint;
|
|
31
32
|
var _default = module.exports; // region vim modline
|
|
32
33
|
// vim: set tabstop=4 shiftwidth=4 expandtab:
|
|
33
34
|
// vim: foldmethod=marker foldmarker=region,endregion:
|
package/type.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ import ImageMinimizerWebpackPlugin from 'image-minimizer-webpack-plugin';
|
|
|
8
8
|
import { JSDOM } from 'jsdom';
|
|
9
9
|
import MiniCSSExtractPlugin from 'mini-css-extract-plugin';
|
|
10
10
|
import { Options as RemoveDirectoryRecursivelyOptions } from 'rimraf';
|
|
11
|
+
import TerserWebpackPlugin from 'terser-webpack-plugin';
|
|
11
12
|
import { DefinePlugin as WebpackDefinePlugin, Configuration as BaseWebpackConfiguration, IgnorePlugin as WebpackIgnorePlugin, library as webpackLibrary, ModuleOptions as WebpackModuleOptions, RuleSetRule as WebpackRuleSetRule, RuleSetUseItem as WebpackRuleSetUseItem, WebpackOptionsNormalized } from 'webpack';
|
|
12
13
|
import OfflinePlugin, { CommonOptions as WorkboxCommonOptions, GenerateSWOptions as WorkboxGenerateSWOptions, InjectManifestOptions as WorkboxInjectManifestOptions } from 'workbox-webpack-plugin';
|
|
13
14
|
export interface Browser {
|
|
@@ -108,6 +109,10 @@ export interface PathConfiguration extends BasePathConfiguration {
|
|
|
108
109
|
context: string;
|
|
109
110
|
ignore: Array<string>;
|
|
110
111
|
tidyUp: Array<string>;
|
|
112
|
+
tidyUpGlobs: {
|
|
113
|
+
options: RemoveDirectoryRecursivelyOptions;
|
|
114
|
+
pattern: Array<string>;
|
|
115
|
+
};
|
|
111
116
|
tidyUpOnClear: Array<string>;
|
|
112
117
|
tidyUpOnClearGlobs: {
|
|
113
118
|
options: RemoveDirectoryRecursivelyOptions;
|
|
@@ -278,7 +283,7 @@ export interface ResolvedConfiguration {
|
|
|
278
283
|
files: {
|
|
279
284
|
additionalPaths: Array<string>;
|
|
280
285
|
compose: {
|
|
281
|
-
cascadingStyleSheet: string;
|
|
286
|
+
cascadingStyleSheet: string | ((_asset: unknown) => string);
|
|
282
287
|
image: string;
|
|
283
288
|
javaScript: string;
|
|
284
289
|
};
|
|
@@ -450,6 +455,7 @@ export declare type WebpackPlugins = Mapping<WebpackPlugin> & {
|
|
|
450
455
|
InjectManifest: typeof OfflinePlugin.InjectManifest;
|
|
451
456
|
};
|
|
452
457
|
MiniCSSExtract?: typeof MiniCSSExtractPlugin;
|
|
458
|
+
Terser?: typeof TerserWebpackPlugin;
|
|
453
459
|
};
|
|
454
460
|
export declare type WebpackResolveData = Parameters<WebpackIgnorePlugin['checkIgnore']>[0];
|
|
455
461
|
export declare type WebpackExtendedResolveData = WebpackResolveData & {
|