Serverless plugin that compiles TypeScript code and bundles dependencies with node-file-trace
npm install serverless-plugin-neoServerless plugin that compiles TypeScript code and bundles dependencies with node-file-trace
This plugin was originally based on serverless-plugin-typescript and offers the following benefits:
- Significantly smaller packages
- Monorepo support
> :warning: This plugin is still in the early stages of development and some things might not work
- Only AWS is supported
- Individual packaging has not been tested
1. Install the plugin
``sh`
npm install serverless-plugin-neo
1. Add plugin to Serverless Config file
`yaml`
plugins:
- serverless-plugin-neo
...
- serverless-offline
If you're using the serverless-offline plugin make sure it goes after serverless-plugin-neo
1. Configure plugin (optional)
`yaml`
custom:
serverless-plugin-neo:
baseDirectory: '.'
tsconfig: 'tsconfig.json'
There are no required settings. You can see a list of all settings and their defaults below.
1. Build your code
`sh`
serverless package
| Name | Type | Default | Description |
| --------------- | -------- | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| baseDirectory | string | process.cwd() | Your project's root directory. Defaults to process.cwd in a single repo project. Attempts to find the root package.json in a monorepo project. |/aws-sdk//*
| excludePackages | string[] | | A list of packages to exclude from bundling. See the node-file-trace docs for details. |false
| skipCleanup | boolean | | Clean up .build directory after packaging. Disabling this can be useful for troubleshooting build issues. |tsconfig.json
| tsconfig | string | | tsconfig filename |
If you'd like to contribute to this project we recommend that you first open an issue to discuss your proposed change.
1. Fork this repo
1. Clone the forked repo
1. Install dependencies: npm install
#### npm start
#### npm run build
To clean the build directory run npm run clean
#### npm run test
1. Update the version in package.jsonCHANGELOG.md
1. Add an entry in npm pack --dry-run
1. Commit your changes
1. Run to see what will be publishednpm publish
1. Run 1.0.0
1. Create a release on GitHub. Use the version as the tag and release name. For example for version the tag and release name would be v1.0.0`.