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: