-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Expand file tree
/
Copy pathbuild-docs.sh
More file actions
executable file
·38 lines (31 loc) · 828 Bytes
/
build-docs.sh
File metadata and controls
executable file
·38 lines (31 loc) · 828 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
#!/usr/bin/env bash
set -e
ENV="${ENV:-dev}"
DIST_DIR="dist"
PACKAGE_VERSION="${PACKAGE_VERSION:-0.0.0}"
archive_dist_dir() {
DIR="$1"
(cd "$DIST_DIR" && tar zcvf "nativescript-$DIR-$ENV-$PACKAGE_VERSION.tar.gz" $DIR)
}
npm_install() {
# Don't install modules twice.
MARKER_FILE="./node_modules/installed"
if [ ! -f "$MARKER_FILE" ] ; then
# Fixes perm issue while installing
npm i -g npm@^6.13.6
npm install
npm install @types/handlebars@4.0.33
touch "$MARKER_FILE"
fi
}
extract_apiref() {
APIREF_DIR="$DIST_DIR/api-reference"
rm -rf "$APIREF_DIR"
# npm_install
npx typedoc --tsconfig tsconfig.typedoc.json
# mv "dist/apiref" "$APIREF_DIR"
# archive_dist_dir "api-reference"
}
if [ "${BASH_SOURCE[0]}" == "$0" ] ; then
extract_apiref
fi