create-beacon-docs
v0.1.2
Published
Create a new Beacon docs site.
Maintainers
Readme
create-beacon-docs
Create a new Beacon docs site.
npm create beacon-docs@latest my-docsThe command does the following:
Downloads the latest Beacon source from GitHub into
my-docs.Sets the project name in
src/lib/site.ts,package.json, andpackage-lock.json.Creates
.env.localfrom.env.example, withPRODUCT_NAMEset to your product name. The file isn't committed, so also setPRODUCT_NAMEin your hosting provider's dashboard before you deploy.Replaces Beacon's own docs with the starter pages in
template/content/: an overview page, a getting-started page, and a matchingnav.config.ts.Starts a Git repository with an initial commit.
Installs dependencies with the package manager you ran it with.
It prompts for anything you don't pass on the command line.
Options
Pass options after -- when you use npm create:
npm create beacon-docs@latest my-docs -- --product-name "Acme Docs" --yes| Option | Description |
| --- | --- |
| --product-name <name> | Product name shown on the site. Defaults to the directory name in title case. |
| --project-name <name> | Package and repository name. Defaults to the directory name. |
| --ref <ref> | Beacon branch or tag to download. Defaults to main. |
| --no-git | Don't start a Git repository. |
| --no-install | Don't install dependencies. |
| -y, --yes | Accept defaults without prompting. |
| -h, --help | Show help. |
Requirements
Node.js 20.9.0 or later
tar, which is included with macOS, Linux, and Windows 10 or later
Develop locally
Run the script directly from the Beacon repository:
node packages/create-beacon-docs/index.js ../my-docs --no-installThe script always downloads Beacon from GitHub, so local changes outside this directory aren't included until they're pushed.
Publish
From this directory:
npm publish