Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,37 @@ plugins: [

Adding the `custom.optimize` property in `s-component.json` applies the optimization setting to ALL functions in that component. Adding the `custom.optimize` property to `s-function.json` applies the optimization setting to ONLY that specific function. You can use `custom.optimize` in both places. The `custom.optimize` setting in `s-function.json` will override the setting in `s-component.json`.

## Coffeescript handlers with coffeeify

You can write your lambda code in `handler.coffee` instead of `handler.js`


Install coffeeify within the root context of your project:

npm install coffeeify --save


Add the coffeeify transform to `s-component.json`:

```javascript
{
"name": "nodejscomponent",
"runtime": "nodejs",
"custom": {
"optimize": {
"exclude": [ "aws-sdk" ],
"handlerExt": "coffee",
"extensions": [".coffee"],
"transforms": [
{
"name": "coffeeify"
}
]
}
}
}
```


## ES6 with Babel and Babelify

Expand Down