Collection of templates for quick project scaffolding.
These are some templates that I frequently use to scaffold new projects.
Use degit to copy the template:
npx degit metonym/template#<branch> <project-name>
cd <project-name> && yarn
Example using the typescript
template:
npx degit metonym/template#typescript typescript
cd typescript && yarn
There are five categories of templates:
General purpose, library and plugin templates use the native Node.js assertion module for testing. They also have a "prepack" script defined for building the library before publishing to npm. Web app templates start off with only development/build scripts in order to be as light as possible.
ts-node-dev
for fast compiling and the native Node.js assert
library for testing.npx degit metonym/template#typescript typescript
cd typescript && yarn
npx degit metonym/template#vite-lib my-vite-lib
cd my-vite-lib && yarn
npx degit metonym/template#esbuild-lib my-esbuild-lib
cd my-esbuild-lib && yarn
typescript
template but with additional npm publishing metadata.npx degit metonym/template#typescript-lib my-typescript-lib
cd my-typescript-lib && yarn
bun-lib
template but using Bun instead of Yarn/Vitest.npx degit metonym/template#bun-lib my-bun-lib
cd my-bun-lib && yarn
npx degit metonym/template#rollup-lib my-rollup-lib
cd my-rollup-lib && yarn
npx degit metonym/template#component-svelte svelte-component
cd svelte-component && yarn
npx degit metonym/template#component-sveltekit svelte-component
cd svelte-component && yarn
npx degit metonym/template#component-library-sveltekit svelte-component
cd svelte-component && yarn
npx degit metonym/template#vite-lib-svelte my-vite-lib-svelte
cd my-vite-lib-svelte && yarn
npx degit metonym/template#vite-plugin vite-plugin
cd vite-plugin && yarn
npx degit metonym/template#plugin-posthtml posthtml-template
cd posthtml-template && yarn
npx degit metonym/template#plugin-postcss postcss-template
cd postcss-template && yarn
npx degit metonym/template#svelte-preprocessor svelte-preprocess-name
cd svelte-preprocess-name && yarn
npx degit metonym/template#svelte-preprocess-bun svelte-preprocess-name
cd svelte-preprocess-name && yarn
npx degit metonym/template#astro-bun my-astro-bun
cd my-bun-site && bun install
npx degit metonym/template#astro-site my-astro-site
cd my-astro-site && npm install
npx degit metonym/template#astro-svelte my-astro-svelte-app
cd my-astro-svelte-app && yarn
npx degit metonym/template#webpack-svelte my-webpack-svelte-app
cd my-webpack-svelte-app && yarn
webpack-svelte
, except CSS is not emitted to a separate file.npx degit metonym/template#webpack-svelte-lite my-webpack-svelte-lite-app
cd my-webpack-svelte-lite-app && yarn
npx degit metonym/template#rollup-svelte my-rollup-svelte-app
cd my-rollup-svelte-app && yarn
npx degit metonym/template#svite my-svite-app
cd my-svite-app && yarn
npx degit metonym/template#vite-svelte my-vite-svelte-app
cd my-vite-svelte-app && yarn
npx degit metonym/template#vite-svelte-tailwind my-vite-svelte-app
cd my-vite-svelte-app && npm i
npx degit metonym/template#sveltekit-static my-sveltekit-static-app
cd my-sveltekit-static-app && yarn