forked from angular/angular.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(install): reintroduce single install script
closes angular#1900 This single install script: - Checks for the proper version of node (some of us develop with node v4 on other sites, and it is too easy to forget to switch to v5 for angular.io). - Applies the patch (that is necessary to support harp compilation of Dart API pages).
- Loading branch information
Showing
2 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e -o pipefail | ||
|
||
cd `dirname $0`/.. | ||
|
||
if [[ "$(node --version)" < "v5" ]]; then | ||
echo "ERROR: bad version of node detected. If you have nvm installed, type:" | ||
echo " nvm use" | ||
echo "Aborting installation." | ||
exit 1; | ||
else | ||
echo "Node version: $(node --version)" | ||
fi | ||
|
||
echo "Installing main packages ..." | ||
npm install --no-optional | ||
|
||
echo "Patching ..." | ||
source ./scripts/patch.sh | ||
|
||
if [ "$TRAVIS" != "true" ]; then | ||
echo "Rebuilding node-sass, just in case ..." | ||
npm rebuild node-sass; | ||
fi | ||
|
||
echo "Installing packages for examples ..." | ||
source ./scripts/examples-install.sh | ||
set +x | ||
|
||
echo "Installation done" |