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

Enhancement: only run on changed files #27

Open
arobinson opened this issue Jan 15, 2020 · 1 comment
Open

Enhancement: only run on changed files #27

arobinson opened this issue Jan 15, 2020 · 1 comment

Comments

@arobinson
Copy link

First, thank you for this, saving me from having to convert us from npm to yarn

I've hooked this up as a postinstall script in package.json:

    "postinstall": "npx install-local"

This is great in having it now install my local projects as dependencies. Now the drawback is that every npm install it re-packs and installs each of the local dependencies even when they haven't changed.

I'd love to have a build performance feature to allow this to work so that it only runs the install if needed. So if npx install-local is run without arguments (probably with a new flag like --freshen or --update?), it checks each of the localDependencies and only installs them if that destination has newer (or sha-sum changed) files compared to the local node_modules/* folder where it will be installed to.

@nicojs
Copy link
Owner

nicojs commented Oct 16, 2020

Hi @arobinson thanks for the praise and sorry for the late response.

How would this feature work exactly? In my experience npm install will automatically remove the "extraneous" dependencies (the local dependencies will be seen as extraneous). If so, then checking for changes won't work. 🤷‍♂️

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

No branches or pull requests

2 participants