Skip to content

feat: cli v1 init#56

Merged
notunderctrl merged 3 commits intomasterfrom
cli-updates
Jan 31, 2024
Merged

feat: cli v1 init#56
notunderctrl merged 3 commits intomasterfrom
cli-updates

Conversation

@twlite
Copy link
Member

@twlite twlite commented Jan 31, 2024

🎉 CLI is now written in TypeScript.

This PR also changes the way projects are bootstrapped. A client.{js,ts} file is required for this to work, which will be the entrypoint file. This is not ready yet, so for now it can be tested with the following code:

// src/client.js
import { client, CommandKit } from 'commandkit';

new CommandKit({
    client: client(),
    commandsPath: `${__dirname}/commands`,
    eventsPath: `${__dirname}/events`,
    validationsPath: `${__dirname}/validations`,
    bulkRegister: true
});

client instance is created by commandkit itself internally before executing the code. The client options have to be provided through commandkit.js (commandkit config file).

This is experimental and we will keep improving this as the project iterates. Watch mode is currently not supported and production build is also not supported for now.

The new CommandKit part can be omitted entirely once new command handler lands. This should not break existing code but it will definitely break for CLI users.

cc @notunderctrl

@twlite twlite added the cli CommandKit CLI related label Jan 31, 2024
@vercel
Copy link

vercel bot commented Jan 31, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
commandkit-docs ❌ Failed (Inspect) Jan 31, 2024 5:44pm

@twlite twlite changed the title feat: cli v1 wip feat: cli v1 init Jan 31, 2024
@twlite twlite requested a review from notunderctrl January 31, 2024 17:45
@notunderctrl notunderctrl merged commit b3ef14f into master Jan 31, 2024
@twlite twlite deleted the cli-updates branch January 31, 2024 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CommandKit CLI related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants