@sleetch/cli 1.0.6 → 1.0.7
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/bin/index.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { t as create_command } from "../create-
|
|
2
|
+
import { t as create_command } from "../create-DWUgFzD_.js";
|
|
3
3
|
import { parseArgs, styleText } from "node:util";
|
|
4
|
-
import { sleetch_runtime } from "@sleetch/core/compiler";
|
|
5
4
|
//#endregion
|
|
6
5
|
//#region src/bin/index.ts
|
|
7
6
|
new class sleetch_cli {
|
|
8
|
-
runtime = new sleetch_runtime();
|
|
9
7
|
commands = [];
|
|
10
8
|
fallback;
|
|
11
9
|
constructor() {}
|
|
@@ -144,9 +142,15 @@ new class sleetch_cli {
|
|
|
144
142
|
default: false
|
|
145
143
|
} },
|
|
146
144
|
action: async (options, cli) => {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
145
|
+
try {
|
|
146
|
+
const { sleetch_runtime } = await import("@sleetch/core/compiler");
|
|
147
|
+
const runtime = new sleetch_runtime();
|
|
148
|
+
await runtime.sources.load();
|
|
149
|
+
await runtime.builder.build();
|
|
150
|
+
if (options.get_boolean_option("watch")) await runtime.sources.watch();
|
|
151
|
+
} catch (error) {
|
|
152
|
+
if (error instanceof Error) cli.error("error", error.message);
|
|
153
|
+
}
|
|
150
154
|
}
|
|
151
155
|
}).add(create_command).run(process.argv.slice(2));
|
|
152
156
|
//#endregion
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as create_command } from "../../create-
|
|
1
|
+
import { t as create_command } from "../../create-DWUgFzD_.js";
|
|
2
2
|
export { create_command };
|
|
@@ -7,7 +7,7 @@ import { cp, mkdir, readFile, rm, writeFile } from "node:fs/promises";
|
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import { tmpdir } from "node:os";
|
|
9
9
|
//#region package.json
|
|
10
|
-
var version = "1.0.
|
|
10
|
+
var version = "1.0.7";
|
|
11
11
|
//#endregion
|
|
12
12
|
//#region src/commands/create/index.ts
|
|
13
13
|
const create_command = {
|
|
@@ -42,7 +42,7 @@ const create_command = {
|
|
|
42
42
|
await mkdir(temp_directory, { recursive: true });
|
|
43
43
|
const templates = {
|
|
44
44
|
"react-router": "/sleetch-main/templates/react-router",
|
|
45
|
-
"next-
|
|
45
|
+
"next-webpack": "/sleetch-main/templates/next-webpack"
|
|
46
46
|
};
|
|
47
47
|
const name = options.get_string_option("name");
|
|
48
48
|
const framework = options.get_string_option("framework");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sleetch/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"dev": "tsdown --watch"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@sleetch/core": "1.0.
|
|
16
|
+
"@sleetch/core": "1.0.7",
|
|
17
17
|
"tar-fs": "^3.1.3",
|
|
18
18
|
"zod": "^4.4.3"
|
|
19
19
|
},
|