-
Notifications
You must be signed in to change notification settings - Fork 3k
run prepublish
for git url packages
#3055
Comments
I don't believe it's necessary. If the user has forked a project and is installing via a raw git repo, they could add a commit to cause |
I am with @dfellis after thinking 2 days about this and I am still not sure haha. My thoughts are:
But I think it should be mentioned in the docs maybe? |
use case:
sample current solution by @paulmillr at https://github.com/brunch/brunch:
limitations:
options:
|
I agree. |
I also agree. Repositories are for the source files, why should we have to add extra bulk (especially for larger packages)? |
npm doesn't run the prepublish task to compile the coffee when installing from github urls (but does locally). See npm/npm#3055
Any updates? |
npm has 861 open issues and is a bit behind at handling them. It will take a while to respond. I personally would appreciate if I didn't get notifications about people inquiring about updates, but, alas. |
Yes, between this and #1876 I can't figure out any good way to use a forked module in dependent project, without publishing it to the public repo. Backstory: I'm trying to get https://github.com/natevw/node-hid/tree/dhleong/Node-0.11.13 building for atom-shell on Windows. Somethings odd, and I'm trying to simplify how the build process works, but between these two issues there's not really a good way depend on git submodules in a non-published node module. |
@natevw: try npm shrinkwrap, which is infuriating to use in the longer term, but can help with what you're describing. |
@braco Thanks for documenting that, it is similar to what I ended up doing (which was to make a GitHub release tarball and install that instead). |
By the time a Git URL's source code makes it to my
I don't get the full source from which to build. So I can't make sure it works. Not within |
Related issue npm/npm#3055
When installing with NPM via a github URL, the prepublish hook is not run: npm/npm#3055. The workaround for this is to add a preinstall step that in turn calls the prepublish step.
When a prepare script is defined, npm and yarn will build uppy automatically if it's being depended on through a git URL. This is useful when downstream projects don't want to wait for the next release to be tagged. See npm/npm#3055 (comment) See also yarnpkg/yarn#3553
Adding the `prepare` script allows to install this repo from git uri: `npm install --save git+https://github.com/datavisyn/lineupjs.git` For more information see: * https://docs.npmjs.com/misc/scripts * npm/npm#3055 * Example: tasti/react-linkify#61
After installing a git url package, perhaps the
prepublish
script should be run, since git repos will typically not keep around any built artifacts that the prepublish script generates.However,
prepublish
scripts also typically require the use ofdevDependencies
packages, so it might not be possible to do this in a good way. (In which case, it'll just be on the users of git url packages to run whatever scripts are necessary to make them ready to use.)The text was updated successfully, but these errors were encountered: