Skip to content
/ rapid-prototyping Public template

"Man is a tool-using animal. Without tools he is nothing, with tools he is all." — Carlyle

Notifications You must be signed in to change notification settings

kaizau/rapid-prototyping

Repository files navigation

Rapid Prototyping Template

Goal: a simple, get sh*t done toolkit.

Opinionated takes:

  • React, Vue, and other SPA frameworks are overkill for 90% of projects.
  • Adding tests or TypeScript before you have user traction is about as restrictive as wearing a tuxedo / evening gown to a triathlon.
  • Expect to throw this version away and rewrite it The Right Way™ after you figure out what you're actually building.
  • When in doubt, follow sane defaults.

Installation

Expects globally-installed degit and one of either vercel or netlify-cli.

  1. Clone template with degit kaizau/rapid-prototyping <your-new-project>
  2. Install dependencies with npm i
  3. Copy .env.example to .env to assign variables

Usage

Use one of the commands below to start a development server on localhost:8888.

npm start         # static server
npm run vercel    # static server + vercel functions
npm run netlify   # static server + netlify functions

Deploy to Vercel or Netlify using the respective CLI tool or git CI. You can also inspect a production build locally:

npm run build     # build to dist
npm run analyze   # build + bundle analysis

Notes

  • Parcel is the least bad bundler out there, and provides a simpler local development experience than alternatives.
    • Cache-busting hashes, minification, transpiling... all of these happen automatically using sensible defaults.
    • Module resolution automatically routes absolute paths to the project root.
  • EJS adds JS templating to static HTML.
  • PostCSS is included to support Tailwind, which provides a pragmatic foundation for layout and styling.
  • Local development scripts have been configured to be roughly identical.
    • A local middleware proxy is to emulate clean URLs (no ".html" extension).
    • Only reason to use npm run (vercel|netlify) is for local serverless functions.

About

"Man is a tool-using animal. Without tools he is nothing, with tools he is all." — Carlyle

Topics

Resources

Stars

Watchers

Forks