google / mathsteps

Step by step math solutions for everyone
https://socratic.org
Apache License 2.0
2.12k stars 275 forks source link

Added a script to check the installed node version #94

Closed Raibaz closed 7 years ago

Raibaz commented 7 years ago

This should solve #82 with this solution proposed in the issue comments.

A script has been added in the scripts folder to check the current node version against the one required in package.json and the script execution has been bound to the preinstall stage in the package file itself.

Unfortunately this adds a dependency from semver, but I guess there is no easier way to handle version comparison than adding an external dependency.

Raibaz commented 7 years ago

Note that i had to add "test": "mocha --recursive" to explicitly define the test suite runner script, since having a scripts property in package.json overrides the defaults.

Raibaz commented 7 years ago

Whops i didn't notice package.json already had a scripts section and I copypasted the stackoverflow solution without linting it...sorry :(

Should be ok now.

evykassirer commented 7 years ago

sweet! thanks for the quick fix