-
Notifications
You must be signed in to change notification settings - Fork 5
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
feat: introduced CLI mode to the parser #36
Conversation
I assume with the entry on package.json, if I install this package, how do I run this binary without explicitly doing |
AFAIK after packing and installing it globally, we can use it with the package name For example; In |
I'm more concerned on how the binary name is resolved. For example, the package https://www.npmjs.com/package/npm-check-updates is resolved as a binary |
https://github.com/raineorshine/npm-check-updates/blob/main/package.json#L43-L44
Now I checked, when we want to make a special naming other than the package name, we can show more than one source/target with a different name we want under the https://github.com/raineorshine/npm-check-updates/blob/main/package.json#L43-L44 In this scenario, we can add the name of the package to "bin": {
"api-docs-tooling": "./bin/cli.mjs",
"adt": "./bin/cli.mjs",
... more options
}, So we can use it in the CLI as |
cc @nodejs/releasers or @nodejs/build or @nodejs/package-maintenance has there been any other package we published (either internally) with a binary? (I assume yes) and if so, what has been the naming format used? I'm keen on doing something like |
I think the main thing I try to consider these days is that |
Yeah, I also believe the name of the binary should be the name of the package for simplicity and consistency sake. But I wonder what sort of naming conventions are used. Do you have any example, Wes? |
@canerakdas I believe you can rebase this ;D |
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!
Description
With this PR, we have added parsing features via CLI.
The following commands you can use:
-i
,--input
<patterns...>
Specify input file patterns using glob syntax-e
,--exclude
<patterns...>
Specify patterns to exclude files from being processed-o
,--output
<path>
Specify the output directory path-t
,--target
<mode>
Set the processing mode (default: "mdx")-h
,--help
display help for commandJust an idea; In the future, we may add verbose to debug logs or silent mode to hide logs 🤔
cli.mjs
because I wasn't sure where and how to connect to Parser. I think after #33 is closed, we can determine how we will use it here and organize itValidation
First of all make sure the script is executable, after that, you can start to use
./bin/cli.mjs -h
Related Issues
Fixes #3
Check List