@dolphjs/cli 1.0.9 → 1.0.11
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/dist/daemon/watcher.js +5 -2
- package/package.json +1 -1
package/dist/daemon/watcher.js
CHANGED
|
@@ -4,13 +4,16 @@ import chalk from "chalk";
|
|
|
4
4
|
import { getRootDirectory } from "../utils/get_root_dir_path.js";
|
|
5
5
|
import { readConfig } from "../utils/read_user_config_path.js";
|
|
6
6
|
import { join } from "path";
|
|
7
|
+
import { createRequire } from "module";
|
|
8
|
+
import resolve from "resolve";
|
|
7
9
|
let fileExtension = "";
|
|
8
10
|
let indexFilePath = "";
|
|
9
11
|
export const startApp = () => {
|
|
10
12
|
fileExtension = readConfig().language;
|
|
11
13
|
indexFilePath = join(getRootDirectory(), `index.${fileExtension}`);
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
+
const require = createRequire(import.meta.url);
|
|
15
|
+
const tsNodePath = resolve.sync("ts-node", { basedir: process.cwd() });
|
|
16
|
+
const nodePath = resolve.sync("node", { basedir: process.cwd() });
|
|
14
17
|
const child = spawn(fileExtension === "ts" ? tsNodePath : "node", [indexFilePath], { stdio: "inherit" });
|
|
15
18
|
child.on("close", (code) => {
|
|
16
19
|
if (code === 1) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dolphjs/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
4
4
|
"description": "The dolphjs-cli is a tool for efficient intialization and management of a dolphjs project",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"repository": "https://github.com/dolphjs/dolph-cli.git",
|