forked from supertokens/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setupProject
executable file
·41 lines (34 loc) · 960 Bytes
/
setupProject
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/bash
RED='\033[0;31m'
NC='\033[0m' # No color
YELLOW='\033[33m'
GREEN='\033[32m'
BLUE='\033[34m'
currentDir=$(pwd)
for d in *; do
if [ -d "$d" ]; then
dirName=$(basename $d)
if [ $dirName == "static" ] || [ $dirName == "docs_dev_server" ]; then
continue
fi
echo -e "${YELLOW}Installing node modules for ${BLUE}$dirName${YELLOW} documentation${NC}\n"
if [ -z "$(ls -A $d)" ]; then
echo -e "${YELLOW}$d is an empty directory, skipping this folder${NC}"
else
cd "$d/website"
npm i -d >/dev/null 2>/dev/null
cd $currentDir
echo -e "${GREEN}Done${NC}\n"
fi
fi
done
cd $currentDir
echo -e "${YELLOW}Installing node modules for the dev server\n"
cd ./docs_dev_server/app
npm i -d >/dev/null 2>/dev/null
echo -e "${GREEN}Done${NC}\n"
cd $currentDir
./buildAllDocs
echo -e "${GREEN}Done${NC}\n"
echo -e "${NC}"
echo ""