@cley_faye/boilerplate 4.2.1 → 4.2.3
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/lib/grunt/args.js
CHANGED
|
@@ -128,7 +128,7 @@ const getOptionsFromGruntCLI = (optionProvider, configDef) => {
|
|
|
128
128
|
result[keyName] = handleOptionDef(configDef[keyName], getFromOptionProvider(keyName, optionProvider));
|
|
129
129
|
}
|
|
130
130
|
catch (error) {
|
|
131
|
-
throw new Error(`CLI Argument "${(0, util_js_1.camelToKebab)(keyName)}": ${error}
|
|
131
|
+
throw new Error(`CLI Argument "${(0, util_js_1.camelToKebab)(keyName)}": ${error}`, { cause: error });
|
|
132
132
|
}
|
|
133
133
|
});
|
|
134
134
|
return result;
|
|
@@ -75,7 +75,7 @@ const createDynamicTask = (gruntConfig, targetName, pugOptions, pugTask, require
|
|
|
75
75
|
// eslint-disable-next-line promise/prefer-await-to-then
|
|
76
76
|
return pugOptions.dynamicData().then((extraData) => {
|
|
77
77
|
// eslint-disable-next-line promise/always-return
|
|
78
|
-
pugTask.options
|
|
78
|
+
pugTask.options ??= {};
|
|
79
79
|
pugTask.options.data = {
|
|
80
80
|
...pugTask.options.data,
|
|
81
81
|
...extraData,
|
|
@@ -76,7 +76,6 @@ const handledExtensions = [".scss", ".sass"];
|
|
|
76
76
|
* List of tasks added to the grunt configuration
|
|
77
77
|
*/
|
|
78
78
|
const handle = (gruntConfig, targetName, sassOptions) => {
|
|
79
|
-
var _a;
|
|
80
79
|
const handledFiles = [
|
|
81
80
|
...handledExtensions.map((ext) => `**/*${ext}`),
|
|
82
81
|
...handledExtensions.map((ext) => `!**/_*${ext}`),
|
|
@@ -95,7 +94,7 @@ const handle = (gruntConfig, targetName, sassOptions) => {
|
|
|
95
94
|
],
|
|
96
95
|
};
|
|
97
96
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
98
|
-
|
|
97
|
+
sassTask.options.implementation ??= require("sass");
|
|
99
98
|
const requiredTasks = [util.insertTask(gruntConfig, "sass", targetName, sassTask)];
|
|
100
99
|
const watchTasks = [
|
|
101
100
|
{
|
|
@@ -64,7 +64,6 @@ const node_fs_1 = require("node:fs");
|
|
|
64
64
|
const path_1 = require("path");
|
|
65
65
|
const webpack_bundle_analyzer_1 = require("webpack-bundle-analyzer");
|
|
66
66
|
const util = __importStar(require("./util.js"));
|
|
67
|
-
const defaultCoreJS = 3;
|
|
68
67
|
const defaultLoadersDefine = (options) => [
|
|
69
68
|
"transform-define",
|
|
70
69
|
{
|
|
@@ -73,14 +72,10 @@ const defaultLoadersDefine = (options) => [
|
|
|
73
72
|
...options.defines,
|
|
74
73
|
},
|
|
75
74
|
];
|
|
76
|
-
const defaultLoadersPresetEnv = (
|
|
75
|
+
const defaultLoadersPresetEnv = () => [
|
|
77
76
|
"@babel/preset-env",
|
|
78
77
|
{
|
|
79
|
-
corejs: options.babel?.corejs ?? defaultCoreJS,
|
|
80
78
|
modules: false,
|
|
81
|
-
targets: options.babel?.targets ??
|
|
82
|
-
"> 2% and not dead, last 2 safari version, last 2 firefox version, last 2 chrome version, last 2 edge version, Firefox ESR",
|
|
83
|
-
useBuiltIns: "usage",
|
|
84
79
|
},
|
|
85
80
|
];
|
|
86
81
|
const defaultLoadersReact = (options) => [
|
|
@@ -102,13 +97,20 @@ const webpackLoadersDefault = (options) => {
|
|
|
102
97
|
options: {
|
|
103
98
|
cacheDirectory: true,
|
|
104
99
|
plugins: [
|
|
100
|
+
[
|
|
101
|
+
"polyfill-corejs3",
|
|
102
|
+
{
|
|
103
|
+
"method": "usage-global",
|
|
104
|
+
"version": "3.51.0",
|
|
105
|
+
},
|
|
106
|
+
],
|
|
105
107
|
defaultLoadersDefine(options),
|
|
106
108
|
...(options.babel?.plugins ?? [
|
|
107
|
-
"@babel/plugin-syntax-import-attributes",
|
|
108
109
|
"@babel/plugin-transform-runtime",
|
|
109
110
|
]),
|
|
110
111
|
],
|
|
111
|
-
presets: [defaultLoadersPresetEnv(
|
|
112
|
+
presets: [defaultLoadersPresetEnv(), defaultLoadersReact(options)],
|
|
113
|
+
targets: "defaults",
|
|
112
114
|
},
|
|
113
115
|
},
|
|
114
116
|
},
|
|
@@ -183,7 +185,7 @@ const registerTasks = (gruntConfig, targetName, webpackConfig) => {
|
|
|
183
185
|
const computeWebpackResolve = (webpackOptions) => {
|
|
184
186
|
const res = { ...webpackOptions.resolve };
|
|
185
187
|
if (webpackOptions.typescript) {
|
|
186
|
-
res.extensionAlias
|
|
188
|
+
res.extensionAlias ??= {};
|
|
187
189
|
res.extensionAlias[".js"] = [".ts", ".tsx", ".js", ".jsx"];
|
|
188
190
|
res.extensionAlias[".mjs"] = [".mts", ".mtsx", ".mjs", ".mjsx"];
|
|
189
191
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cley_faye/boilerplate",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "v4.2.3",
|
|
4
4
|
"description": "Boilerplate code generator for generic projects",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -21,29 +21,29 @@
|
|
|
21
21
|
},
|
|
22
22
|
"homepage": "https://github.com/CleyFaye/boilerplate#readme",
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@babel/core": "^
|
|
25
|
-
"@babel/plugin-transform-runtime": "^
|
|
26
|
-
"@babel/preset-env": "^
|
|
27
|
-
"@babel/preset-react": "^
|
|
28
|
-
"@eslint/js": "^
|
|
29
|
-
"@keeex/eslint-config": "^2.
|
|
24
|
+
"@babel/core": "^8.1.0",
|
|
25
|
+
"@babel/plugin-transform-runtime": "^8.0.6",
|
|
26
|
+
"@babel/preset-env": "^8.0.7",
|
|
27
|
+
"@babel/preset-react": "^8.0.1",
|
|
28
|
+
"@eslint/js": "^10.0.1",
|
|
29
|
+
"@keeex/eslint-config": "^2.8.2",
|
|
30
30
|
"@types/express": "^5.0.6",
|
|
31
31
|
"@types/grunt": "^0.4.32",
|
|
32
32
|
"@types/http-errors": "^2.0.5",
|
|
33
33
|
"@types/minimist": "^1.2.5",
|
|
34
|
-
"@types/node": "^24.
|
|
34
|
+
"@types/node": "^24.19.2",
|
|
35
35
|
"@types/webpack-bundle-analyzer": "^4.7.0",
|
|
36
36
|
"babel-loader": "^10.1.1",
|
|
37
37
|
"babel-plugin-transform-define": "^2.1.4",
|
|
38
|
-
"core-js": "^3.
|
|
39
|
-
"eslint": "^
|
|
40
|
-
"eslint-import-resolver-typescript": "^4.4.
|
|
41
|
-
"eslint-plugin-import-x": "^4.
|
|
38
|
+
"core-js": "^3.51.0",
|
|
39
|
+
"eslint": "^10.14.0",
|
|
40
|
+
"eslint-import-resolver-typescript": "^4.4.5",
|
|
41
|
+
"eslint-plugin-import-x": "^4.17.1",
|
|
42
42
|
"eslint-plugin-promise": "^7.3.0",
|
|
43
|
-
"eslint-plugin-tsdoc": "^0.5.
|
|
44
|
-
"express": "^5.
|
|
45
|
-
"globals": "^17.
|
|
46
|
-
"grunt": "^1.6.
|
|
43
|
+
"eslint-plugin-tsdoc": "^0.5.4",
|
|
44
|
+
"express": "^5.3.0",
|
|
45
|
+
"globals": "^17.14.0",
|
|
46
|
+
"grunt": "^1.6.3",
|
|
47
47
|
"grunt-banner": "^0.6.0",
|
|
48
48
|
"grunt-contrib-clean": "^2.0.1",
|
|
49
49
|
"grunt-contrib-copy": "^1.0.0",
|
|
@@ -51,23 +51,23 @@
|
|
|
51
51
|
"grunt-contrib-watch": "^1.1.0",
|
|
52
52
|
"grunt-run": "^0.8.1",
|
|
53
53
|
"grunt-sass": "^4.1.0",
|
|
54
|
-
"grunt-webpack": "^
|
|
54
|
+
"grunt-webpack": "^8.0.0",
|
|
55
55
|
"load-grunt-tasks": "^5.1.0",
|
|
56
56
|
"logform": "^2.7.0",
|
|
57
57
|
"minimist": "^1.2.8",
|
|
58
|
-
"prettier": "^3.
|
|
59
|
-
"sass": "^1.
|
|
60
|
-
"ts-loader": "^9.
|
|
58
|
+
"prettier": "^3.9.10",
|
|
59
|
+
"sass": "^1.107.1",
|
|
60
|
+
"ts-loader": "^9.6.2",
|
|
61
61
|
"typescript": "^6.0.3",
|
|
62
|
-
"typescript-eslint": "^8.
|
|
63
|
-
"webpack": "^5.
|
|
64
|
-
"webpack-bundle-analyzer": "^5.
|
|
62
|
+
"typescript-eslint": "^8.72.1",
|
|
63
|
+
"webpack": "^5.112.2",
|
|
64
|
+
"webpack-bundle-analyzer": "^5.4.1"
|
|
65
65
|
},
|
|
66
66
|
"peerDependencies": {
|
|
67
|
-
"@babel/core": "
|
|
68
|
-
"@babel/plugin-transform-runtime": "
|
|
69
|
-
"@babel/preset-env": "7
|
|
70
|
-
"@babel/preset-react": "
|
|
67
|
+
"@babel/core": "^8.1.0",
|
|
68
|
+
"@babel/plugin-transform-runtime": "^8.0.6",
|
|
69
|
+
"@babel/preset-env": "^8.0.7",
|
|
70
|
+
"@babel/preset-react": "^8.0.1",
|
|
71
71
|
"babel-loader": "9.x || 10.x",
|
|
72
72
|
"babel-plugin-transform-define": "2.x",
|
|
73
73
|
"core-js": "3.x",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"grunt-contrib-pug": "3.x",
|
|
78
78
|
"grunt-contrib-watch": "1.x",
|
|
79
79
|
"grunt-sass": "3.x||4.x",
|
|
80
|
-
"grunt-webpack": "
|
|
80
|
+
"grunt-webpack": "^8.0.0",
|
|
81
81
|
"minimist": "^1.2.8",
|
|
82
82
|
"sass": "1.x",
|
|
83
83
|
"ts-loader": "^9.4.1",
|
|
@@ -143,5 +143,10 @@
|
|
|
143
143
|
"/lib/**/*.js",
|
|
144
144
|
"/lib/**/*.d.ts",
|
|
145
145
|
"/grunt.js"
|
|
146
|
-
]
|
|
146
|
+
],
|
|
147
|
+
"allowScripts": {
|
|
148
|
+
"@parcel/watcher": false,
|
|
149
|
+
"core-js": false,
|
|
150
|
+
"unrs-resolver": false
|
|
151
|
+
}
|
|
147
152
|
}
|