Commit 937459c6 authored by Hunter Loftis's avatar Hunter Loftis

renamed PRO TIP to WARNING

parent 10422d15
......@@ -21,7 +21,7 @@ testDetectWithoutPackageJson() {
testNoVersion() {
compile "no-version"
assertCaptured "Node engine: unspecified"
assertCaptured "PRO TIP: Specify a node version in package.json"
assertCaptured "WARNING: Node version not specified in package.json"
assertCaptured "Resolving node version (latest stable) via semver.io"
assertCaptured "Downloading and installing node 0.10"
assertCapturedSuccess
......@@ -37,7 +37,7 @@ testSpecificVersion() {
testStableVersion() {
compile "stable-node"
assertCaptured "Downloading and installing node 0.10"
assertNotCaptured "PRO TIP"
assertNotCaptured "WARNING"
assertCapturedSuccess
}
......@@ -50,7 +50,7 @@ testUnstableVersion() {
testOldNpm() {
compile "old-npm"
assertCaptured "PRO TIP: This version of npm has several known issues."
assertCaptured "WARNING: This version of npm has several known issues."
assertCapturedSuccess
}
......@@ -66,7 +66,7 @@ testInfoEmpty() {
testDangerousRangeStar() {
compile "dangerous-range-star"
assertCaptured "PRO TIP: Avoid semver ranges like '*'"
assertCaptured "WARNING: Avoid semver ranges like '*'"
assertCaptured "Node engine: *"
assertCaptured "Resolving node version * via semver.io"
assertCaptured "Downloading and installing node 0.10"
......@@ -75,7 +75,7 @@ testDangerousRangeStar() {
testDangerousRangeGreaterThan() {
compile "dangerous-range-greater-than"
assertCaptured "PRO TIP: Avoid semver ranges starting with '>'"
assertCaptured "WARNING: Avoid semver ranges starting with '>'"
assertCaptured "Resolving node version >0.4 via semver.io"
assertCaptured "Downloading and installing node 0.10"
assertCapturedSuccess
......@@ -173,7 +173,7 @@ testProcfileAbsentServerPresent() {
testServerPresentOnly() {
compile "server-present-only"
assertCaptured "PRO TIP: Use 'npm init'"
assertCaptured "WARNING: No package.json found"
assertCaptured "Skipping dependencies"
assertCaptured "'web: node server.js' to new Procfile"
assertFile "web: node server.js" "Procfile"
......
protip() {
warning() {
tip=$1
url=$2
echo "PRO TIP: $tip" >> $warnings
echo "WARNING: $tip" >> $warnings
echo "${url:-https://devcenter.heroku.com/articles/nodejs-support}" >> $warnings
echo "" >> $warnings
}
if [ "$node_engine" == "" ]; then
protip "Specify a node version in package.json" "https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version"
warning "Node version not specified in package.json" "https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version"
elif [ "$node_engine" == "*" ]; then
protip "Avoid semver ranges like '*' in engines.node" "https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version"
warning "Avoid semver ranges like '*' in engines.node" "https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version"
elif [ ${node_engine:0:1} == ">" ]; then
protip "Avoid semver ranges starting with '>' in engines.node" "https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version"
warning "Avoid semver ranges starting with '>' in engines.node" "https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version"
fi
if [ "$modules_source" == "prebuilt" ]; then
protip "Avoid checking node_modules into source control" "https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git-"
warning "Avoid checking node_modules into source control" "https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git-"
elif [ "$modules_source" == "" ]; then
protip "Use 'npm init' and 'npm install --save' to define dependencies"
warning "No package.json found"
fi
if [ "$start_method" == "" ]; then
protip "Include a Procfile, package.json start script, or server.js file to start your app" "https://devcenter.heroku.com/articles/nodejs-support#runtime-behavior"
warning "No Procfile, package.json start script, or server.js file found" "https://devcenter.heroku.com/articles/nodejs-support#runtime-behavior"
fi
if [ "$npm_engine" != "" ]; then
if [ "${npm_engine:0:1}" -lt "2" ]; then
protip "This version of npm has several known issues. You should consider upgrading to the latest release."
warning "This version of npm has several known issues. You should consider upgrading to the latest release."
fi
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment