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

chore(install): reintroduce single install script #1900

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ This project generates a lot of untracked files, if you wish to reset it to a mi

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:

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

### Run with current build instead of release packages
Can switch the `@angular` packages in `~/public/docs/_examples/node_modules` to the current build packages with
Expand Down
31 changes: 31 additions & 0 deletions scripts/install.sh
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Node 4 is a valid node. Well, there is a new change that made v4 unusable but we could fix that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, node v4 doesn't work for @kwalrath, and more often than not, forgetting to switch to v5 for Kathy has cause problems and results in wasted time.

Are you aware of anyone who must stick with node 4 and who is required to build ng.io docs? (Kathy has to do this every time she tests out a PR for merging :) If not, IMHO, we should just just drop v4.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, no one, but we were always striving to have node 4.x support, but I guess it is fine to not have it on this project.

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"