-
Notifications
You must be signed in to change notification settings - Fork 2k
Support npm 5 prepare script for installing non-published references #1347
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
Comments
I have the exact same use case, I maintain my own fork of Main problem with this feature is that I'm personally was surprised on how easy it's to break build on Windows, e.g. you can't defined env variable using That's why we will definetly need CI test that ensure So even though I personaly would love to use such feature I think it requires too much maintaince. |
Is this significantly different from relying on the |
The difference is that the |
@intellix wow how did I not realise this before, about using I've begun rolling it out for all my packages, starting with graphql-api-koa. Off topic, but that package is probably also a good reference for using Babel v7 with |
We have had canary builds on PRs for a while, so I think we can close this. Feel free to reopen as necessary. |
npm 5 added the ability to specify a
prepare
script inside package.json. It's basically how to prepare a package before you want to publish it (build it).When a package has a prepare script and you depend on a git source, npm will:
With it, you can depend directly on git sources without the need to publish them to npm first, which means you can depend on commits, branches or tags from a repository. For example:
Whenever I do a PR, it's because I need that code now and want to reference it straight away to start using it, so I typically reference my fork like:
github:intellix/graphql-js#some-fix
Quote about prepare from npm docs:
It can essentially be a copy of the build command:
Spoke a little about this in: #1340
The text was updated successfully, but these errors were encountered: