@cley_faye/boilerplate 3.0.5 → 3.2.1
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
CHANGED
|
@@ -27,12 +27,11 @@ For webapp building:
|
|
|
27
27
|
- babel-plugin-transform-define
|
|
28
28
|
- core-js
|
|
29
29
|
- @babel/plugin-transform-runtime
|
|
30
|
-
- grunt-contrib-imagemin
|
|
31
30
|
- grunt-contrib-pug
|
|
32
31
|
- grunt-contrib-copy
|
|
33
32
|
- grunt-contrib-watch
|
|
34
33
|
- grunt-sass
|
|
35
|
-
-
|
|
34
|
+
- sass
|
|
36
35
|
- grunt-webpack
|
|
37
36
|
- grunt
|
|
38
37
|
|
|
@@ -155,6 +154,7 @@ The webpack options support a host of properties:
|
|
|
155
154
|
- babelPlugins: array of plugins for Babel
|
|
156
155
|
- mode: The build mode. "development", "production" or "none"
|
|
157
156
|
- defines: a record of value to define using Babel transform-define
|
|
157
|
+
- resolve: a custom "resolve" object for webpack config
|
|
158
158
|
|
|
159
159
|
### SASS
|
|
160
160
|
All `.sass` and `.scss` files in the webapp directory will be processed as `.css` files in the
|
|
@@ -18,10 +18,10 @@ export interface ImageOptions extends BaseOptions {
|
|
|
18
18
|
* Options for the image task configuration.
|
|
19
19
|
*
|
|
20
20
|
* @param [imageOptions.options]
|
|
21
|
-
* Options to pass to
|
|
21
|
+
* Options to pass to @cley_faye/imagemin-lite.
|
|
22
22
|
*
|
|
23
23
|
* @param [imageOptions.sourcePath]
|
|
24
|
-
* Path where the
|
|
24
|
+
* Path where the source images can be found. Subdirectories will be searched.
|
|
25
25
|
* Default to "webres/<targetName>"
|
|
26
26
|
*
|
|
27
27
|
* @param [imageOptions.outputPath]
|
|
@@ -47,10 +47,10 @@ const handledExtensions = [
|
|
|
47
47
|
* Options for the image task configuration.
|
|
48
48
|
*
|
|
49
49
|
* @param [imageOptions.options]
|
|
50
|
-
* Options to pass to
|
|
50
|
+
* Options to pass to @cley_faye/imagemin-lite.
|
|
51
51
|
*
|
|
52
52
|
* @param [imageOptions.sourcePath]
|
|
53
|
-
* Path where the
|
|
53
|
+
* Path where the source images can be found. Subdirectories will be searched.
|
|
54
54
|
* Default to "webres/<targetName>"
|
|
55
55
|
*
|
|
56
56
|
* @param [imageOptions.outputPath]
|
|
@@ -63,6 +63,7 @@ const handledExtensions = [
|
|
|
63
63
|
*/
|
|
64
64
|
const handle = (gruntConfig, targetName, imageOptions) => {
|
|
65
65
|
const handledFiles = handledExtensions.map(ext => `**/*${ext}`);
|
|
66
|
+
// TODO use @cley_faye/imagemin-lite once it exists
|
|
66
67
|
const newImageTask = {
|
|
67
68
|
options: imageOptions.options,
|
|
68
69
|
files: [
|
|
@@ -75,7 +76,7 @@ const handle = (gruntConfig, targetName, imageOptions) => {
|
|
|
75
76
|
],
|
|
76
77
|
};
|
|
77
78
|
const requiredTasks = [
|
|
78
|
-
(0, util_js_1.insertTask)(gruntConfig, "
|
|
79
|
+
(0, util_js_1.insertTask)(gruntConfig, "copy", `${targetName}_image`, newImageTask),
|
|
79
80
|
];
|
|
80
81
|
const watchTasks = [
|
|
81
82
|
{
|
|
@@ -45,6 +45,7 @@ export interface WebpackOptions extends BaseOptions {
|
|
|
45
45
|
plugins?: Array<Record<string, unknown>>;
|
|
46
46
|
babelPlugins?: Array<Record<string, unknown>>;
|
|
47
47
|
defines?: Record<string, string>;
|
|
48
|
+
resolve?: unknown;
|
|
48
49
|
}
|
|
49
50
|
/** Add a webpack task for the reactApp recipe
|
|
50
51
|
*
|
|
@@ -221,6 +221,7 @@ const handle = (gruntConfig, targetName, webpackOptions) => {
|
|
|
221
221
|
eslintPlugin(),
|
|
222
222
|
...webpackOptions.plugins ?? [],
|
|
223
223
|
],
|
|
224
|
+
resolve: webpackOptions.resolve,
|
|
224
225
|
};
|
|
225
226
|
// Special case: I'm not sure I can move options in the task-specific part of
|
|
226
227
|
// the configuration, so I add it at the toplevel of the "webpack" task.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cley_faye/boilerplate",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.1",
|
|
4
4
|
"description": "Boilerplate code generator for generic projects",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -17,16 +17,16 @@
|
|
|
17
17
|
},
|
|
18
18
|
"homepage": "https://github.com/CleyFaye/boilerplate#readme",
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@keeex/eslint-config": "^1.
|
|
20
|
+
"@keeex/eslint-config": "^1.5.9",
|
|
21
21
|
"@types/express": "^4.17.11",
|
|
22
22
|
"@types/grunt": "^0.4.25",
|
|
23
23
|
"@types/http-errors": "^1.8.0",
|
|
24
24
|
"@types/node": "^16.0.0",
|
|
25
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
26
|
-
"@typescript-eslint/parser": "^
|
|
25
|
+
"@typescript-eslint/eslint-plugin": "^5.3.1",
|
|
26
|
+
"@typescript-eslint/parser": "^5.3.1",
|
|
27
27
|
"eslint": "^7.20.0",
|
|
28
|
-
"eslint-plugin-promise": "^5.1.
|
|
29
|
-
"eslint-webpack-plugin": "^
|
|
28
|
+
"eslint-plugin-promise": "^5.1.1",
|
|
29
|
+
"eslint-webpack-plugin": "^3.0.1",
|
|
30
30
|
"express-winston": "^4.0.5",
|
|
31
31
|
"grunt": "^1.4.1",
|
|
32
32
|
"grunt-banner": "^0.6.0",
|
|
@@ -44,16 +44,15 @@
|
|
|
44
44
|
"babel-loader": "8.x",
|
|
45
45
|
"babel-plugin-transform-define": "2.x",
|
|
46
46
|
"core-js": "3.x",
|
|
47
|
-
"eslint-webpack-plugin": "
|
|
47
|
+
"eslint-webpack-plugin": "^3.0.1",
|
|
48
48
|
"express": "4.x",
|
|
49
49
|
"express-winston": "4.x",
|
|
50
50
|
"grunt": "1.x",
|
|
51
51
|
"grunt-contrib-copy": "1.x",
|
|
52
|
-
"grunt-contrib-imagemin": "4.x",
|
|
53
52
|
"grunt-contrib-pug": "3.x",
|
|
54
53
|
"grunt-contrib-watch": "1.x",
|
|
55
54
|
"grunt-sass": "3.x",
|
|
56
|
-
"grunt-webpack": "
|
|
55
|
+
"grunt-webpack": "5.x",
|
|
57
56
|
"sass": "1.x",
|
|
58
57
|
"winston": "3.x"
|
|
59
58
|
},
|
|
@@ -79,9 +78,6 @@
|
|
|
79
78
|
"grunt-contrib-pug": {
|
|
80
79
|
"optional": true
|
|
81
80
|
},
|
|
82
|
-
"grunt-contrib-imagemin": {
|
|
83
|
-
"optional": true
|
|
84
|
-
},
|
|
85
81
|
"@babel/plugin-transform-runtime": {
|
|
86
82
|
"optional": true
|
|
87
83
|
},
|