@tonk/cli 0.1.1 → 0.1.2

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/README.md CHANGED
@@ -71,8 +71,8 @@ Options:
71
71
  ## Development
72
72
 
73
73
  1. Clone the repository
74
- 2. Install dependencies: `pnpm install`
75
- 4. Run the dev mode: `pnpm dev`
74
+ 2. Install dependencies: `npm install`
75
+ 4. Run the dev mode: `npm run dev`
76
76
 
77
77
  ## License
78
78
 
@@ -2,16 +2,16 @@ import { Command } from 'commander';
2
2
  import child_process from 'child_process';
3
3
  export const createCommand = new Command('create')
4
4
  .description('Create a new tonk application or component')
5
- .option('-n, --name <name>', 'Name of the application')
6
- .action(options => {
5
+ .argument('[name]', 'Name of the application')
6
+ .action(name => {
7
7
  console.log('Creating a new tonk app...');
8
8
  try {
9
9
  // Build the command with any passed options
10
10
  let createCommand = 'npx @tonk/create';
11
11
  // Pass through any options provided to the CLI
12
- if (options.name) {
13
- createCommand += ` --name "${options.name}"`;
14
- }
12
+ if (name)
13
+ createCommand += ` "${name}"`;
14
+ console.log(createCommand);
15
15
  // Execute the create package
16
16
  child_process.execSync(createCommand, {
17
17
  stdio: 'inherit',
@@ -1 +1 @@
1
- {"version":3,"file":"create.js","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAClC,OAAO,aAAa,MAAM,eAAe,CAAC;AAE1C,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC;KAC/C,WAAW,CAAC,4CAA4C,CAAC;KACzD,MAAM,CAAC,mBAAmB,EAAE,yBAAyB,CAAC;KACtD,MAAM,CAAC,OAAO,CAAC,EAAE;IAChB,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;IAE1C,IAAI,CAAC;QACH,4CAA4C;QAC5C,IAAI,aAAa,GAAG,kBAAkB,CAAC;QAEvC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ChB,GAAG,EAAE,EAAC,GAAG,OAAO,CAAC,GAAG,EAAC;SACtB,CAAC,CAAC;QAEH,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;QACjD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,4BAA4B,EAAE,KAAK,CAAC,CAAC;QACnD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare const helloCommand: Command;
3
+ //# sourceMappingURL=hello.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hello.d.ts","sourceRoot":"","sources":["../../src/commands/hello.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAGlC,eAAO,MAAM,YAAY,SA+BrB,CAAC"}
@@ -0,0 +1,35 @@
1
+ import { Command } from 'commander';
2
+ import chalk from 'chalk';
3
+ export const helloCommand = new Command('hello')
4
+ .description('Display a welcome message for Tonk')
5
+ .action(() => {
6
+ console.log(`
7
+ ・。゜☆。・゜。・。゜☆。・゜★・。゜☆。・゜。・。゜☆。・゜☆。・゜
8
+
9
+ _____ U ___ u _ _ _ __
10
+ |_ " _| \/"_ \/ | \ |"| |"|/ /
11
+ | | | | | |<| \| |> | ' /
12
+ /| |\.-,_| |_| |U| |\ |u U/| . \\u
13
+ u |_|U \_)-\___/ |_| \_| |_|\_\
14
+ _// \\_ \\ || \\,-.,-,>> \\,-.
15
+ (__) (__) (__) (_") (_/ \.) (_/
16
+
17
+ ・。゜☆。・゜。・。゜☆。・゜★・。゜☆。・゜。・。゜☆。・゜☆。・゜
18
+
19
+ Welcome to Tonk!
20
+
21
+ We're excited to work with you in building your own ☆𝐿𝒾𝓉𝓉𝓁𝑒 𝐼𝓃𝓉𝑒𝓇𝓃𝑒𝓉☆.
22
+
23
+ To get started...
24
+
25
+ 1. Create your first app by running the command: ${chalk.cyan('tonk create [app name]')}.
26
+ 2. Start the app with: ${chalk.cyan('npm run dev')}
27
+ 3. Open in your favorite code editor and vibe.
28
+
29
+ You can find more information and how to reach us at ${chalk.blue('https://tonk.xyz')}. Feel free to ask for help in the Telegram chat or just say hello.
30
+
31
+ Cheers!
32
+ `);
33
+ process.exit(0);
34
+ });
35
+ //# sourceMappingURL=hello.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hello.js","sourceRoot":"","sources":["../../src/commands/hello.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,OAAO,CAAC,OAAO,CAAC;KAC7C,WAAW,CAAC,oCAAoC,CAAC;KACjD,MAAM,CAAC,GAAG,EAAE;IACX,OAAO,CAAC,GAAG,CAAC;;;;;;;;;;;;;;;;;;;mDAmBmC,KAAK,CAAC,IAAI,CAAC,wBAAwB,CAAC;yBAC9D,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC;;;uDAGK,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC;;;CAGpF,CAAC,CAAC;IACC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
package/dist/tonk.js CHANGED
@@ -4,6 +4,7 @@ import { devCommand } from './commands/dev.js';
4
4
  import { serveCommand } from './commands/serve.js';
5
5
  import { deployCommand } from './commands/deploy.js';
6
6
  import { configCommand } from './commands/config.js';
7
+ import { helloCommand } from './commands/hello.js';
7
8
  const program = new Command();
8
9
  // Main program setup
9
10
  program
@@ -18,6 +19,7 @@ program.addCommand(devCommand);
18
19
  program.addCommand(serveCommand);
19
20
  program.addCommand(deployCommand);
20
21
  program.addCommand(configCommand);
22
+ program.addCommand(helloCommand);
21
23
  // Parse arguments
22
24
  program.parse();
23
25
  // Show help if no arguments provided
package/dist/tonk.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"tonk.js","sourceRoot":"","sources":["../src/tonk.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAClC,OAAO,EAAC,aAAa,EAAC,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAC,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAC,YAAY,EAAC,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAC,aAAa,EAAC,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAC,aAAa,EAAC,MAAM,sBAAsB,CAAC;AAEnD,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAE9B,qBAAqB;AACrB,OAAO;KACJ,IAAI,CAAC,MAAM,CAAC;KACZ,WAAW,CAAC,4DAA4D,CAAC;KACzE,OAAO,CAAC,OAAO,CAAC;KAChB,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE;IACjB,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;AACrC,CAAC,CAAC,CAAC;AAEL,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;AAClC,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;AAC/B,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;AACjC,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;AAClC,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;AAElC,kBAAkB;AAClB,OAAO,CAAC,KAAK,EAAE,CAAC;AAEhB,qCAAqC;AACrC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAClC,OAAO,CAAC,UAAU,EAAE,CAAC;AACvB,CAAC"}
1
+ {"version":3,"file":"tonk.js","sourceRoot":"","sources":["../src/ton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1.1",
3
+ "version": "0.1.2",
4
4
  "description": "The Tonk stack command line utility",
5
5
  "type": "module",
6
6
  "bin": {