GitXplorerGitXplorer
c

vite-ts-react-tailwind-template

public
550 stars
35 forks
0 issues

Commits

List of commits on branch main.
Unverified
155f1b579ea29bb94c08c80d5e5b6ab38801a536

Update deps.

ccpojer committed a year ago
Unverified
3c312ba1d9ab361484c52de6cc731b66af24376a

Update deps.

ccpojer committed a year ago
Unverified
4945ed7c64d4867553c77505a7d5ebc20908d04b

Remove `FUNDING.yml` since this is a template.

ccpojer committed a year ago
Unverified
1819aa5a71df1cb0eeba13fb0e25d3aaf5d32803

Update deps.

ccpojer committed a year ago
Unverified
3300a459358b99cd449d5362aabba40b4e677cdb

Update deps + Use `nodenxt` in `tsconfig.json`.

ccpojer committed a year ago
Unverified
0dbfb30ad1c630e715be50a65361aba132a51b05

Update deps, bump Node to 20.6.1 to unbreak CI.

ccpojer committed a year ago

README

The README file for this repository.

Starter Kit for Vite, React, TypeScript, Tailwind and Node.js ESM

Minimal, sensible defaults, fast.

Read the blog post about this template.

Technologies

screenshot of App.tsx

Setup

  • Press the "Use this template" on the top of this repository's GitHub page.
  • Run pnpm install (or npm install if you don't use pnpm).
  • pnpm dev for development.
  • Use pnpm test to run tests.
  • pnpm build for production builds.

Note: You can install pnpm via homebrew on macOS: brew install pnpm.

Protips for the fastest Developer Experience

  • Use npm-run-all to parallelize local test runs.
  • Prettier and eslint have --cache flags. Use them!
  • Do not run prettier inside of eslint. It commonly takes 50% of the eslint runtime!
  • Automatically sort imports when running prettier/saving the document via @ianvs/prettier-plugin-sort-imports.
  • Use swc with ts-node for fast node scripts with ESM. See below ↓

Run node scripts with ESM and TypeScript, fast.

Create a script.ts file, run chmod x script.ts and execute it via ./script.ts.

#!/usr/bin/env node --no-warnings --experimental-specifier-resolution=node --loader ts-node/esm

console.log('Your code goes here.');

Use this to restart your scripts instantly when a file changes:

#!/usr/bin/env NODE_ENV=development node --watch --no-warnings --experimental-specifier-resolution=node --loader ts-node/esm

console.log('This processes instantly restarts when a file changes.');