This repository hold boilerplates or templates for creating a TypeScript program with Bun.
- Preinstalled with eslint and @antfu/eslint-config.
- Predefined common scripts like
format,lint, etc. - Predifined common vscode settings and extensions.
To create a project using this template, make a new directory with your chosen project name, navigate into it, then run the following command:
bunx --bun tiged acfatah/bun-templates/templates/starterAfterwards, you can update and install the latest dependencies with:
bun updateLook under the templates directory to see the other available templates.
Replace /starter with the template that you want to use.
Common files that are similar across templates are stored under templates/_.
Optionally you may include them with the same command as above.
Example to copy build.ts instead of the entire scripts directory:
bunx --bun get-file acfatah/bun-templates/templates/_/scripts/build.tsArchived templates are stored under archived.
You can still use them the same way as the active templates:
bunx --bun tiged acfatah/bun-templates/archived/clack
By default, bun will block all post-install scripts, including simple-git-hooks.
To list all blocked scripts, you can run:
bun pm unstrustedTo execute them, run
bun pm trust --allAlternatively, you can specify each package name individually.