@cley_faye/boilerplate 3.21.1 → 3.21.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/README.md +0 -1
- package/bin/serve_spa.js +1 -1
- package/lib/express.d.ts +1 -3
- package/lib/grunt/reactapp/webpack.d.ts +2 -2
- package/lib/grunt/reactapp/webpack.js +2 -8
- package/lib/grunt/reactapp.d.ts +0 -1
- package/lib/grunt/reactapp.js +1 -1
- package/package.json +17 -22
package/README.md
CHANGED
package/bin/serve_spa.js
CHANGED
package/lib/express.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/// <reference types="express-serve-static-core" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
1
|
import { Server } from "net";
|
|
4
2
|
import express from "express";
|
|
5
3
|
import winston from "winston";
|
|
@@ -112,7 +110,7 @@ export declare const setViewEngine: (app: express.Express, viewEngine: string, v
|
|
|
112
110
|
* If the function returns "true", it prevent the process from stopping.
|
|
113
111
|
* Otherwise `process.exit()` is called.
|
|
114
112
|
*/
|
|
115
|
-
type ShutdownFunction = () => Promise<boolean> | boolean | undefined;
|
|
113
|
+
type ShutdownFunction = () => Promise<boolean | undefined> | boolean | undefined;
|
|
116
114
|
export interface StartDefinition {
|
|
117
115
|
app: express.Application;
|
|
118
116
|
/** @deprecated use listenInterface instead */
|
|
@@ -14,7 +14,7 @@ export interface WebpackLoadersOptions {
|
|
|
14
14
|
}
|
|
15
15
|
/** Build the default webpack loaders list.
|
|
16
16
|
*
|
|
17
|
-
* Uses babel
|
|
17
|
+
* Uses babel. Some options can be customized here.
|
|
18
18
|
*
|
|
19
19
|
* @param [options]
|
|
20
20
|
* @param [options.development]
|
|
@@ -93,7 +93,7 @@ export interface WebpackOptions extends BaseOptions {
|
|
|
93
93
|
*
|
|
94
94
|
* @param [webpackOptions.loaders]
|
|
95
95
|
* Configuration for webpack loaders. See webpack doc about module.rules.
|
|
96
|
-
* Defaults to using babel with React configuration
|
|
96
|
+
* Defaults to using babel with React configuration.
|
|
97
97
|
* To customize the default behavior build an object with
|
|
98
98
|
* webpackLoadersDefault().
|
|
99
99
|
*
|
|
@@ -25,18 +25,13 @@
|
|
|
25
25
|
*
|
|
26
26
|
*/
|
|
27
27
|
"use strict";
|
|
28
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
29
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
|
-
};
|
|
31
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
29
|
exports.handle = exports.webpackLoadersDefault = void 0;
|
|
33
30
|
const path_1 = require("path");
|
|
34
31
|
const node_fs_1 = require("node:fs");
|
|
35
|
-
const eslint_webpack_plugin_1 = __importDefault(require("eslint-webpack-plugin"));
|
|
36
32
|
const webpack_bundle_analyzer_1 = require("webpack-bundle-analyzer");
|
|
37
33
|
const util_js_1 = require("./util.js");
|
|
38
34
|
const defaultCoreJS = 3;
|
|
39
|
-
const eslintPlugin = () => new eslint_webpack_plugin_1.default({ cache: true });
|
|
40
35
|
const defaultLoadersDefine = (options) => [
|
|
41
36
|
"transform-define",
|
|
42
37
|
{
|
|
@@ -62,7 +57,7 @@ const defaultLoadersReact = (options) => [
|
|
|
62
57
|
];
|
|
63
58
|
/** Build the default webpack loaders list.
|
|
64
59
|
*
|
|
65
|
-
* Uses babel
|
|
60
|
+
* Uses babel. Some options can be customized here.
|
|
66
61
|
*
|
|
67
62
|
* @param [options]
|
|
68
63
|
* @param [options.development]
|
|
@@ -181,7 +176,6 @@ const computeWebpackResolve = (webpackOptions) => {
|
|
|
181
176
|
};
|
|
182
177
|
const getWebpackPlugins = (webpackOptions) => {
|
|
183
178
|
const plugins = [
|
|
184
|
-
eslintPlugin(),
|
|
185
179
|
...webpackOptions.plugins ?? [],
|
|
186
180
|
];
|
|
187
181
|
if (webpackOptions.generateReport) {
|
|
@@ -231,7 +225,7 @@ const getWebpackPlugins = (webpackOptions) => {
|
|
|
231
225
|
*
|
|
232
226
|
* @param [webpackOptions.loaders]
|
|
233
227
|
* Configuration for webpack loaders. See webpack doc about module.rules.
|
|
234
|
-
* Defaults to using babel with React configuration
|
|
228
|
+
* Defaults to using babel with React configuration.
|
|
235
229
|
* To customize the default behavior build an object with
|
|
236
230
|
* webpackLoadersDefault().
|
|
237
231
|
*
|
package/lib/grunt/reactapp.d.ts
CHANGED
package/lib/grunt/reactapp.js
CHANGED
|
@@ -49,7 +49,7 @@ var HandlerType;
|
|
|
49
49
|
HandlerType["COPY"] = "copy";
|
|
50
50
|
})(HandlerType || (exports.HandlerType = HandlerType = {}));
|
|
51
51
|
const gatherTasks = (handlers, gruntConfig, targetName, options) => Object.keys(handlers)
|
|
52
|
-
.reduce((acc, cur) => acc.concat((options?.[cur] && options[cur]
|
|
52
|
+
.reduce((acc, cur) => acc.concat((options?.[cur] && options[cur].disabled)
|
|
53
53
|
? []
|
|
54
54
|
: handlers[cur](gruntConfig, targetName, (options?.[cur]) ?? {})), []);
|
|
55
55
|
const mergeResults = (tasksResults) => tasksResults.reduce((acc, cur) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cley_faye/boilerplate",
|
|
3
|
-
"version": "3.21.
|
|
3
|
+
"version": "3.21.3",
|
|
4
4
|
"description": "Boilerplate code generator for generic projects",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -21,30 +21,29 @@
|
|
|
21
21
|
},
|
|
22
22
|
"homepage": "https://github.com/CleyFaye/boilerplate#readme",
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@keeex/eslint-config": "^1.
|
|
25
|
-
"@types/express": "^4.17.
|
|
26
|
-
"@types/grunt": "^0.4.
|
|
27
|
-
"@types/http-errors": "^2.0.
|
|
28
|
-
"@types/minimist": "^1.2.
|
|
29
|
-
"@types/node": "^18.
|
|
30
|
-
"@types/webpack-bundle-analyzer": "^4.
|
|
31
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
32
|
-
"@typescript-eslint/parser": "^6.
|
|
33
|
-
"eslint": "^8.
|
|
24
|
+
"@keeex/eslint-config": "^1.12.6",
|
|
25
|
+
"@types/express": "^4.17.21",
|
|
26
|
+
"@types/grunt": "^0.4.31",
|
|
27
|
+
"@types/http-errors": "^2.0.4",
|
|
28
|
+
"@types/minimist": "^1.2.5",
|
|
29
|
+
"@types/node": "^18.19.55",
|
|
30
|
+
"@types/webpack-bundle-analyzer": "^4.7.0",
|
|
31
|
+
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
|
32
|
+
"@typescript-eslint/parser": "^6.21.0",
|
|
33
|
+
"eslint": "^8.57.1",
|
|
34
34
|
"eslint-plugin-deprecation": "^2.0.0",
|
|
35
|
-
"eslint-plugin-
|
|
36
|
-
"eslint-plugin-promise": "^6.
|
|
37
|
-
"eslint-webpack-plugin": "^4.0.1",
|
|
35
|
+
"eslint-plugin-i": "^2.29.1",
|
|
36
|
+
"eslint-plugin-promise": "^6.6.0",
|
|
38
37
|
"express-winston": "^4.2.0",
|
|
39
38
|
"grunt": "^1.6.1",
|
|
40
39
|
"grunt-banner": "^0.6.0",
|
|
41
40
|
"grunt-contrib-clean": "^2.0.1",
|
|
42
41
|
"grunt-run": "^0.8.1",
|
|
43
42
|
"load-grunt-tasks": "^5.1.0",
|
|
44
|
-
"logform": "^2.
|
|
45
|
-
"typescript": "^5.
|
|
46
|
-
"webpack": "^5.
|
|
47
|
-
"winston": "^3.
|
|
43
|
+
"logform": "^2.6.1",
|
|
44
|
+
"typescript": "^5.6.3",
|
|
45
|
+
"webpack": "^5.95.0",
|
|
46
|
+
"winston": "^3.15.0"
|
|
48
47
|
},
|
|
49
48
|
"peerDependencies": {
|
|
50
49
|
"@babel/core": "7.x",
|
|
@@ -54,7 +53,6 @@
|
|
|
54
53
|
"babel-loader": "9.x",
|
|
55
54
|
"babel-plugin-transform-define": "2.x",
|
|
56
55
|
"core-js": "3.x",
|
|
57
|
-
"eslint-webpack-plugin": "^4.0.0",
|
|
58
56
|
"express": "4.x",
|
|
59
57
|
"express-winston": "4.x",
|
|
60
58
|
"grunt": "1.x",
|
|
@@ -91,9 +89,6 @@
|
|
|
91
89
|
"core-js": {
|
|
92
90
|
"optional": true
|
|
93
91
|
},
|
|
94
|
-
"eslint-webpack-plugin": {
|
|
95
|
-
"optional": true
|
|
96
|
-
},
|
|
97
92
|
"express": {
|
|
98
93
|
"optional": true
|
|
99
94
|
},
|