create-netlify-ts
create-netlify-ts copied to clipboard
π Building Netlify Functions with TypeScript has never been this easy

create-netlify-ts
π Building Netlify Functions with TypeScript easily
π¦ Package Manager agnostic
πΎ No production footprint
π Ready to deploy
β―_
npm
npx create-netlify-ts
yarn
yarn create netlify-ts
β Answer the questions and start coding!
π² 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:
πΉ Write an API with Netlify Functions and TypeScript
π Monster As A Service: written in TS, deployed to Netlify