Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added coffeeify configuration to README #22

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
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