Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit daca93c

Browse files
chalinwardbell
authored andcommitted
chore(install): reintroduce single install script
closes #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).
1 parent a19c2ce commit daca93c

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ This project generates a lot of untracked files, if you wish to reset it to a mi
119119

120120
Also, there is a script available for Linux, OSX and Windows Gitbash users that will setup the project using the steps shown in this section:
121121

122-
- `npm install --no-optional && ./scripts/examples-install.sh`
122+
- `./scripts/install.sh`
123123

124124
### Run with current build instead of release packages
125125
Can switch the `@angular` packages in `~/public/docs/_examples/node_modules` to the current build packages with

scripts/install.sh

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/usr/bin/env bash
2+
3+
set -e -o pipefail
4+
5+
cd `dirname $0`/..
6+
7+
if [[ "$(node --version)" < "v5" ]]; then
8+
echo "ERROR: bad version of node detected. If you have nvm installed, type:"
9+
echo " nvm use"
10+
echo "Aborting installation."
11+
exit 1;
12+
else
13+
echo "Node version: $(node --version)"
14+
fi
15+
16+
echo "Installing main packages ..."
17+
npm install --no-optional
18+
19+
echo "Patching ..."
20+
source ./scripts/patch.sh
21+
22+
if [ "$TRAVIS" != "true" ]; then
23+
echo "Rebuilding node-sass, just in case ..."
24+
npm rebuild node-sass;
25+
fi
26+
27+
echo "Installing packages for examples ..."
28+
source ./scripts/examples-install.sh
29+
set +x
30+
31+
echo "Installation done"

0 commit comments

Comments
 (0)