create-riebeckite 0.0.17 → 0.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -8
- package/README_ja.md +27 -3
- package/dist/src/arguments.d.ts +5 -5
- package/dist/src/index.js +3276 -40
- package/dist/src/interactive.d.ts +11 -9
- package/dist/src/scaffold/content-pages.d.ts +16 -0
- package/dist/src/scaffold/deployment.d.ts +7 -0
- package/dist/src/scaffold/index.d.ts +8 -0
- package/dist/src/scaffold/index.js +3224 -0
- package/dist/src/scaffold/next-steps.d.ts +7 -0
- package/dist/src/scaffold/options.d.ts +45 -0
- package/dist/src/scaffold/presets.d.ts +102 -0
- package/dist/src/scaffold/template-loader.d.ts +4 -0
- package/dist/src/scaffold/templates.d.ts +55 -0
- package/dist/src/scaffold/utilities.d.ts +14 -0
- package/dist/src/scaffold/version.d.ts +1 -0
- package/dist/src/scaffold/wrangler-defaults.d.ts +46 -0
- package/package.json +16 -5
- package/templates/scaffold/base/app/client.ts +14 -0
- package/templates/scaffold/base/app/config.ts +18 -0
- package/templates/scaffold/base/app/constants/paths.ts +10 -0
- package/templates/scaffold/base/app/content.ts +12 -0
- package/templates/scaffold/base/app/global.d.ts +15 -0
- package/templates/scaffold/base/app/server.ts +13 -0
- package/templates/scaffold/base/public/favicon.ico +0 -0
- package/templates/scaffold/base/public/riebeckite-logo.png +0 -0
- package/templates/scaffold/base/tsconfig.json +30 -0
- package/templates/scaffold/base/vite.config.ts +34 -0
- package/templates/scaffold/biome.json +6 -0
- package/templates/scaffold/deployment/github-actions/content-checkout.yml +6 -0
- package/templates/scaffold/deployment/github-actions/deploy.yml +54 -0
- package/templates/scaffold/deployment/github-actions/notify-site.yml +31 -0
- package/templates/scaffold/presets/empty/app/routes/_renderer.tsx +21 -0
- package/templates/scaffold/presets/empty/app/routes/index.tsx +11 -0
- package/templates/scaffold/presets/empty/app/style.css +17 -0
- package/templates/scaffold/presets/minimal/app/components/article.tsx +48 -0
- package/templates/scaffold/presets/minimal/app/routes/[slug{.+}].tsx +48 -0
- package/templates/scaffold/presets/minimal/app/routes/_renderer.tsx +59 -0
- package/templates/scaffold/presets/minimal/app/routes/index.tsx +29 -0
- package/templates/scaffold/presets/minimal/app/style.css +81 -0
- package/templates/scaffold/presets/minimal/content/index.en.md +12 -0
- package/templates/scaffold/presets/showcase/app/components/article.tsx +57 -0
- package/templates/scaffold/presets/showcase/app/components/site-header.tsx +113 -0
- package/templates/scaffold/presets/showcase/app/routes/[slug{.+}].tsx +52 -0
- package/templates/scaffold/presets/showcase/app/routes/_renderer.tsx +69 -0
- package/templates/scaffold/presets/showcase/app/routes/index.tsx +39 -0
- package/templates/scaffold/presets/showcase/app/style.css +224 -0
- package/templates/scaffold/presets/showcase/content/attachments/project-brief.pdf +5 -0
- package/templates/scaffold/presets/showcase/content/demo/planning.md +16 -0
- package/templates/scaffold/presets/showcase/content/demo/writing.md +15 -0
- package/templates/scaffold/presets/showcase/content/drawings/Architecture.excalidraw +1 -0
- package/templates/scaffold/presets/showcase/content/drawings/site.canvas +1 -0
- package/templates/scaffold/presets/showcase/content/guide.en.md +46 -0
- package/templates/scaffold/presets/showcase/content/images/demo.svg +1 -0
- package/templates/scaffold/presets/showcase/content/index.de.md +17 -0
- package/templates/scaffold/presets/showcase/content/index.en.md +17 -0
- package/templates/scaffold/presets/showcase/content/index.es.md +17 -0
- package/templates/scaffold/presets/showcase/content/index.fr.md +17 -0
- package/templates/scaffold/presets/showcase/content/index.ja.md +17 -0
- package/templates/scaffold/presets/showcase/content/index.ko.md +17 -0
- package/templates/scaffold/presets/showcase/content/index.zh-CN.md +17 -0
- package/templates/scaffold/presets/starter/app/components/article.tsx +57 -0
- package/templates/scaffold/presets/starter/app/components/site-header.tsx +113 -0
- package/templates/scaffold/presets/starter/app/routes/[slug{.+}].tsx +52 -0
- package/templates/scaffold/presets/starter/app/routes/_renderer.tsx +69 -0
- package/templates/scaffold/presets/starter/app/routes/index.tsx +37 -0
- package/templates/scaffold/presets/starter/app/style.css +224 -0
- package/templates/scaffold/presets/starter/content/guide.en.md +60 -0
- package/templates/scaffold/presets/starter/content/index.de.md +19 -0
- package/templates/scaffold/presets/starter/content/index.en.md +19 -0
- package/templates/scaffold/presets/starter/content/index.es.md +19 -0
- package/templates/scaffold/presets/starter/content/index.fr.md +19 -0
- package/templates/scaffold/presets/starter/content/index.ja.md +19 -0
- package/templates/scaffold/presets/starter/content/index.ko.md +19 -0
- package/templates/scaffold/presets/starter/content/index.zh-CN.md +19 -0
- package/templates/scaffold/presets/starter/content/notes/planning.md +16 -0
- package/templates/scaffold/presets/starter/content/notes/writing.md +15 -0
- package/templates/scaffold/utilities/biome/biome.json +22 -0
- package/templates/scaffold/utilities/editorconfig/.editorconfig +12 -0
- package/templates/scaffold/utilities/gitattributes/.gitattributes +5 -0
- package/templates/scaffold/utilities/vscode/.vscode/settings.json +6 -0
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ Create a new Riebeckite site from an official starter preset.
|
|
|
7
7
|
## Usage
|
|
8
8
|
|
|
9
9
|
Interactive (recommended): run without arguments and answer the prompts for
|
|
10
|
-
the project name, preset, content source, and deployment.
|
|
10
|
+
the project name, preset, project files, content source, and deployment.
|
|
11
11
|
|
|
12
12
|
```sh
|
|
13
13
|
npx create-riebeckite
|
|
@@ -30,14 +30,15 @@ The prompts ask, in order:
|
|
|
30
30
|
| --- | --- | --- |
|
|
31
31
|
| Project name | the folder to create (empty input uses the default name) | any name, e.g. `my-site` |
|
|
32
32
|
| Preset | `starter`, `minimal`, `showcase`, `empty` | `starter` for most sites |
|
|
33
|
+
| Project files | `.editorconfig`, `.gitattributes`, `biome.json`, `.npmrc`, `.vscode/settings.json` | the recommended set is pre-selected |
|
|
33
34
|
| Content source | `This project`, `Separate GitHub repository` | `This project` to start |
|
|
34
35
|
| Deployment | `GitHub Actions + Cloudflare Workers`, `Not now` | `Not now` for local development |
|
|
35
36
|
|
|
36
37
|
`Separate GitHub repository` also asks for the content and site repositories,
|
|
37
38
|
and GitHub Actions deployment is then configured for you. That setup is covered
|
|
38
|
-
in the [content repository guide](../../docs/
|
|
39
|
+
in the [content repository guide](../../docs/docs/guides/content-repositories.en.md).
|
|
39
40
|
Deployment can be added later, described in
|
|
40
|
-
[Deployment](../../docs/
|
|
41
|
+
[Deployment](../../docs/docs/getting-started/deployment.en.md).
|
|
41
42
|
|
|
42
43
|
## Options
|
|
43
44
|
|
|
@@ -45,6 +46,7 @@ Deployment can be added later, described in
|
|
|
45
46
|
| --- | --- |
|
|
46
47
|
| `[directory]` | Directory to scaffold into (default: the current directory) |
|
|
47
48
|
| `--preset <name>` | Starter composition, e.g. `showcase` (default: `starter`) |
|
|
49
|
+
| `--utilities <names>` | Comma-separated project files to generate: `editorconfig`, `gitattributes`, `biome`, `npmrc`, `vscode`, or `none` (default: `editorconfig,gitattributes,biome`) |
|
|
48
50
|
| `--force` | Scaffold even when the target directory is not empty |
|
|
49
51
|
| `--list-presets` | Print the available presets and their descriptions, then exit |
|
|
50
52
|
| `--github-actions` | Generate the Cloudflare deployment workflow |
|
|
@@ -57,6 +59,27 @@ For example, scaffold the complete feature tour:
|
|
|
57
59
|
npx create-riebeckite my-site --preset showcase
|
|
58
60
|
```
|
|
59
61
|
|
|
62
|
+
## Project files
|
|
63
|
+
|
|
64
|
+
Alongside the preset, `create-riebeckite` writes optional project files. In
|
|
65
|
+
interactive mode the `Extra project files` prompt pre-selects the recommended
|
|
66
|
+
set; toggle any of them there. Non-interactive runs select them with a
|
|
67
|
+
comma-separated `--utilities` value.
|
|
68
|
+
|
|
69
|
+
| Name | File | Default |
|
|
70
|
+
| --- | --- | --- |
|
|
71
|
+
| `editorconfig` | `.editorconfig` | yes |
|
|
72
|
+
| `gitattributes` | `.gitattributes` | yes |
|
|
73
|
+
| `biome` | `biome.json` | yes |
|
|
74
|
+
| `npmrc` | `.npmrc` | no |
|
|
75
|
+
| `vscode` | `.vscode/settings.json` | no |
|
|
76
|
+
|
|
77
|
+
Pass `none` to write no project files, or list the ones you want:
|
|
78
|
+
|
|
79
|
+
```sh
|
|
80
|
+
npx create-riebeckite my-site --utilities editorconfig,npmrc,vscode
|
|
81
|
+
```
|
|
82
|
+
|
|
60
83
|
## External content repository
|
|
61
84
|
|
|
62
85
|
To use a separate content repository and deploy after its `main` branch is
|
|
@@ -71,7 +94,7 @@ npx create-riebeckite my-site --github-actions \
|
|
|
71
94
|
Set `content.directory` to `"content"`, add the documented repository secrets,
|
|
72
95
|
then copy `github/notify-site.yml` into the content repository as
|
|
73
96
|
`.github/workflows/notify-site.yml`. See the [separate-content deployment
|
|
74
|
-
guide](
|
|
97
|
+
guide](https://github.com/Rerurate514/riebeckite/blob/main/docs/docs/guides/deployment/separate-content-repository.en.md).
|
|
75
98
|
|
|
76
99
|
`--content-repository` automatically configures the external checkout, the
|
|
77
100
|
`content-updated` repository-dispatch receiver, and `github/notify-site.yml`.
|
|
@@ -101,15 +124,15 @@ Each preset has a one-line description, shown by `--list-presets`:
|
|
|
101
124
|
- `showcase` — The complete plugin catalog with rendered examples, local fixtures, and reference pages.
|
|
102
125
|
- `empty` — A blank application shell: no plugins, theme, content, or components.
|
|
103
126
|
|
|
104
|
-
Presets are defined in
|
|
105
|
-
tooling:
|
|
127
|
+
Presets are defined in `create-riebeckite/scaffold` and can be imported into
|
|
128
|
+
your own tooling:
|
|
106
129
|
|
|
107
130
|
```ts
|
|
108
|
-
import { scaffoldRiebeckiteSite
|
|
131
|
+
import { scaffoldRiebeckiteSite } from "create-riebeckite/scaffold";
|
|
109
132
|
|
|
110
133
|
await scaffoldRiebeckiteSite({
|
|
111
134
|
targetDirectory: "./my-site",
|
|
112
|
-
preset: showcase,
|
|
135
|
+
preset: "showcase",
|
|
113
136
|
});
|
|
114
137
|
```
|
|
115
138
|
|
package/README_ja.md
CHANGED
|
@@ -8,7 +8,7 @@ CLI ツールです。
|
|
|
8
8
|
## 使い方
|
|
9
9
|
|
|
10
10
|
対話モード(推奨): 引数なしで実行すると、プロジェクト名・preset・
|
|
11
|
-
|
|
11
|
+
プロジェクトファイル・コンテンツの格納場所・デプロイについて順に確認します。
|
|
12
12
|
|
|
13
13
|
```sh
|
|
14
14
|
npx create-riebeckite
|
|
@@ -31,10 +31,11 @@ npm exec riebeckite build
|
|
|
31
31
|
| --- | --- | --- |
|
|
32
32
|
| Project name | 作るフォルダ名(空なら既定の名前) | 任意。例: `my-site` |
|
|
33
33
|
| Preset | `starter`、`minimal`、`showcase`、`empty` | 大半のサイトは `starter` |
|
|
34
|
+
| Project files | `.editorconfig`、`.gitattributes`、`biome.json`、`.npmrc`、`.vscode/settings.json` | 推奨セットをあらかじめ選択 |
|
|
34
35
|
| Content source | `This project`、`Separate GitHub repository` | 最初は `This project` |
|
|
35
36
|
| デプロイ設定 | `GitHub Actions + Cloudflare Workers`、`Not now` | 手元で試すなら `Not now` |
|
|
36
37
|
|
|
37
|
-
`Separate GitHub repository` を選ぶと content と site のリポジトリ名も入力し、GitHub Actions のデプロイ設定が自動で構成されます。この構成は[content repository ガイド](../../docs/
|
|
38
|
+
`Separate GitHub repository` を選ぶと content と site のリポジトリ名も入力し、GitHub Actions のデプロイ設定が自動で構成されます。この構成は[content repository ガイド](../../docs/docs/guides/content-repositories.md)に、デプロイの追加方法は [Deployment](../../docs/docs/getting-started/deployment.md) にあります。
|
|
38
39
|
|
|
39
40
|
## オプション
|
|
40
41
|
|
|
@@ -42,6 +43,7 @@ npm exec riebeckite build
|
|
|
42
43
|
| --- | --- |
|
|
43
44
|
| `[directory]` | 生成先ディレクトリ(既定はカレントディレクトリ) |
|
|
44
45
|
| `--preset <name>` | 使用するスターター構成(既定は `starter`) |
|
|
46
|
+
| `--utilities <names>` | 生成するプロジェクトファイルをカンマ区切りで指定する(`editorconfig`、`gitattributes`、`biome`、`npmrc`、`vscode`、または `none`。既定は `editorconfig,gitattributes,biome`) |
|
|
45
47
|
| `--force` | 空でないディレクトリにも展開する |
|
|
46
48
|
| `--list-presets` | 利用可能な preset と説明を一覧表示して終了する |
|
|
47
49
|
| `--github-actions` | Cloudflare へのデプロイ workflow を生成する |
|
|
@@ -54,6 +56,28 @@ npm exec riebeckite build
|
|
|
54
56
|
npx create-riebeckite my-site --preset showcase
|
|
55
57
|
```
|
|
56
58
|
|
|
59
|
+
## Project files
|
|
60
|
+
|
|
61
|
+
preset とは別に、`create-riebeckite` は任意のプロジェクトファイルを生成します。
|
|
62
|
+
対話モードでは `Extra project files` の質問で推奨セットがあらかじめ選択されて
|
|
63
|
+
いるので、そこから個別に切り替えられます。非対話で実行する場合は、
|
|
64
|
+
カンマ区切りの `--utilities` で選択します。
|
|
65
|
+
|
|
66
|
+
| 名前 | ファイル | 既定 |
|
|
67
|
+
| --- | --- | --- |
|
|
68
|
+
| `editorconfig` | `.editorconfig` | 生成する |
|
|
69
|
+
| `gitattributes` | `.gitattributes` | 生成する |
|
|
70
|
+
| `biome` | `biome.json` | 生成する |
|
|
71
|
+
| `npmrc` | `.npmrc` | 生成しない |
|
|
72
|
+
| `vscode` | `.vscode/settings.json` | 生成しない |
|
|
73
|
+
|
|
74
|
+
`none` を渡すとプロジェクトファイルを一切生成しません。個別に選ぶ場合は
|
|
75
|
+
次のように指定します。
|
|
76
|
+
|
|
77
|
+
```sh
|
|
78
|
+
npx create-riebeckite my-site --utilities editorconfig,npmrc,vscode
|
|
79
|
+
```
|
|
80
|
+
|
|
57
81
|
## External content repository
|
|
58
82
|
|
|
59
83
|
別の記事リポジトリを使い、その `main` への push でデプロイする場合は、共通の
|
|
@@ -68,7 +92,7 @@ npx create-riebeckite my-site --github-actions \
|
|
|
68
92
|
`content.directory` は `"content"` にし、必要な repository Secret を登録した後、
|
|
69
93
|
`github/notify-site.yml` を記事リポジトリの
|
|
70
94
|
`.github/workflows/notify-site.yml` にコピーします。詳細は[別記事リポジトリの
|
|
71
|
-
デプロイガイド](
|
|
95
|
+
デプロイガイド](https://github.com/Rerurate514/riebeckite/blob/main/docs/docs/guides/deployment/separate-content-repository.md)を参照してください。
|
|
72
96
|
|
|
73
97
|
`--content-repository` を指定すると、外部 content の checkout、
|
|
74
98
|
`content-updated` の repository dispatch receiver、`github/notify-site.yml` がまとめて構成されます。以前の通知用オプションは廃止しました。
|
package/dist/src/arguments.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ScaffoldDeployment } from "./scaffold/options.js";
|
|
2
|
+
import { type ScaffoldPresetName } from "./scaffold/presets.js";
|
|
3
|
+
import { type ScaffoldUtilityName } from "./scaffold/utilities.js";
|
|
2
4
|
export type CreateRiebeckiteOptions = {
|
|
3
5
|
readonly directory: string;
|
|
4
6
|
readonly force: boolean;
|
|
5
7
|
readonly preset: ScaffoldPresetName;
|
|
8
|
+
readonly utilities: readonly ScaffoldUtilityName[];
|
|
6
9
|
readonly listPresets: boolean;
|
|
7
|
-
readonly
|
|
8
|
-
readonly cloudflareWorkers: boolean;
|
|
9
|
-
readonly contentRepository?: string;
|
|
10
|
-
readonly siteRepository?: string;
|
|
10
|
+
readonly deployment: ScaffoldDeployment;
|
|
11
11
|
};
|
|
12
12
|
export declare function parseArguments(arguments_: readonly string[]): CreateRiebeckiteOptions;
|
|
13
13
|
export declare function printPresets(): void;
|