create-netlify-ts
â?¯_
npm
npx create-netlify-ts
yarn
yarn create netlify-ts
ð² File tree
{{ package-name }}
âââ src
â âââ {{ your-function-name }}.ts
âââ package.json
âââ .babelrc
âââ .gitignore
âââ netlify.toml
ð§³ Installed dependencies
All depdendencies are installed as devDependencies
, create-netlify-ts has no footprint on your production code.
Required dependencies
Package Name | Why |
---|---|
netlify-lambda | Adds build-step to Netlify Functions |
typescript | The compiler for TypeScript (tsc ) |
@babel/preset-env | Tells Babel which JavaScript syntax to output |
@babel/preset-typescript | Teach Babel to use TypeScript compiler |
@types/aws-lambda | Request/Response types for AWS Lambdasâ |
â : Netlify Functions runs on top of AWS-Lambdas
Optional dependencies
- Netlify CLI To run Netlify Functions locally
- Prettier: with some opinionated configuration
ð« Flying solo
Itâs a dangerous road out there. Take these: