A Zero-configuration TypeScript transpiler and bundler.
https://github.com/microsoft/TypeScript/wiki/Using-the-Compiler-API
- Transpile
.ts
file to.js
and.d.ts
- Bundle
.js
and.d.ts
output automatically - Inline and treeshaking
sideEffectFree: false
es modules which defined indevDependencies
- Allow multiple
.ts
entries underbin
orlib
folder - Compress the
public
folder withgzip
,br2
andwebp
- Mangle, Prettier output code automatically
- Generate
package.json
for the bundle - Generate
settings.js
from different type of config files - No intermediate files written on disk, keep your project folder clean
- Improve
agentframework
performance
- 1.x for typescript < 5.0
- 2.x for typescript >= 5.0
- Install
npm i -g git+ssh://[email protected]/e2tox/tsb.git
- Make your project structure similar as following:
Project
|-- bin
| |-- cli.ts
| |-- ...
|
|-- conf
| |-- settings.properties
| |-- settings.yaml
| |-- ...
|
|-- lib
| |-- index.ts
| |-- library.ts
| |-- utils.ts
| |-- ...
|
|-- public
| |-- image.gif
| |-- page.html
| |-- embeded.js
| |-- ...
|
|-- src
| |-- app.ts
| |-- utils.ts
| |-- services
| | |-- users.ts
| | |-- groups.ts
| | |-- ...
| |-- ...
|
|-- index.ts
|-- package.json
|-- tsconfig.json
- run this command at project root
tsb
- JavaScript File (settings.js)
- JSON File (settings.json)
- YAML File (settings.yaml, settings.yml)
- JSON File (settings.json)
- JSON5 File (settings.json5)
- INI File (settings.ini)
- Properties File (settings.properties)
https://github.com/e2tox/tsb/issues
Please also include a link to a sample code repository which can reproduce the issue.