https://github.com/rdmurphy/typebundle
🎀 Zero-config Node.js library bundler with support for Babel-transpiled TypeScript.
https://github.com/rdmurphy/typebundle
bundler rollup typescript
Last synced: 7 months ago
JSON representation
🎀 Zero-config Node.js library bundler with support for Babel-transpiled TypeScript.
- Host: GitHub
- URL: https://github.com/rdmurphy/typebundle
- Owner: rdmurphy
- License: mit
- Created: 2019-04-14T03:17:40.000Z (about 7 years ago)
- Default Branch: main
- Last Pushed: 2023-05-22T13:57:50.000Z (about 3 years ago)
- Last Synced: 2025-01-28T20:19:28.696Z (over 1 year ago)
- Topics: bundler, rollup, typescript
- Language: TypeScript
- Homepage:
- Size: 1.84 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Typebundle
Zero-config Node.js library bundler with support for Babel-transpiled TypeScript. A work in progress! Outputs both compiled JavaScript and valid TypeScript `d.ts` files.
## Installation
```sh
npm i -D typebundle
```
## Usage
```sh
typebundle [--options]
```
Typebundle's primary interface is on the command line. The only required positional argument is ``, which tells `typebundle` which files to consider entry points. Any glob that's compatible with `tiny-glob` is valid and switches `typebundle` into multi-entry mode if it finds multiple files.
#### A single source file
```sh
typebundle src/index.ts --output dist --target 10
```
#### Multiple source files
```sh
typebundle "src/{cli,index}.ts" --output dist --target 10
```
#### Run in watch mode
```sh
typebundle src/index.ts --output dist --target 10 --watch
```
## Options
```
--output The output directory, defaults to "dist"
--compress If passed, "terser" will be used to minify the output
--target The optional minimum version of Node.js to target for
transpiling, this is passed directly to "@babel/preset-env" at
"targets.node". To target the current version of Node, pass
"current". If not provided no code will run through
"@babel/preset-env" and only types will be stripped.
--types The directory where "d.ts" files are output, defaults to where
--output is set
--watch Watches source files for changes and re-builds, does not output
"d.ts" files for speed
```
## License
MIT