forked from cfpb/design-manual
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·46 lines (39 loc) · 1.11 KB
/
setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# ==========================================================================
# Setup script for installing project dependencies.
# NOTE: Run this script while in the project root directory.
# It will not run correctly when run from another directory.
# ==========================================================================
# Set script to exit on any errors.
set -e
# Initialize project dependency directories.
init(){
NODE_DIR=node_modules
echo 'npm components directory:' $NODE_DIR
}
# Clean project dependencies.
clean(){
# If the node directory already exists,
# clear it so we know we're working with a clean
# slate of the dependencies listed in package.json.
if [ -d $NODE_DIR ]; then
echo 'Removing project dependency directories...'
rm -rf $NODE_DIR
fi
echo 'Project dependencies have been removed.'
}
# Install project dependencies.
install(){
echo 'Installing project dependencies...'
bundle install
npm install
}
# Run tasks to build the project for distribution.
build(){
echo 'Building project...'
grunt build
echo 'Your project is ready.'
}
init
clean
install
build