Minimal, sensible defaults, fast.
Read the blog post about this template.
pnpm install
(or npm install
if you don't use pnpm
).pnpm dev
for development.pnpm test
to run tests.pnpm build
for production builds.Note: You can install pnpm
via homebrew
on macOS: brew install pnpm
.
npm-run-all
to parallelize local test runs.--cache
flags. Use them!eslint
. It commonly takes 50% of the eslint runtime!@ianvs/prettier-plugin-sort-imports
.swc
with ts-node
for fast node scripts with ESM. See below ↓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.');