Skip to content

Commit

Permalink
(docs): document how to configure multiple entry files
Browse files Browse the repository at this point in the history
- use the same example as in the tests
  • Loading branch information
agilgur5 committed Dec 12, 2019
1 parent 03bd95f commit 821a1ad
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Despite all the recent hype, setting up a new TypeScript (x React) library can b
- [`tsdx build`](#tsdx-build)
- [`tsdx test`](#tsdx-test)
- [`tsdx lint`](#tsdx-lint)
- [Multiple Entry Files](#multiple-entry-files)
- [Author](#author)
- [License](#license)

Expand Down Expand Up @@ -455,6 +456,17 @@ Examples
$ tsdx lint src --report-file report.json
```
### Multiple Entry Files
You can run `tsdx watch` or `tsdx build` with multiple entry files, for example:
```shell
tsdx build --entry src/index.ts --entry src/foo.ts
# outputs dist/index.js dist/foo.js and their respective formats and declarations
```
When given multiple entries, TSDX will output separate bundles for each file for each format, as well as their declarations. Each file will be output to `dist/` with the same name it has in the `src/` directory.
## Author
- [Jared Palmer](https://twitter.com/jaredpalmer)
Expand Down

0 comments on commit 821a1ad

Please sign in to comment.