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 option to run a different install command #7

Closed
the21st opened this issue Mar 31, 2020 · 3 comments · Fixed by #9
Closed

Add option to run a different install command #7

the21st opened this issue Mar 31, 2020 · 3 comments · Fixed by #9

Comments

@the21st
Copy link

the21st commented Mar 31, 2020

Hi, thanks again for creating install-changed! It's helped me a lot in everyday productivity.

The only issue I'm having with my new flow is that sometimes the npm install command that this runs changes package-lock.json and I end up with unexpected changed file in my repo.

For this purpose, there's npm ci which installs from the lockfile, is potentially faster, and doesn't change package-lock.json. Could you add an option to enable running npm ci instead of npm install if the package.json file is changed?

@ryanburnette
Copy link

@ninesalt Love the lib, thanks for writing it.

@the21st I might need the same update. I'll PR if I fork and write it myself. For now npm install works for me.

thdk added a commit to thdk/install-changed that referenced this issue May 18, 2020
'hashFileName' and 'command' can now be specified for both cli and api version.
users may now specify --command="npm ci" if they would prefere that over "npm install"
they can also change the filename of the file that contains the hash with --hashFileName

api function watchFile now has a options argument: { hashFileName: string | undefined, command: string | function }

Fixes ninesalt#7
@thdk thdk mentioned this issue May 18, 2020
@thdk
Copy link
Contributor

thdk commented May 28, 2020

@ryanburnette @the21st
Can you have a look at my PR for this and let me know if that would solve your issue?

@the21st
Copy link
Author

the21st commented May 29, 2020

@thdk that looks great, thank you!

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 a pull request may close this issue.

3 participants