From 04b4866eca2e1e400f8e7f5bea8f22952d526f43 Mon Sep 17 00:00:00 2001 From: Kiryl Yermakou Date: Wed, 2 Mar 2016 19:54:39 -0500 Subject: [PATCH 1/2] Added coffeeify configuration to README --- README.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/README.md b/README.md index ff615fd..c79b6c8 100644 --- a/README.md +++ b/README.md @@ -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 From 43adc50fbd1591e8605e896f0b16296997e134fb Mon Sep 17 00:00:00 2001 From: Kiryl Yermakou Date: Mon, 14 Mar 2016 10:12:39 -0400 Subject: [PATCH 2/2] Lost indent space --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c79b6c8..d56a124 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ Add the coffeeify transform to `s-component.json`: "custom": { "optimize": { "exclude": [ "aws-sdk" ], - "handlerExt": "coffee", + "handlerExt": "coffee", "extensions": [".coffee"], "transforms": [ {