Skip to content

leggsimon/create-netlify-functions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

create-netlify-functions

This is an initialiser for npm (like create-react-app) which scaffolds a small project for being able to deploy Netlify Functions.

Usage

Where you would substitute <directory-name> for the new directory you want the project to be created in.

This is required, if you don’t specify one, don’t worry it won’t use your current working directory by default.

npm init netlify-functions <directory-name>

or

npx create-netlify-functions <directory-name>

or

yarn create netlify-functions <directory-name>

What does it do?

Currently it creates a single “hello world” lambda in a directory. It sets up the Netlify config so that you could publish it immediately and it should Just Work™.

There will be a test suite already set up for you to add to. Run npm test in your new directory.

There will also be a dev environment set up for you via the netlify-lambda package

Local Development

git clone git@github.com:leggsimon/create-netlify-lambdas.git
cd create-netlify-lambdas
npm install

How to publish

(This is more for me, so I don’t forget)

This uses the np package to deploy. On the master branch locally run np and follow the instructions.

Why?

I’ve really enjoyed how Netlify have made creating lambda functions so easy to set up and deploy and I’d like to make it easier for others to do it I guess…

About

An npm initializer for scaffolding functions to be deployed to Netlify

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published