Skip to content

Commit 288ced4

Browse files
authored
Update build and packaging scripts (#872)
- Add compile:release npm script to build the package without source maps. Decreases unpacked size from ~350KB to ~250KB. - Remove :windows variants of npm scripts - Add rimraf to handle cross-platform dir removal - Set "ts-node": { "files": true } in tsconfig.json so that it's not necessary to set env var TS_NODE_FILES - Remove unused assets/README.md (it does not appear to have been used for many years according to npmjs.com) - Use includes "files": [...] property in package.json to indicate dist/ should be included in the built npm package rather than maintaining a list of everything that should be excluded in .npmignore (which has been deleted) - Incorporate above mentioned updates into build.sh
1 parent 5ca16d5 commit 288ced4

File tree

6 files changed

+648
-133
lines changed

6 files changed

+648
-133
lines changed

.npmignore

-41
This file was deleted.

assets/README.md

-63
This file was deleted.

build.sh

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
11
#!/bin/bash
22

33
set -e
4-
trap 'mv _README.md README.md' EXIT
5-
6-
mv README.md _README.md
7-
8-
cp assets/README.md README.md
94

105
rm -rf node_modules
116
npm ci
127

13-
npm run compile
8+
npm run compile:release
149
npm t
1510

1611
echo 'publishing...'

0 commit comments

Comments
 (0)