New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scaffolding for TypeScript CLI #198
Conversation
|
size-limit report 📦
|
Your pull request has been published to npm. You can install it by running:
|
d3e995f
to
839e7fd
Compare
cli/bin/dev
Outdated
@@ -0,0 +1,17 @@ | |||
#!/usr/bin/env node |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gimenete do we want to try clipanion? It's ES ready and a bit more typesafe for parsing the options and should have the same benefit as oclif for autogenerated help and testability
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took a look to it but oclif supports many other things such as plugins, already built-in behaviours such the --json flag, generating binaries ready to be uploaded to homebrew, etc.
"eslint-config-oclif-typescript": "^1.0.2", | ||
"globby": "^11", | ||
"oclif": "^3", | ||
"shx": "^0.3.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIL shx
is a thing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Left some minor comments, nothing blocking. Personally I'd remove all the placeholder command files to keep it clean, but it's fine as-is for the first scaffolding.
} | ||
} | ||
}, | ||
"scripts": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The files in bin
probably make sense as scripts instead. I couldn't get to work dev
one, but run
works fine
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool. I've done that but I've removed the dev
one because it doesn't read correclty the ESM commands and I think we don't need it.
This PR is just the scaffolding of the TypeScript CLI: setting up ocliff and make it work with our eslint config, etc.
I've also added mostly empty commands to know more or less the commands we'll have.
I'll create separate PRs for each command so things can be tested and reviewed easily.