systemview 1.0.0 → 1.0.1

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.
Files changed (2) hide show
  1. package/cli/index.js +23 -6
  2. package/package.json +2 -2
package/cli/index.js CHANGED
@@ -7,17 +7,34 @@
7
7
  * @author Odion Edwards <none>
8
8
  */
9
9
 
10
- const init = require('./utils/init');
11
- const cli = require('./utils/cli');
12
- const log = require('./utils/log');
10
+ const init = require("./utils/init");
11
+ const cli = require("./utils/cli");
12
+ const log = require("./utils/log");
13
+ const { spawn } = require("child_process");
13
14
 
14
15
  const input = cli.input;
15
16
  const flags = cli.flags;
16
17
  const { clear, debug } = flags;
17
18
 
18
19
  (async () => {
19
- init({ clear });
20
- input.includes(`help`) && cli.showHelp(0);
20
+ init({ clear });
21
+ if (input.includes(`help`)) {
22
+ cli.showHelp(0);
23
+ }
24
+ if (input.includes("start")) {
25
+ // Start React app
26
+ log("Launching SystemView UI...");
27
+ const reactAppProcess = spawn("npm", ["start"], {
28
+ stdio: ["ignore", "ignore", "ignore"],
29
+ shell: true,
30
+ });
21
31
 
22
- debug && log(flags);
32
+ reactAppProcess.on("close", (code) => {
33
+ console.log(`React app exited with code ${code}`);
34
+ });
35
+ } else if (input.includes("test")) {
36
+ // Run tests
37
+ }
38
+
39
+ debug && log(flags);
23
40
  })();
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "systemview",
3
3
  "description": "A documentation and testing suite for SystemLynx",
4
- "version": "1.0.0",
4
+ "version": "1.0.1",
5
5
  "license": "UNLICENSED",
6
6
  "bin": {
7
- "SystemView": "cli/index.js"
7
+ "systemview": "cli/index.js"
8
8
  },
9
9
  "dependencies": {
10
10
  "@babel/preset-react": "^7.18.6",