create-netlify-ts
v0.1.0
Published
<img align="right" width="300" src="./netlify-ts.png" />
Downloads
15
Readme
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