-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Expand file tree
/
Copy pathprepare-compat.sh
More file actions
executable file
·43 lines (32 loc) · 982 Bytes
/
prepare-compat.sh
File metadata and controls
executable file
·43 lines (32 loc) · 982 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
42
43
#!/bin/bash
##
# Prepares and packs:
# - tns-core-modules
# inside dist folder
##
set -x
set -e
DIST=dist;
ROOT_DIR=$(cd `dirname $0` && pwd)/..;
cd "$ROOT_DIR"
DEFAULT_NATIVESCRIPT_CORE_ARGS="../nativescript-core*.tgz --no-save"
NATIVESCRIPT_CORE_ARGS=${NATIVESCRIPT_CORE_ARGS:-$DEFAULT_NATIVESCRIPT_CORE_ARGS}
## Prepare tns-core-modules
(
PACKAGE_SOURCE=tns-core-modules-package;
PACKAGE=tns-core-modules;
echo "Clearing $DIST/$PACKAGE"
npx rimraf "$DIST/$PACKAGE"
npx rimraf "$DIST/$PACKAGE*.tgz"
echo "Generating compat package"
npx ts-node --project ./build/tsconfig.json ./build/generate-tns-compat
echo "Copying $PACKAGE_SOURCE $DIST/$PACKAGE..."
npx ncp "$PACKAGE_SOURCE" "$DIST/$PACKAGE"
echo "Copying README and LICENSE to $DIST/$PACKAGE"
npx ncp LICENSE "$DIST"/"$PACKAGE"/LICENSE
(
echo 'TypeScript transpile...'
cd "$DIST/$PACKAGE"
npm install ${NATIVESCRIPT_CORE_ARGS}
)
)