Skip to content
This repository was archived by the owner on Sep 12, 2019. It is now read-only.

Commit f6ab964

Browse files
authored
add function builder readme
1 parent 6a39927 commit f6ab964

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
## function builder detectors
2+
3+
similar to project detectors, each file here detects function builders. this is so that netlify dev never manages the webpack or other config. the expected output is very simple:
4+
5+
```js
6+
module.exports = {
7+
src: "functions-source", // source for your functions
8+
build: () => {}, // chokidar will call this to build and rebuild your function
9+
npmScript: "build:functions" // optional, the matching package.json script that calls your function builder
10+
}
11+
```
12+
13+
example
14+
15+
- [src](https://github.com/netlify/netlify-dev-plugin/blob/6a3992746ae490881105fbed2e11ca444f79e44e/src/function-builder-detectors/netlify-lambda.js#L29)
16+
- [npmScript](https://github.com/netlify/netlify-dev-plugin/blob/6a3992746ae490881105fbed2e11ca444f79e44e/src/function-builder-detectors/netlify-lambda.js#L30)

0 commit comments

Comments
 (0)