Open caesarsol opened 4 years ago
What about simply adding package-lock.json
to the .gitignore
?
That would make it behave strangely only on developers machines... And I fear anyone would think "this is wrong!" and remove the line from the gitignore!
You're right @caesarsol
Should the big red message block the execution of the script in your opinion? Or just be a message like the "upgrade accurapp" one?
I think it's safe to tell the user to just use yarn. I've already put the yarn
command in the start one because people would forget to reinstall the new dependencies when pulling updates your teammates did:
I'd say ZERO TOLERANCE, because noone really reads the alert messages.
We could also simply update that script to something similar to:
start: '[[ ! -f package-lock.json ]] && yarn && accurapp-scripts start',
Is your feature request related to a problem? Please describe.
Sometimes for developers overlook, an
npm
command gets run in the repo and apackage-lock.json
gets created even if ayarn.lock
is already present. This creates problems in Netlify and other auto-deploy platforma, because they choose the tool depending on which files they find.Describe the solution you'd like
Any
accurapp
command (start / build / lint) could check: ifpackage-lock.json
ANDyarn.lock
are present, block everything and alert with a big red flashy warning. Solution for the user: delete one of the two files (preferably the NPM one)Thoughts?