host-mdx 2.4.1 → 2.4.2
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/index.js +4 -5
- package/package.json +1 -2
package/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import fs from "fs";
|
|
2
2
|
import os from "os";
|
|
3
3
|
import net from "net";
|
|
4
|
-
import _ from 'lodash';
|
|
5
4
|
import path from "path";
|
|
6
5
|
import sirv from "sirv";
|
|
7
6
|
import polka from "polka";
|
|
@@ -248,14 +247,14 @@ export function isPathInside(parentPath, childPath) {
|
|
|
248
247
|
);
|
|
249
248
|
}
|
|
250
249
|
export async function setupConfigs(inputPath) {
|
|
251
|
-
|
|
252
250
|
let configFilePath = path.join(inputPath, CONFIG_FILE_NAME);
|
|
251
|
+
let configs = { ...DEFAULT_CONFIGS };
|
|
253
252
|
if (fs.existsSync(configFilePath)) {
|
|
254
|
-
let cleanConfigFilePath = pathToFileURL(configFilePath).href
|
|
255
|
-
|
|
253
|
+
let cleanConfigFilePath = pathToFileURL(configFilePath).href;
|
|
254
|
+
configs = { ...configs, ...(await import(cleanConfigFilePath)) };
|
|
256
255
|
}
|
|
257
256
|
|
|
258
|
-
return
|
|
257
|
+
return configs;
|
|
259
258
|
}
|
|
260
259
|
export function createTempDir() {
|
|
261
260
|
// Create default temp html dir
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "host-mdx",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.2",
|
|
4
4
|
"description": "A cli tool to create and serve a static html website from a given mdx directory",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"chokidar": "^5.0.0",
|
|
22
22
|
"ignore": "^7.0.5",
|
|
23
|
-
"lodash": "^4.17.23",
|
|
24
23
|
"lowlight": "^3.3.0",
|
|
25
24
|
"mdx-bundler": "^10.1.1",
|
|
26
25
|
"p-limit": "^7.3.0",
|