mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 19:26:42 +08:00

* chore(release): @nativescript/core@7.1.1 * feat(core): rollup additional Utils * fix(webpack): support other workspace config styles * chore(release): @nativescript/core@7.1.2 * fix(android): BottomNavigation fragment child already has a parent (#9148) closes https://github.com/NativeScript/NativeScript/issues/8132 closes https://github.com/NativeScript/NativeScript/issues/7901 closes https://github.com/NativeScript/NativeScript/issues/9051 closes https://github.com/NativeScript/NativeScript/issues/8251 * chore(release): @nativescript/core@7.1.3 * types: missing typings for iosIgnoreSafeArea (#9153) * Update build-docs.sh Co-authored-by: Nathan Walker <walkerrunpdx@gmail.com> Co-authored-by: Martin Guillon <martin.guillon@akylas.fr>
60 lines
1.5 KiB
Bash
Executable File
60 lines
1.5 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -e
|
|
|
|
ENV="${ENV:-dev}"
|
|
DIST_DIR="bin/dist"
|
|
TARGET_DIR="$DIST_DIR/snippets"
|
|
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_snippets() {
|
|
BIN="./node_modules/markdown-snippet-injector/extract.js"
|
|
|
|
npm install markdown-snippet-injector
|
|
|
|
for SNIPPET_DIR in {apps/automated,apps/toolbox,apps/ui,packages/core} ; do
|
|
echo "Extracting snippets from: $SNIPPET_DIR"
|
|
node "$BIN" --root="$SNIPPET_DIR" --target="$TARGET_DIR" \
|
|
--sourceext=".js|.ts|.xml|.html|.css"
|
|
done
|
|
|
|
archive_dist_dir "snippets"
|
|
}
|
|
|
|
extract_apiref() {
|
|
APIREF_DIR="$DIST_DIR/api-reference"
|
|
rm -rf "$APIREF_DIR"
|
|
|
|
npm_install
|
|
#npx api-extractor run --config tools/scripts/api-extractor.json --local --verbose && (cd packages/core && cat nativescript-core.header index.d.ts > tmp_file && mv tmp_file nativescript-core.d.ts)
|
|
npx typedoc --tsconfig tools/scripts/tsconfig.typedoc.json
|
|
|
|
mv "dist/apiref" "$APIREF_DIR"
|
|
archive_dist_dir "api-reference"
|
|
}
|
|
|
|
rm -rf "$TARGET_DIR"
|
|
mkdir -p "$TARGET_DIR"
|
|
|
|
if [ "${BASH_SOURCE[0]}" == "$0" ] ; then
|
|
extract_snippets
|
|
extract_apiref
|
|
fi
|