tkeron 0.0.7 → 0.0.8

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.
@@ -1,2 +1,4 @@
1
- import { Callback } from "@tkeron/commands";
2
- export declare const cmdBuild: Callback;
1
+ export declare const cmdBuild: ({ sourceDir, outputDir }?: {
2
+ sourceDir: string;
3
+ outputDir: string;
4
+ }) => Promise<void>;
package/dist/cmdDev.d.ts CHANGED
@@ -1,8 +1,12 @@
1
1
  /// <reference types="node" />
2
2
  import { Server } from "http";
3
- import { Callback } from "@tkeron/commands";
4
3
  export declare const dev: (sourceDir: string, outputDir: string, port?: number, addr?: string) => Promise<{
5
4
  closeWatcher: () => void;
6
5
  closeServer: () => Server<typeof import("http").IncomingMessage, typeof import("http").ServerResponse>;
7
6
  }>;
8
- export declare const cmdDev: Callback;
7
+ export declare const cmdDev: ({ sourceDir, outputDir, port, addr }?: {
8
+ sourceDir: string;
9
+ outputDir: string;
10
+ port: string;
11
+ addr: string;
12
+ }) => void;
package/dist/cmdDev.js CHANGED
@@ -63,6 +63,7 @@ const cmdDev = ({ sourceDir, outputDir, port, addr } = {
63
63
  port: "5000",
64
64
  addr: "127.0.0.1",
65
65
  }) => {
66
- (0, exports.dev)(sourceDir, outputDir, Number(port), addr);
66
+ const numberPort = Number(port) || 5000;
67
+ (0, exports.dev)(sourceDir, outputDir, numberPort, addr);
67
68
  };
68
69
  exports.cmdDev = cmdDev;
@@ -1,2 +1,4 @@
1
- import { Callback } from "@tkeron/commands";
2
- export declare const cmdGenerate: Callback;
1
+ export declare const cmdGenerate: ({ item, path }?: {
2
+ item: string;
3
+ path: string;
4
+ }) => Promise<void>;
package/dist/cmdInit.d.ts CHANGED
@@ -1,2 +1,4 @@
1
- import { Callback } from "@tkeron/commands";
2
- export declare const cmdInit: Callback;
1
+ export declare const cmdInit: ({ sourceDir, outputDir }?: {
2
+ sourceDir: string;
3
+ outputDir: string;
4
+ }) => Promise<void>;
package/dist/main.js CHANGED
@@ -28,31 +28,31 @@ const main = (command = "tkeron", argv) => {
28
28
  }
29
29
  (0, commands_1.getCommands)()
30
30
  .addCommand("init")
31
- .addAliases("i")
31
+ .addAlias("i")
32
32
  .addPositionedArgument("sourceDir")
33
33
  .addPositionedArgument("outDir")
34
34
  .setCallback(cmdInit_1.cmdInit)
35
- .next()
35
+ .commands()
36
36
  .addCommand("dev")
37
- .addAliases("d")
37
+ .addAlias("d")
38
38
  .addPositionedArgument("sourceDir")
39
39
  .addPositionedArgument("outDir")
40
40
  .addPositionedArgument("port")
41
41
  .addPositionedArgument("addr")
42
42
  .setCallback(cmdDev_1.cmdDev)
43
- .next()
43
+ .commands()
44
44
  .addCommand("build")
45
- .addAliases("b")
45
+ .addAlias("b")
46
46
  .addPositionedArgument("sourceDir")
47
47
  .addPositionedArgument("outDir")
48
48
  .setCallback(cmdBuild_1.cmdBuild)
49
- .next()
49
+ .commands()
50
50
  .addCommand("generate")
51
- .addAliases("g")
51
+ .addAlias("g")
52
52
  .addPositionedArgument("item")
53
53
  .addPositionedArgument("path")
54
54
  .setCallback(cmdGenerate_1.cmdGenerate)
55
- .next()
56
- .run();
55
+ .commands()
56
+ .start();
57
57
  };
58
58
  exports.main = main;
package/dist/mod.d.ts CHANGED
@@ -1,3 +1,14 @@
1
- export declare const build: import("@tkeron/commands").Callback;
2
- export declare const init: import("@tkeron/commands").Callback;
3
- export declare const dev: import("@tkeron/commands").Callback;
1
+ export declare const build: ({ sourceDir, outputDir }?: {
2
+ sourceDir: string;
3
+ outputDir: string;
4
+ }) => Promise<void>;
5
+ export declare const init: ({ sourceDir, outputDir }?: {
6
+ sourceDir: string;
7
+ outputDir: string;
8
+ }) => Promise<void>;
9
+ export declare const dev: ({ sourceDir, outputDir, port, addr }?: {
10
+ sourceDir: string;
11
+ outputDir: string;
12
+ port: string;
13
+ addr: string;
14
+ }) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tkeron",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "description": "Micro framework for developing web user interfaces with typescript.",
5
5
  "bin": {
6
6
  "tkeron": "dist/index.js",
@@ -19,7 +19,7 @@
19
19
  "author": "tkeron",
20
20
  "license": "MIT",
21
21
  "dependencies": {
22
- "@tkeron/commands": "^0.1.1",
22
+ "@tkeron/commands": "^0.2.0",
23
23
  "colorette": "^2.0.19",
24
24
  "esbuild": "^0.16.6",
25
25
  "express": "^4.18.2",