Improved npm and node version checks
This commit is contained in:
parent
9f9eb6e928
commit
d370a5b76f
|
@ -33,6 +33,13 @@ if [ ! $(echo $NPM_VERSION | cut -d "." -f 1) = "1" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
#check node version
|
||||
NODE_VERSION=$(node --version)
|
||||
if [ ! $(echo $NODE_VERSION | cut -d "." -f 1-2) = "v0.6" ]; then
|
||||
echo "You're running a wrong version of node, you're using $NODE_VERSION, we need v0.6.x" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#Does a settings.json exist? if no copy the template
|
||||
if [ ! -f "settings.json" ]; then
|
||||
echo "Copy the settings template to settings.json..."
|
||||
|
|
|
@ -26,5 +26,8 @@
|
|||
"devDependencies": {
|
||||
"jshint" : "*"
|
||||
},
|
||||
"engines" : { "node" : ">=0.6.0",
|
||||
"npm" : ">=1.0"
|
||||
},
|
||||
"version" : "1.0.0"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue