wirejs-scripts 2.0.3 → 2.0.5
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/configs/webpack.config.js +24 -0
- package/package.json +33 -33
|
@@ -62,8 +62,16 @@ const SSG = {
|
|
|
62
62
|
return '';
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
+
const _require = require;
|
|
66
|
+
const WD = path.dirname(_path);
|
|
67
|
+
|
|
65
68
|
let body;
|
|
66
69
|
try {
|
|
70
|
+
require = (requirePath) => {
|
|
71
|
+
const absolutePath = _require.resolve(requirePath, {paths: [WD]});
|
|
72
|
+
return _require(absolutePath);
|
|
73
|
+
}
|
|
74
|
+
|
|
67
75
|
if (_path.endsWith('.md')) {
|
|
68
76
|
let isInCodeBlock = false;
|
|
69
77
|
const escapedMarkdown = content.toString().split(/\n/)
|
|
@@ -89,6 +97,8 @@ const SSG = {
|
|
|
89
97
|
} catch (err) {
|
|
90
98
|
console.error(`Could not parse page ${_path}`, err);
|
|
91
99
|
throw err;
|
|
100
|
+
} finally {
|
|
101
|
+
require = _require;
|
|
92
102
|
}
|
|
93
103
|
|
|
94
104
|
const metatags = Object.entries(_meta).map(([tag, content]) => {
|
|
@@ -213,6 +223,20 @@ module.exports = (env, argv) => {
|
|
|
213
223
|
noErrorOnMissing: true,
|
|
214
224
|
priority: 3,
|
|
215
225
|
},
|
|
226
|
+
{
|
|
227
|
+
from: './src/routes/**/*.xml',
|
|
228
|
+
to: distPath({ subpathIn: 'src/routes' }),
|
|
229
|
+
transform: SSG,
|
|
230
|
+
noErrorOnMissing: true,
|
|
231
|
+
priority: 3,
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
from: './src/routes/**/*.rss',
|
|
235
|
+
to: distPath({ subpathIn: 'src/routes' }),
|
|
236
|
+
transform: SSG,
|
|
237
|
+
noErrorOnMissing: true,
|
|
238
|
+
priority: 3,
|
|
239
|
+
},
|
|
216
240
|
{
|
|
217
241
|
from: './src/routes/**/*.css',
|
|
218
242
|
to: distPath({ subpathIn: 'src/routes' }),
|
package/package.json
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "wirejs-scripts",
|
|
3
|
-
"version": "2.0.
|
|
4
|
-
"description": "Basic build and start commands for wirejs apps",
|
|
5
|
-
"bin": {
|
|
6
|
-
"wirejs-scripts": "./bin.js"
|
|
7
|
-
},
|
|
8
|
-
"repository": {
|
|
9
|
-
"type": "git",
|
|
10
|
-
"url": "git+https://github.com/svidgen/wirejs-scripts.git"
|
|
11
|
-
},
|
|
12
|
-
"author": "Jon Wire",
|
|
13
|
-
"license": "AGPL-3.0-only",
|
|
14
|
-
"bugs": {
|
|
15
|
-
"url": "https://github.com/svidgen/wirejs-scripts/issues"
|
|
16
|
-
},
|
|
17
|
-
"homepage": "https://github.com/svidgen/wirejs-scripts#readme",
|
|
18
|
-
"dependencies": {
|
|
19
|
-
"copy-webpack-plugin": "^10.2.4",
|
|
20
|
-
"css-loader": "^5.2.0",
|
|
21
|
-
"file-loader": "^6.2.0",
|
|
22
|
-
"glob": "^7.2.0",
|
|
23
|
-
"marked": "^2.0.1",
|
|
24
|
-
"raw-loader": "^4.0.2",
|
|
25
|
-
"rimraf": "^3.0.2",
|
|
26
|
-
"style-loader": "^2.0.0",
|
|
27
|
-
"webpack": "^5.28.0",
|
|
28
|
-
"webpack-cli": "^4.6.0",
|
|
29
|
-
"webpack-dev-server": "^4.8.1",
|
|
30
|
-
"highlight.js": "^11.1.0",
|
|
31
|
-
"wirejs-dom": "^1.0.4"
|
|
32
|
-
}
|
|
33
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "wirejs-scripts",
|
|
3
|
+
"version": "2.0.5",
|
|
4
|
+
"description": "Basic build and start commands for wirejs apps",
|
|
5
|
+
"bin": {
|
|
6
|
+
"wirejs-scripts": "./bin.js"
|
|
7
|
+
},
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/svidgen/wirejs-scripts.git"
|
|
11
|
+
},
|
|
12
|
+
"author": "Jon Wire",
|
|
13
|
+
"license": "AGPL-3.0-only",
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/svidgen/wirejs-scripts/issues"
|
|
16
|
+
},
|
|
17
|
+
"homepage": "https://github.com/svidgen/wirejs-scripts#readme",
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"copy-webpack-plugin": "^10.2.4",
|
|
20
|
+
"css-loader": "^5.2.0",
|
|
21
|
+
"file-loader": "^6.2.0",
|
|
22
|
+
"glob": "^7.2.0",
|
|
23
|
+
"marked": "^2.0.1",
|
|
24
|
+
"raw-loader": "^4.0.2",
|
|
25
|
+
"rimraf": "^3.0.2",
|
|
26
|
+
"style-loader": "^2.0.0",
|
|
27
|
+
"webpack": "^5.28.0",
|
|
28
|
+
"webpack-cli": "^4.6.0",
|
|
29
|
+
"webpack-dev-server": "^4.8.1",
|
|
30
|
+
"highlight.js": "^11.1.0",
|
|
31
|
+
"wirejs-dom": "^1.0.4"
|
|
32
|
+
}
|
|
33
|
+
}
|