-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·41 lines (34 loc) · 814 Bytes
/
setup.sh
File metadata and controls
executable file
·41 lines (34 loc) · 814 Bytes
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
#!/bin/sh
# 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...'
npm install
}
# Run tasks to build the project for distribution.
build(){
echo 'Building project...'
./node_modules/.bin/gulp clean
./node_modules/.bin/gulp build
}
init
clean
install
build