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

Commit

Permalink
add function builder readme
Browse files Browse the repository at this point in the history
  • Loading branch information
swyxio authored Jul 9, 2019
1 parent 6a39927 commit f6ab964
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/function-builder-detectors/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## function builder detectors

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:

```js
module.exports = {
src: "functions-source", // source for your functions
build: () => {}, // chokidar will call this to build and rebuild your function
npmScript: "build:functions" // optional, the matching package.json script that calls your function builder
}
```

example

- [src](https://github.com/netlify/netlify-dev-plugin/blob/6a3992746ae490881105fbed2e11ca444f79e44e/src/function-builder-detectors/netlify-lambda.js#L29)
- [npmScript](https://github.com/netlify/netlify-dev-plugin/blob/6a3992746ae490881105fbed2e11ca444f79e44e/src/function-builder-detectors/netlify-lambda.js#L30)

0 comments on commit f6ab964

Please sign in to comment.