codeforboston / cliff-effects

Cliff effects guidance prototype (archived)
https://codeforboston.github.io/cliff-effects/#/
MIT License
30 stars 64 forks source link

Add .nvmrc file. Fixes #931 #979

Closed turnerhayes closed 5 years ago

turnerhayes commented 5 years ago

Test plan:

knod commented 5 years ago

Also, is there a way to add a pre-... npm install hook to make sure this happens for new folks right off?

turnerhayes commented 5 years ago

That might be trickier, because it depends on nvm being installed, and as far as I know there's not a good way to do that from a script--I think they will have to install nvm first (if they don't have it).

Maybe there's a way to detect if nvm is installed and run the necessary commands only in that case?

knod commented 5 years ago

Dang, forgot about that part. Hmm. Maybe a warning if they're using the wrong version of node/npm?

turnerhayes commented 5 years ago

That can be done; the problem is that create-react-app's start script clears the console, so at most you'd see the warning appear for a couple of seconds and that might not be enough to register it.

knod commented 5 years ago

I was actually thinking of doing it at other times. For example, when they first clone the repo, when they do npm install, when they push. It seems like there's a lot of different options.