Skip to content

Commit e16bb8a

Browse files
authored
Add all-in-one pack script (#45)
1 parent 277953d commit e16bb8a

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

scripts/build-and-pack.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
3+
# Stop on error.
4+
set -e
5+
6+
# Get the directory of the script.
7+
SCRIPT_DIR=$(dirname $(readlink -f $0))
8+
9+
# Get the directory of the project.
10+
PROJECT_BASE_DIR=$(dirname $SCRIPT_DIR)
11+
12+
# Change to the project directory.
13+
cd $PROJECT_BASE_DIR
14+
15+
# Install dependencies, build, and test.
16+
echo "npm clean install"
17+
npm ci
18+
19+
echo "npm run build"
20+
npm run build
21+
22+
echo "npm run test"
23+
npm run test
24+
25+
# Create a tarball.
26+
echo "npm pack"
27+
npm pack

0 commit comments

Comments
 (0)