File tree Expand file tree Collapse file tree 1 file changed +31
-6
lines changed Expand file tree Collapse file tree 1 file changed +31
-6
lines changed Original file line number Diff line number Diff line change @@ -9,14 +9,39 @@ set -eo pipefail
9
9
PATH=./node_modules/.bin:$PATH
10
10
11
11
# =========================================================
12
- # # Documentation
12
+ # # Project
13
13
# =========================================================
14
14
15
- function task:docs { # # Build the documentation files
16
- title " Building documentation"
17
- echo " Creating html pages from markdown..."
18
- sleep 3
19
- echo " Documentation built in dist/ folder."
15
+ function task:init { # # Set up the project for local development
16
+ task:update
17
+ task:help
18
+ }
19
+
20
+ function task:update { # # Update all project dependencies
21
+ project:install-dependencies
22
+ }
23
+
24
+ function task:pr { # # Check out pull request <number> and update
25
+ project:checkout-pr $1
26
+ task:update
27
+ }
28
+
29
+ function project:checkout-pr {
30
+ title " Checking out pull request"
31
+ if [ -z " $1 " ]
32
+ then
33
+ echo " You need to provide a pull request number to check out."
34
+ echo -e " ${BLUE} Usage:${RESET} $0 pr ${YELLOW} <number>${RESET} "
35
+ exit 422
36
+ fi
37
+ echo " Checking out pull request $1 ..."
38
+ git fetch origin refs/pull/$1 /head:refs/remotes/origin/pr/$1
39
+ git checkout origin/pr/$1
40
+ }
41
+
42
+ function project:install-dependencies {
43
+ title " Installing dependencies"
44
+ npm install
20
45
}
21
46
22
47
# =========================================================
You can’t perform that action at this time.
0 commit comments