@henderea/static-site-builder 1.10.6 → 1.10.8
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/bin/static-site-builder.js +27 -27
- package/config/env.js +2 -0
- package/package.json +14 -15
- package/utils/formatWebpackMessages.js +1 -2
|
@@ -30,37 +30,37 @@ const script = scriptIndex === -1 ? args[0] : args[scriptIndex];
|
|
|
30
30
|
const nodeArgs = scriptIndex > 0 ? args.slice(0, scriptIndex) : [];
|
|
31
31
|
|
|
32
32
|
switch(script) {
|
|
33
|
-
case 'build':
|
|
34
|
-
case 'watch': {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
33
|
+
case 'build':
|
|
34
|
+
case 'watch': {
|
|
35
|
+
const nodeEnv = script == 'build' ? 'production' : 'development';
|
|
36
|
+
const result = spawnSync(
|
|
37
|
+
'node',
|
|
38
|
+
nodeArgs
|
|
39
|
+
.concat(require.resolve('../scripts/' + script))
|
|
40
|
+
.concat(args.slice(scriptIndex + 1)),
|
|
41
|
+
{ stdio: 'inherit', env: _.extend({}, process.env, { NODE_ENV: nodeEnv, BABEL_ENV: nodeEnv }) }
|
|
42
|
+
);
|
|
43
|
+
if(result.signal) {
|
|
44
|
+
if(result.signal === 'SIGKILL') {
|
|
45
|
+
console.log(
|
|
46
|
+
'The build failed because the process exited too early. ' +
|
|
47
47
|
'This probably means the system ran out of memory or someone called ' +
|
|
48
48
|
'`kill -9` on the process.'
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
);
|
|
50
|
+
} else if(result.signal === 'SIGTERM') {
|
|
51
|
+
console.log(
|
|
52
|
+
'The build failed because the process exited too early. ' +
|
|
53
53
|
'Someone might have called `kill` or `killall`, or the system could ' +
|
|
54
54
|
'be shutting down.'
|
|
55
|
-
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
process.exit(1);
|
|
56
58
|
}
|
|
57
|
-
process.exit(
|
|
59
|
+
process.exit(result.status);
|
|
58
60
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
console.log('Perhaps you need to update static-site-builder?');
|
|
65
|
-
break;
|
|
61
|
+
// eslint-disable-next-line no-fallthrough
|
|
62
|
+
default:
|
|
63
|
+
console.log('Unknown script "' + script + '".');
|
|
64
|
+
console.log('Perhaps you need to update static-site-builder?');
|
|
65
|
+
break;
|
|
66
66
|
}
|
package/config/env.js
CHANGED
|
@@ -83,6 +83,8 @@ export default function getClientEnvironment(publicUrl) {
|
|
|
83
83
|
// This should only be used as an escape hatch. Normally you would put
|
|
84
84
|
// images into the `src` and `import` them in code to get their paths.
|
|
85
85
|
PUBLIC_URL: publicUrl,
|
|
86
|
+
// Build Time
|
|
87
|
+
BUILD_TIME: Date.now() + '',
|
|
86
88
|
}
|
|
87
89
|
);
|
|
88
90
|
// Stringify all values so we can feed into Webpack DefinePlugin
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@henderea/static-site-builder",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.8",
|
|
4
4
|
"description": "A static site builder",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": "henderea/static-site-builder.git",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"type": "module",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@babel/core": "^7.
|
|
28
|
+
"@babel/core": "^7.21.3",
|
|
29
29
|
"babel-core": "^6.26.3",
|
|
30
30
|
"babel-loader": "^9.1.2",
|
|
31
31
|
"case-sensitive-paths-webpack-plugin": "^2.4.0",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"css-loader": "^6.7.3",
|
|
36
36
|
"dotenv": "^16.0.3",
|
|
37
37
|
"dotenv-expand": "^10.0.0",
|
|
38
|
-
"ejs": "^3.1.
|
|
39
|
-
"eslint": "^8.
|
|
38
|
+
"ejs": "^3.1.9",
|
|
39
|
+
"eslint": "^8.36.0",
|
|
40
40
|
"file-loader": "^6.2.0",
|
|
41
41
|
"filesize": "^10.0.6",
|
|
42
42
|
"find-pkg": "^2.0.0",
|
|
@@ -45,29 +45,28 @@
|
|
|
45
45
|
"handlebars": "^4.7.7",
|
|
46
46
|
"html-webpack-plugin": "^5.5.0",
|
|
47
47
|
"lodash": "^4.17.21",
|
|
48
|
-
"mini-css-extract-plugin": "^2.7.
|
|
48
|
+
"mini-css-extract-plugin": "^2.7.5",
|
|
49
49
|
"moment": "^2.29.4",
|
|
50
50
|
"moment-locales-webpack-plugin": "^1.2.0",
|
|
51
51
|
"node-sass": "^8.0.0",
|
|
52
|
-
"postcss-loader": "^7.0
|
|
52
|
+
"postcss-loader": "^7.1.0",
|
|
53
53
|
"postcss-preset-env": "^8.0.1",
|
|
54
54
|
"recursive-readdir": "^2.2.3",
|
|
55
|
-
"sass-loader": "^13.2.
|
|
55
|
+
"sass-loader": "^13.2.1",
|
|
56
56
|
"strip-ansi": "^7.0.1",
|
|
57
|
-
"style-loader": "^3.3.
|
|
57
|
+
"style-loader": "^3.3.2",
|
|
58
58
|
"thread-loader": "^3.0.4",
|
|
59
59
|
"ts-loader": "^9.4.2",
|
|
60
|
-
"tsconfig-paths-webpack-plugin": "^4.0.
|
|
61
|
-
"typescript": "^
|
|
62
|
-
"webpack": "^5.
|
|
60
|
+
"tsconfig-paths-webpack-plugin": "^4.0.1",
|
|
61
|
+
"typescript": "^5.0.2",
|
|
62
|
+
"webpack": "^5.76.2",
|
|
63
63
|
"webpack-manifest-plugin": "^5.0.0",
|
|
64
64
|
"workbox-webpack-plugin": "^6.5.4"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@
|
|
68
|
-
"@typescript-eslint/
|
|
69
|
-
"
|
|
70
|
-
"eslint-config-henderea": "1.1.3",
|
|
67
|
+
"@typescript-eslint/eslint-plugin": "^5.55.0",
|
|
68
|
+
"@typescript-eslint/parser": "^5.55.0",
|
|
69
|
+
"eslint-config-henderea": "1.1.5",
|
|
71
70
|
"eslint-plugin-import": "^2.27.5"
|
|
72
71
|
},
|
|
73
72
|
"eslintConfig": {
|
|
@@ -23,8 +23,7 @@ function isLikelyASyntaxError(message) {
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
// Cleans up webpack error messages.
|
|
26
|
-
|
|
27
|
-
function formatMessage(message, isError) {
|
|
26
|
+
function formatMessage(message, _isError) {
|
|
28
27
|
if(_.isPlainObject(message)) { message = message.message || ''; }
|
|
29
28
|
var lines = message.split('\n');
|
|
30
29
|
|