Skip to content

Commit

Permalink
Update build and packaging scripts (#872)
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
mdmower committed Nov 12, 2023
1 parent 95543d6 commit dd4027f
Show file tree
Hide file tree
Showing 6 changed files with 648 additions and 133 deletions.
41 changes: 0 additions & 41 deletions .npmignore

This file was deleted.

63 changes: 0 additions & 63 deletions assets/README.md

This file was deleted.

7 changes: 1 addition & 6 deletions build.sh
@@ -1,16 +1,11 @@
#!/bin/bash

set -e
trap 'mv _README.md README.md' EXIT

mv README.md _README.md

cp assets/README.md README.md

rm -rf node_modules
npm ci

npm run compile
npm run compile:release
npm t

echo 'publishing...'
Expand Down

0 comments on commit dd4027f

Please sign in to comment.