NOTE: Eventually it lead me to create https://github.com/lzrski/npm-git-install
IDEA: Use npm install
script with value same as prepublish
, but this would have to be changed before publishing to registry.
It is said to be an anti-pattern
See https://docs.npmjs.com/misc/scripts#common-uses
An issue by isaacs run prepublish
for git url packages
Installing it from a directory (../package/
) runs prepublish
. WTF?
IDEA: Make a gitinstall gulp task, which will:
Would it be possible use .npmignore then?
The problem is that gulp is in dev-dependencies. So npm install has to be in install script, which seems a little strange.
Result: endless loop (npm install triggers install script; obviously).
NOTE: Installing from local directory triggers prepublish
Maybe installing from git should work like that:
This doesn't seem very hard to do.
TODO: Ask in #3055 is this good approach