Marco Lüthy e37c45f6c9 feat: add support for Serverless node devDeps exclusion feature
Serverless 0.16.0 introduced a feature which excludes Node.js dev dependencies from .zip files. The feature uses package.json to find which dependencies can be excluded.
https://github.com/serverless/serverless/pull/3737

This commit adds the package.json to the .build folder, so that Serverless can find the package.json file.
2017-07-02 18:54:47 +02:00
2017-06-10 12:19:32 +02:00
Up
2017-06-16 15:31:47 +02:00
2017-04-22 16:07:11 +02:00
2017-06-20 08:34:14 +02:00
2017-06-13 15:12:58 +02:00
2017-05-09 12:47:48 +02:00
2017-04-22 16:00:55 +02:00
2017-06-10 12:19:32 +02:00

serverless-plugin-typescript

serverless npm version CircleCI

Serverless plugin for zero-config Typescript support

Features

  • Zero-config: Works out of the box without the need to install any other compiler or plugins
  • Supports ES2015 syntax + features (export, import, async, await, Promise, ...)

Install

yarn add --dev serverless-plugin-typescript

Add the following plugin to your serverless.yml:

plugins:
  - serverless-plugin-typescript

Example

See example folder for a minimal example.

tsconfig.json

The default tsconfig.json file used by the plugin looks like this:

{
  "preserveConstEnums": true,
  "strictNullChecks": true,
  "sourceMap": true,
  "target": "es5",
  "outDir": ".build",
  "moduleResolution": "node",
  "lib": ["es2015"],
  "rootDir": "./"
}

Note 1: The outDir option cannot be overwritten.

Note 2: Don't confuse the tsconfig.json in this repository with the one mentioned above.

Including extra files

All files from package/include will be included in the final build file. See Exclude/Include

Help & Community Slack Status

Join our Slack community if you run into issues or have questions. We love talking to you!

S
Description
No description provided
Readme 216 KiB
Languages
TypeScript 100%