Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/HugoDF/netlify-lambda-tailwind-static-starter
A starter project with Netlify Lambda, Tailwind CSS and static pages.
https://github.com/HugoDF/netlify-lambda-tailwind-static-starter
boilerplate netlify-deployment netlify-functions netlify-lambda tailwind-css tailwindcss
Last synced: 13 days ago
JSON representation
A starter project with Netlify Lambda, Tailwind CSS and static pages.
- Host: GitHub
- URL: https://github.com/HugoDF/netlify-lambda-tailwind-static-starter
- Owner: HugoDF
- License: mit
- Created: 2019-05-27T16:37:19.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-03T22:46:49.000Z (almost 2 years ago)
- Last Synced: 2024-10-27T22:39:39.686Z (16 days ago)
- Topics: boilerplate, netlify-deployment, netlify-functions, netlify-lambda, tailwind-css, tailwindcss
- Language: JavaScript
- Homepage: https://tailwind-static-starter.netlify.com/
- Size: 3.4 MB
- Stars: 8
- Watchers: 2
- Forks: 2
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-tailwindcss - Netlify Lambda Starter - Netlify Lambda boilerplate using Tailwind CSS. (Starters & Themes)
README
# Netlify Lambda Tailwind Static Starter demo
> A starter project with Netlify Lambda, Tailwind CSS and static pages.
[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/HugoDF/netlify-lambda-tailwind-static-starter)
There's a lambda generating random emoji 👍 at [./src/lambda/emoji.js](./src/lambda/emoji.js)
The index page is just HTML with inline scripts.
A JavaScript function intercepts form submits and sends them using `fetch` instead. There's also a helper to get field values using their name, [see `getFieldValue(form, fieldName)` on GitHub](https://github.com/HugoDF/netlify-lambda-tailwind-static-starter/blob/fc936bd76f201c90ade459a9ab73bf19fdab6aec/public/index.html#L65).
This is a good starting point for quick Lambda demos.
## Development setup
You should run `yarn` before starting.
The following scripts are available:
* `yarn start`: start the Lambda(s) and serving the static directory using [Netlify Dev](https://www.netlify.com/products/dev/) . **Important:** before `start`, `yarn build:tw` runs.
* `yarn build:tw`: build the full set of Tailwind CSS utilities (useful for development), make sure to check what your site looks will look like live using `yarn build:css`
* `yarn build`: run netlify-lambda build + Tailwind CSS production build (removes unused classes using PurgeCSS)
* `yarn build:css`: Tailwind CSS production build (removes unused classes using PurgeCSS)
* `yarn lint` and `yarn format`: runs XO, the "JavaScript linter with great defaults" (see [github.com/xojs/xo](https://github.com/xojs/xo#readme)) with or without the `--fix` flag respectively