-
Notifications
You must be signed in to change notification settings - Fork 18
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
Remove yarn link:bin script #135
Conversation
To adopt TypeScript, we previously used ts-node [1] in [2] as our shebang. However this required user to install ts-node as a sibling global dependency and effectively stopped using transpiled JavaScript files. So in [3] we reverted back to node to fix the issue in distribution. However locally when using `yarn/npm link`, it still links that very same script to global binary directory. Since locally we don't keep the JavaScript files (we only transpile them when packaging/publishing), it rendered the `yarn link:bin` setup broken. As it stands now, it's easier and more straightforward to rely on `yarn dev` which feeds the `run` script into ts-node, overriding its shebang. [1] https://github.com/TypeStrong/ts-node [2] 2b799dc [3] 0f59937
See [1]. oclif/core doesn't transpile using TypeScript 4.8 at the moment. [1] oclif/core#482
# Local development | ||
|
||
You can run `yarn --cwd /path/to/zcli dev` in a development environment without transpiling ZCLI into JavaScript. | ||
|
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.
could you leave an example here? I usually use something like yarn dev apps:server ./zcli-demo-4
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 added an example in ee8dd0d. Does it work for you?
I'm gonna close this for now since it doesn't work well with things like apps:new, which now creates the new folder in zcli/ instead of $PWD/ |
Description
88e105a Remove yarn link:bin script
To adopt TypeScript, we previously used ts-node [1] in [2] as our
shebang. However this required user to install ts-node as a sibling
global dependency and effectively stopped using transpiled JavaScript
files.
So in [3] we reverted back to node to fix the issue in distribution.
However locally when using
yarn/npm link
, it still links that verysame script to global binary directory. Since locally we don't keep the
JavaScript files (we only transpile them when packaging/publishing), it
rendered the
yarn link:bin
setup broken.As it stands now, it's easier and more straightforward to rely on
yarn dev
which feeds therun
script into ts-node, overriding its shebang.[1] https://github.com/TypeStrong/ts-node
[2] 2b799dc
[3] 0f59937
ce8e79a Pin TypeScript to <4.8 to avoid oclif/core error
See [1]. oclif/core doesn't transpile using TypeScript 4.8 at the
moment.
[1] oclif/core#482
Detail
Checklist