👟 Building Netlify Functions with TypeScript easily
📦 Package Manager agnostic
🐾 No production footprint
🚀 Ready to deploy
npx create-netlify-ts
yarn create netlify-ts
❓ Answer the questions and start coding!
{{ package-name }}
├── src
│ └── {{ your-function-name }}.ts
├── package.json
├── .babelrc
├── .gitignore
└── netlify.toml
All depdendencies are installed as devDependencies
, create-netlify-ts has no footprint on your production code.
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
- Netlify CLI To run Netlify Functions locally
- Prettier: with some opinionated configuration
It‘s a dangerous road out there. Take these:
📹 Write an API with Netlify Functions and TypeScript
🐙 Monster As A Service: written in TS, deployed to Netlify