Skip to content

Commit

Permalink
chore(build): minor tweaks & reduce package size
Browse files Browse the repository at this point in the history
  • Loading branch information
STRML committed Jun 18, 2021
1 parent 5f8a946 commit 4e4ea5a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
examples/
8 changes: 5 additions & 3 deletions examples/mk-examples.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#!/bin/bash

cp ../textFit.js .
cat textFit.js | \
DIR="$(dirname "$0")"

cp $DIR/../textFit.js $DIR
cat $DIR/textFit.js | \
sed 's/function processItem(/async function processItem(/' | \
sed 's/\/\/ await injection point/await new Promise((resolve) => setTimeout(resolve, 500));/' \
> textFit.slow.js
> $DIR/textFit.slow.js
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "uglifyjs textFit.js > textFit.min.js",
"build-example": "sh examples/mk-examples.sh",
"prepublish": "npm run build"
},
"repository": {
Expand Down

0 comments on commit 4e4ea5a

Please sign in to comment.