diff options
author | 2023-10-14 12:58:30 -0700 | |
---|---|---|
committer | 2023-10-14 12:58:30 -0700 | |
commit | f9add8b6bea4df3cdbd56a21f17e4cab1a854e4e (patch) | |
tree | 8e5306104d81c67b771181337bba02cd9ec39453 /docs/cli/bun-create.md | |
parent | 81a1a58d66c598ea35c42453d0ba4c6341a940fc (diff) | |
parent | 9b5e66453b0879ed77b71dcdbe50e4efa184261e (diff) | |
download | bun-sdl.tar.gz bun-sdl.tar.zst bun-sdl.zip |
Merge branch 'main' into sdlsdl
Diffstat (limited to '')
-rw-r--r-- | docs/cli/bun-create.md (renamed from docs/templates.md) | 34 |
1 files changed, 5 insertions, 29 deletions
diff --git a/docs/templates.md b/docs/cli/bun-create.md index 5061b0aff..c5cc602b6 100644 --- a/docs/templates.md +++ b/docs/cli/bun-create.md @@ -1,36 +1,12 @@ -## `bun init` - -Scaffold an empty project with the interactive `bun init` command. - -```bash -$ bun init -bun init helps you get started with a minimal project and tries to -guess sensible defaults. Press ^C anytime to quit. - -package name (quickstart): -entry point (index.ts): - -Done! A package.json file was saved in the current directory. - + index.ts - + .gitignore - + tsconfig.json (for editor auto-complete) - + README.md - -To get started, run: - bun run index.ts -``` - -Press `enter` to accept the default answer for each prompt, or pass the `-y` flag to auto-accept the defaults. - -## `bun create` - {% callout %} **Note** — You don’t need `bun create` to use Bun. You don’t need any configuration at all. This command exists to make getting started a bit quicker and easier. {% /callout %} Template a new Bun project with `bun create`. This is a flexible command that can be used to create a new project with a `create-<template>` npm package, a GitHub repo, or a local template. -### From `npm` +If you're looking to create a brand new empty project, use [`bun init`](/docs/cli/init). + +## From `npm` ```sh $ bun create <template> [<destination>] @@ -45,7 +21,7 @@ $ bunx create-remix Refer to the documentation of the associated `create-<template>` package for complete documentation and usage instructions. -### From GitHub +## From GitHub This will download the contents of the GitHub repo to disk. @@ -115,7 +91,7 @@ $ bun create https://github.com/ahfarmer/calculator ./myapp Bun installs the files as they currently exist current default branch (usually `main` or `master`). Unlike `git clone` it doesn't download the commit history or configure a remote. --> -### From a local template +## From a local template {% callout %} **⚠️ Warning** — Unlike remote templates, running `bun create` with a local template will delete the entire destination folder if it already exists! Be careful. |