Improved npm and node version checks

pull/362/head
Peter 'Pita' Martischka 2012-01-26 12:55:54 +01:00
parent 9f9eb6e928
commit d370a5b76f
2 changed files with 10 additions and 0 deletions

View File

@ -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..."

View File

@ -26,5 +26,8 @@
"devDependencies": {
"jshint" : "*"
},
"engines" : { "node" : ">=0.6.0",
"npm" : ">=1.0"
},
"version" : "1.0.0"
}