wirejs-scripts 2.0.3 → 2.0.4

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.
@@ -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]) => {
package/package.json CHANGED
@@ -1,33 +1,33 @@
1
- {
2
- "name": "wirejs-scripts",
3
- "version": "2.0.3",
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.4",
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
+ }