serverless-plugin-neo

0.3.2 • Public • Published

Serverless Plugin Neo

Serverless 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

Known Issues

⚠️ 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

Usage

  1. Install the plugin

    npm install serverless-plugin-neo
  2. Add plugin to Serverless Config file

    plugins:
      - serverless-plugin-neo
      ...
      - serverless-offline

    If you're using the serverless-offline plugin make sure it goes after serverless-plugin-neo

  3. Configure plugin (optional)

    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.

  4. Build your code

    serverless package

Settings

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.
excludePackages string[] **/aws-sdk/**/* A list of packages to exclude from bundling. See the node-file-trace docs for details.
skipCleanup boolean false Clean up .build directory after packaging. Disabling this can be useful for troubleshooting build issues.
tsconfig string tsconfig.json tsconfig filename

Contributing

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
  2. Clone the forked repo
  3. Install dependencies: npm install

Development

npm start

Building

npm run build

To clean the build directory run npm run clean

Testing

npm run test

Publishing

  1. Update the version in package.json
  2. Add an entry in CHANGELOG.md
  3. Commit your changes
  4. Run npm pack --dry-run to see what will be published
  5. Run npm publish
  6. Create a release on GitHub. Use the version as the tag and release name. For example for version 1.0.0 the tag and release name would be v1.0.0.

Readme

Keywords

none

Package Sidebar

Install

npm i serverless-plugin-neo

Weekly Downloads

206

Version

0.3.2

License

MIT

Unpacked Size

60.3 kB

Total Files

15

Last publish

Collaborators

  • iansu