Skip to content

Commit

Permalink
Added minified build
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikolas Howard committed Apr 2, 2024
1 parent e09e912 commit be57a99
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 108 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ There is an in-browser editor and tree visualiser that you can try [HERE](https:
```sh
$ npm install --save mistreevous
```
This package is built using esbuild to target both Node and browsers. If you would like to use this package in a browser you can just reference `dist/bundle.js` in a `<script>` tag.
This package is built using esbuild to target both Node and browsers. If you would like to use this package in a browser you can just use `dist/mistreevous.js` or `dist/mistreevous.min.js`.

# Example
```js
Expand Down
104 changes: 0 additions & 104 deletions dist/RootAstNodesBuilder.d.ts

This file was deleted.

2 changes: 1 addition & 1 deletion dist/bundle.js → dist/mistreevous.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
2 changes: 2 additions & 0 deletions dist/mistreevous.min.js

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions dist/mistreevous.min.js.map

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@
"typescript": "^5.3.3"
},
"scripts": {
"build": "npm-run-all build:format build:node build:web build:typecheck",
"build": "npm-run-all build:format build:node build:web build:web-minified build:typecheck",
"watch": "npm run build:node -- --watch",
"test": "npm-run-all build test:unit-test",
"build:format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
"build:node": "esbuild ./src/index.ts --bundle --sourcemap --outdir=dist --platform=node",
"build:web": "esbuild ./src/index.ts --bundle --sourcemap --platform=browser --global-name=mistreevous --outfile=dist/bundle.js",
"build:web": "esbuild ./src/index.ts --bundle --sourcemap --platform=browser --global-name=mistreevous --outfile=dist/mistreevous.js",
"build:web-minified": "esbuild ./src/index.ts --bundle --sourcemap --platform=browser --global-name=mistreevous --minify --outfile=dist/mistreevous.min.js",
"build:typecheck": "tsc --emitDeclarationOnly",
"test:unit-test": "mocha --require ts-node/register 'test/**/*.spec.ts'"
},
Expand Down

0 comments on commit be57a99

Please sign in to comment.