-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add support for global installation #74
Conversation
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.
Just a small nit in #74 (comment) 🙌
Have you tried on Linux and Windows or just macOS? (We will have to setup some CI checks soon.)
The current approach was tested on
The last remaining item in this PR is to update the README before merging. |
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.
/cc @friedger |
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.
Merge after CI setup in #75 or another round of manual checks.
This commit updates `tsconfig.json`` to ensure build files are emitted into the `dist` folder. This change supports the npm publishing process by placing the compiled files in a location suitable for distribution. Additionally, it helps with global installations by mapping the bin to the `./dist/app.js` path. To resolve the correct version from `package.json`, the `resolveJsonModule` option has been added to the `tsconfig.json`. Additionally, the `dist` folder has been added to the `.gitignore`.
This commit introduces a Node.js shebang (#!/usr/bin/env node) to ensure the app.ts script is executable as a CLI tool. Additionally, the package.json is updated to declare dist/app.js as the entry point for the rv CLI tool, providing support for custom installation and global execution.
3758c94
to
2d164fb
Compare
b61a743
to
677d20a
Compare
7a3ecf2
to
97971ee
Compare
6a1caba
to
1a94bfe
Compare
The tests should not be included in the build, as takes care of them.
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.
☄️🪐
This PR supports global installation using
npm
--global
flag. Therv
executable is now accessible globally, allowing users to run it from anywhere on their system.Key updates:
package.json
so that therv
command points to the builtapp.js
in thedist
directory.rv
script since theapp.js
can now be run directly globally.