Skip to content

Commit 2e15393

Browse files
vojtajinamhevery
authored andcommitted
chore(scripts): add init-repo script
1 parent 331cd5a commit 2e15393

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

init-repo.sh

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Script to initialize angular repo
4+
# - install required node packages
5+
# - install Testacular
6+
# - install git hooks
7+
8+
9+
node=`which node 2>&1`
10+
if [ $? -ne 0 ]; then
11+
echo "Please install NodeJS."
12+
echo "http://nodejs.org/"
13+
exit 1
14+
fi
15+
16+
npm=`which npm 2>&1`
17+
if [ $? -ne 0 ]; then
18+
echo "Please install NPM."
19+
fi
20+
21+
22+
echo "Installing required npm packages..."
23+
npm install
24+
25+
testacular=`which testacular 2>&1`
26+
if [ $? -ne 0 ]; then
27+
echo "Installing Testacular..."
28+
npm install -g testacular
29+
fi
30+
31+
echo "Installing git hooks..."
32+
ln -sf ../../validate-commit-msg.js .git/hooks/commit-msg

0 commit comments

Comments
 (0)