Skip to content
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 prepare script to allow npm to build at install time. #16

Merged
merged 1 commit into from
Jun 22, 2024

Conversation

johnkraczek
Copy link
Contributor

By adding a "prepare" script to your package.json we can add your repository as a dependency in our package.json
Then when we can install your code using npm:

npm i bruceharrison1984/bcrypt-edge

this will install directly from GitHub.

at install time locally, NPM will install your dependancies and then run the build step, then output the build folder into the consuming projects node_modules folder.

Effectively this allows us to use your code as if we installed it from NPM directly.

Check out this Blog post about it.

https://blog.jim-nielsen.com/2018/installing-and-building-an-npm-package-from-github/

Very simple change to your package.json.

@johnkraczek
Copy link
Contributor Author

I should have checked if you had already published to NPM 😁

I landed on your GitHub first and didn't see a link to the NPM package.
perhaps adding a link in your readme will help people find that quicker.

Feel free to disregard if you would rather have people install from there. 👍

@bruceharrison1984
Copy link
Owner

I've got no issue if people want to utilize this package directly from Git. I'll get it merged and cut a new release later this week.

@bruceharrison1984 bruceharrison1984 merged commit 7ec9d34 into bruceharrison1984:main Jun 22, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants