-
Notifications
You must be signed in to change notification settings - Fork 43
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: npm init
alias
#597
feat: npm init
alias
#597
Conversation
packages/create/package.json
Outdated
"name": "@readme/create", | ||
"version": "0.0.1", | ||
"description": "Sync your OpenAPI definition to ReadMe", | ||
"bin": "../../bin/rdme openapi --github", |
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 don't think this will work if you pull @readme/create
down as it'll try to run ../../bin/rdme
on your machine.
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.
how is it any different than what's being done in this line?
Line 11 in fc22c18
"rdme": "bin/rdme" |
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.
ohhh wait I think I know what you mean. I bet it's not even installing rdme
to begin with. duh
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.
If we publish @readme/create
to npm we only publish what's in packages/create
, which won't include the bin
directory.
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.
Can we use npx
here at all?
"bin": "npx rdme openapi --github"
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.
jinx lol a856904
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.
Or @readme/create
can just have rdme@latest
as a dependency and then we can call that from an index.js
file like they do in create-react-app
:
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 commit I just pushed feels a little lighter than the CRA approach—are there any upsides besides the ability to write internal comments?
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.
Nah, if the commit you pushed worked I'm cool w/ that.
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 thing is I have no idea how to test it lol
🧰 Changes
Per the
npm init
docs, we can utilize the@readme
namespace to do fancy things like:which would run the following:
This PR creates that
@readme/create
repo and aliases it tordme openapi --github
, but we might wanna do something fancier at some point. Also should this be versioned the same asrdme
? Lots of open questions, but figured I'd open this PR to get the conversation started.