Skip to content

Commit

Permalink
and npx.cmd to windows (#564)
Browse files Browse the repository at this point in the history
  • Loading branch information
ksyeo1010 authored Jul 20, 2023
1 parent a0b7c74 commit d3fca81
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 5 deletions.
4 changes: 3 additions & 1 deletion demo/angular/scripts/run_demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ fs.writeFileSync(
})();`
);

const command = (process.platform === "win32") ? "npx.cmd" : "npx";

child_process.fork("ng", commands, {
execPath: "npx",
execPath: command,
});
4 changes: 3 additions & 1 deletion demo/react-native/scripts/run_demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ fs.writeFileSync(
JSON.stringify(params),
);

const command = (process.platform === "win32") ? "npx.cmd" : "npx";

child_process.fork('react-native', commands, {
execPath: 'npx',
execPath: command,
});
4 changes: 3 additions & 1 deletion demo/react/scripts/run_demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ fs.writeFileSync(
})();`
);

const command = (process.platform === "win32") ? "npx.cmd" : "npx";

child_process.fork("react-scripts", commands, {
execPath: "npx",
execPath: command,
});
4 changes: 3 additions & 1 deletion demo/vue/scripts/run_demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ export default rhinoModel;
`
);

const command = (process.platform === "win32") ? "npx.cmd" : "npx";

child_process.fork("vite", commands, {
execPath: "npx",
execPath: command,
});
4 changes: 3 additions & 1 deletion demo/web/scripts/run_demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ fs.writeFileSync(
})();`
);

const command = (process.platform === "win32") ? "npx.cmd" : "npx";

child_process.fork("http-server", ["-a", "localhost", "-p", "5000"], {
execPath: "npx",
execPath: command,
});

0 comments on commit d3fca81

Please sign in to comment.