Skip to content

Commit

Permalink
docs: add README
Browse files Browse the repository at this point in the history
  • Loading branch information
sergioramos committed Jun 13, 2020
1 parent e6ddf9b commit 3bfbc5f
Showing 1 changed file with 50 additions and 3 deletions.
53 changes: 50 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,51 @@
# todo
# serverless-plugin-tree-shake

- [ ] tree-shake handler code;
- [ ] tests;
Shake the file dependency tree and only include files needed.

## install

```bash
yarn add --dev serverless-plugin-tree-shake
```

```bash
npm install --save-dev serverless-plugin-tree-shake
```

## usage

```yaml
plugins:
- serverless-plugin-tree-shake
package:
# no need to spend time doing excluding dev dependencies, given that
# serverless-plugin-tree-shake does it already
excludeDevDependencies: false
```

##### typescript support

This plugins supports typescript natively. It uses the installed typescript package, reads the appropriate config, and transpiles to js according to that config. You can see examples on the [`__fixtures__`](./test/__fixtures__) that start with `ts-`.

##### individually

This plugins supports bundling functions `individually`. Just use that option accordingly:

```yaml
package:
individually: true
excludeDevDependencies: false
```

##### include and exclude

You can use the `include` and `exclude` global, and per-function, configurations and it will include/exclude the especified files/patterns.

## todo

- [ ] tree shake handlers, not only the file tree
- [ ] add benchmarks

## license

BSD-3-Clause

0 comments on commit 3bfbc5f

Please sign in to comment.