create-riebeckite 0.0.18 → 0.0.20
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 +27 -4
- package/README_ja.md +26 -2
- package/dist/src/arguments.d.ts +2 -0
- package/dist/src/index.js +140 -28
- package/dist/src/interactive.d.ts +3 -0
- package/dist/src/scaffold/index.d.ts +1 -0
- package/dist/src/scaffold/index.js +115 -25
- package/dist/src/scaffold/options.d.ts +2 -0
- package/dist/src/scaffold/templates.d.ts +2 -0
- package/dist/src/scaffold/utilities.d.ts +14 -0
- package/dist/src/scaffold/version.d.ts +1 -1
- package/dist/src/scaffold/wrangler-defaults.d.ts +1 -1
- package/package.json +2 -2
- package/templates/scaffold/base/app/global.d.ts +9 -3
- package/templates/scaffold/base/app/server.ts +2 -2
- package/templates/scaffold/base/vite.config.ts +3 -25
- package/templates/scaffold/presets/empty/app/routes/_404.tsx +18 -0
- package/templates/scaffold/presets/empty/app/routes/_renderer.tsx +1 -1
- package/templates/scaffold/presets/empty/app/routes/index.tsx +1 -1
- package/templates/scaffold/presets/empty/app/style.css +11 -0
- package/templates/scaffold/presets/minimal/app/components/article.tsx +29 -47
- package/templates/scaffold/presets/minimal/app/routes/[slug{.+}].tsx +13 -32
- package/templates/scaffold/presets/minimal/app/routes/_404.tsx +18 -0
- package/templates/scaffold/presets/minimal/app/routes/_renderer.tsx +17 -53
- package/templates/scaffold/presets/minimal/app/routes/index.tsx +9 -19
- package/templates/scaffold/presets/minimal/app/style.css +15 -22
- package/templates/scaffold/presets/minimal/content/index.en.md +16 -6
- package/templates/scaffold/presets/showcase/app/components/article.tsx +31 -40
- package/templates/scaffold/presets/showcase/app/components/site-header.tsx +10 -64
- package/templates/scaffold/presets/showcase/app/routes/[slug{.+}].tsx +15 -34
- package/templates/scaffold/presets/showcase/app/routes/_404.tsx +18 -0
- package/templates/scaffold/presets/showcase/app/routes/_renderer.tsx +31 -49
- package/templates/scaffold/presets/showcase/app/routes/index.tsx +19 -25
- package/templates/scaffold/presets/showcase/app/style.css +27 -42
- package/templates/scaffold/presets/showcase/content/Daily/2026-09-28.md +8 -0
- package/templates/scaffold/presets/showcase/content/Daily/2026-09-30.md +8 -0
- package/templates/scaffold/presets/showcase/content/Daily/2026-10-02.md +11 -0
- package/templates/scaffold/presets/showcase/content/index.de.md +16 -5
- package/templates/scaffold/presets/showcase/content/index.en.md +16 -5
- package/templates/scaffold/presets/showcase/content/index.es.md +16 -5
- package/templates/scaffold/presets/showcase/content/index.fr.md +16 -5
- package/templates/scaffold/presets/showcase/content/index.ja.md +16 -5
- package/templates/scaffold/presets/showcase/content/index.ko.md +16 -5
- package/templates/scaffold/presets/showcase/content/index.zh-CN.md +16 -5
- package/templates/scaffold/presets/starter/app/components/article.tsx +31 -40
- package/templates/scaffold/presets/starter/app/components/site-header.tsx +10 -64
- package/templates/scaffold/presets/starter/app/routes/[slug{.+}].tsx +15 -34
- package/templates/scaffold/presets/starter/app/routes/_404.tsx +18 -0
- package/templates/scaffold/presets/starter/app/routes/_renderer.tsx +31 -49
- package/templates/scaffold/presets/starter/app/routes/index.tsx +17 -25
- package/templates/scaffold/presets/starter/app/style.css +27 -42
- 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/templates/scaffold/base/app/config.ts +0 -18
- package/templates/scaffold/base/app/constants/paths.ts +0 -10
- package/templates/scaffold/base/app/content.ts +0 -12
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/docs/guides/content-repositories.
|
|
39
|
+
in the [content repository guide](../../docs/docs/guides/content-repositories.md).
|
|
39
40
|
Deployment can be added later, described in
|
|
40
|
-
[Deployment](../../docs/docs/getting-started/deployment.
|
|
41
|
+
[Deployment](../../docs/docs/getting-started/deployment.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](https://github.com/Rerurate514/riebeckite/blob/main/docs/docs/guides/deployment/separate-content-repository.
|
|
97
|
+
guide](https://github.com/Rerurate514/riebeckite/blob/main/docs/docs/guides/deployment/separate-content-repository.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`.
|
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/docs/guides/content-repositories.md)に、デプロイの追加方法は [Deployment](../../docs/docs/getting-started/deployment.md) にあります。
|
|
38
|
+
`Separate GitHub repository` を選ぶと content と site のリポジトリ名も入力し、GitHub Actions のデプロイ設定が自動で構成されます。この構成は[content repository ガイド](../../docs/docs/guides/content-repositories.ja.md)に、デプロイの追加方法は [Deployment](../../docs/docs/getting-started/deployment.ja.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 でデプロイする場合は、共通の
|
package/dist/src/arguments.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { ScaffoldDeployment } from "./scaffold/options.js";
|
|
2
2
|
import { type ScaffoldPresetName } from "./scaffold/presets.js";
|
|
3
|
+
import { type ScaffoldUtilityName } from "./scaffold/utilities.js";
|
|
3
4
|
export type CreateRiebeckiteOptions = {
|
|
4
5
|
readonly directory: string;
|
|
5
6
|
readonly force: boolean;
|
|
6
7
|
readonly preset: ScaffoldPresetName;
|
|
8
|
+
readonly utilities: readonly ScaffoldUtilityName[];
|
|
7
9
|
readonly listPresets: boolean;
|
|
8
10
|
readonly deployment: ScaffoldDeployment;
|
|
9
11
|
};
|
package/dist/src/index.js
CHANGED
|
@@ -633,7 +633,7 @@ var minimalTheme = {
|
|
|
633
633
|
};
|
|
634
634
|
var empty = {
|
|
635
635
|
name: "empty",
|
|
636
|
-
description: "A blank
|
|
636
|
+
description: "A blank canvas with only the Riebeckite wiring. Add the theme, plugins, and content yourself.",
|
|
637
637
|
languages: [],
|
|
638
638
|
theme: null,
|
|
639
639
|
plugins: [],
|
|
@@ -642,7 +642,7 @@ var empty = {
|
|
|
642
642
|
};
|
|
643
643
|
var minimal = {
|
|
644
644
|
name: "minimal",
|
|
645
|
-
description: "The smallest
|
|
645
|
+
description: "The smallest readable site, for learning how a Riebeckite site is assembled.",
|
|
646
646
|
languages: ["en"],
|
|
647
647
|
theme: minimalTheme,
|
|
648
648
|
plugins: [obsidianMarkdown],
|
|
@@ -651,7 +651,7 @@ var minimal = {
|
|
|
651
651
|
};
|
|
652
652
|
var starter = {
|
|
653
653
|
name: "starter",
|
|
654
|
-
description: "Recommended
|
|
654
|
+
description: "Recommended default: a practical Markdown garden with search, navigation, and reading essentials.",
|
|
655
655
|
languages: [...SCAFFOLD_LANGUAGES],
|
|
656
656
|
theme: defaultTheme,
|
|
657
657
|
plugins: [
|
|
@@ -679,7 +679,7 @@ var starter = {
|
|
|
679
679
|
};
|
|
680
680
|
var showcase = {
|
|
681
681
|
name: "showcase",
|
|
682
|
-
description: "
|
|
682
|
+
description: "A feature-rich example that demonstrates the Riebeckite plugin ecosystem with rendered samples and references.",
|
|
683
683
|
languages: [...SCAFFOLD_LANGUAGES],
|
|
684
684
|
theme: showCaseTheme,
|
|
685
685
|
plugins: [
|
|
@@ -774,11 +774,95 @@ function resolveScaffoldPreset(value) {
|
|
|
774
774
|
return preset;
|
|
775
775
|
}
|
|
776
776
|
|
|
777
|
+
// src/scaffold/utilities.ts
|
|
778
|
+
var SCAFFOLD_UTILITY_NAMES = [
|
|
779
|
+
"editorconfig",
|
|
780
|
+
"gitattributes",
|
|
781
|
+
"biome",
|
|
782
|
+
"npmrc",
|
|
783
|
+
"vscode"
|
|
784
|
+
];
|
|
785
|
+
var SCAFFOLD_UTILITIES = [
|
|
786
|
+
{
|
|
787
|
+
name: "editorconfig",
|
|
788
|
+
label: ".editorconfig",
|
|
789
|
+
description: "Shared editor indentation, newline, and encoding defaults."
|
|
790
|
+
},
|
|
791
|
+
{
|
|
792
|
+
name: "gitattributes",
|
|
793
|
+
label: ".gitattributes",
|
|
794
|
+
description: "Line-ending normalization and text detection for Git."
|
|
795
|
+
},
|
|
796
|
+
{
|
|
797
|
+
name: "biome",
|
|
798
|
+
label: "biome.json",
|
|
799
|
+
description: "Biome formatter and linter configuration."
|
|
800
|
+
},
|
|
801
|
+
{
|
|
802
|
+
name: "npmrc",
|
|
803
|
+
label: ".npmrc",
|
|
804
|
+
description: "npm settings such as exact dependency versions."
|
|
805
|
+
},
|
|
806
|
+
{
|
|
807
|
+
name: "vscode",
|
|
808
|
+
label: ".vscode/settings.json",
|
|
809
|
+
description: "Recommended VS Code workspace settings."
|
|
810
|
+
}
|
|
811
|
+
];
|
|
812
|
+
var SCAFFOLD_DEFAULT_UTILITIES = [
|
|
813
|
+
"editorconfig",
|
|
814
|
+
"gitattributes",
|
|
815
|
+
"biome"
|
|
816
|
+
];
|
|
817
|
+
var SCAFFOLD_NO_UTILITIES = "none";
|
|
818
|
+
function isScaffoldUtilityName(value) {
|
|
819
|
+
return SCAFFOLD_UTILITY_NAMES.includes(value);
|
|
820
|
+
}
|
|
821
|
+
function parseScaffoldUtilities(value) {
|
|
822
|
+
const tokens = value.split(",").map((token) => token.trim()).filter((token) => token.length > 0);
|
|
823
|
+
if (tokens.length === 0) {
|
|
824
|
+
throw new Error(
|
|
825
|
+
"--utilities requires a comma-separated list of utility names."
|
|
826
|
+
);
|
|
827
|
+
}
|
|
828
|
+
if (tokens.length === 1 && tokens[0] === SCAFFOLD_NO_UTILITIES) {
|
|
829
|
+
return [];
|
|
830
|
+
}
|
|
831
|
+
const utilities = [];
|
|
832
|
+
for (const token of tokens) {
|
|
833
|
+
if (token === SCAFFOLD_NO_UTILITIES) {
|
|
834
|
+
throw new Error(
|
|
835
|
+
`"${SCAFFOLD_NO_UTILITIES}" cannot be combined with other utility names.`
|
|
836
|
+
);
|
|
837
|
+
}
|
|
838
|
+
if (!isScaffoldUtilityName(token)) {
|
|
839
|
+
throw new Error(
|
|
840
|
+
`Unknown utility: ${token}. Available utilities: ${SCAFFOLD_UTILITY_NAMES.join(", ")}, ${SCAFFOLD_NO_UTILITIES}.`
|
|
841
|
+
);
|
|
842
|
+
}
|
|
843
|
+
if (!utilities.includes(token)) utilities.push(token);
|
|
844
|
+
}
|
|
845
|
+
return utilities;
|
|
846
|
+
}
|
|
847
|
+
function utilityTemplateFiles(utilities) {
|
|
848
|
+
const seen = /* @__PURE__ */ new Set();
|
|
849
|
+
const files = [];
|
|
850
|
+
for (const name of utilities) {
|
|
851
|
+
for (const file of copyTemplateTree(`utilities/${name}`)) {
|
|
852
|
+
if (seen.has(file.path)) continue;
|
|
853
|
+
seen.add(file.path);
|
|
854
|
+
files.push(file);
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
return files;
|
|
858
|
+
}
|
|
859
|
+
|
|
777
860
|
// src/arguments.ts
|
|
778
861
|
function parseArguments(arguments_) {
|
|
779
862
|
let directory;
|
|
780
863
|
let force = false;
|
|
781
864
|
let preset;
|
|
865
|
+
let utilities;
|
|
782
866
|
let listPresets = false;
|
|
783
867
|
let githubActions = false;
|
|
784
868
|
let contentRepository;
|
|
@@ -818,12 +902,23 @@ function parseArguments(arguments_) {
|
|
|
818
902
|
index += 1;
|
|
819
903
|
continue;
|
|
820
904
|
}
|
|
905
|
+
if (argument === "--utilities") {
|
|
906
|
+
const value = arguments_[index + 1];
|
|
907
|
+
if (value === void 0 || value.startsWith("-")) {
|
|
908
|
+
throw new Error(
|
|
909
|
+
"--utilities requires a comma-separated list of utility names."
|
|
910
|
+
);
|
|
911
|
+
}
|
|
912
|
+
utilities = parseScaffoldUtilities(value);
|
|
913
|
+
index += 1;
|
|
914
|
+
continue;
|
|
915
|
+
}
|
|
821
916
|
if (argument.startsWith("-")) {
|
|
822
917
|
throw new Error(`Unknown option: ${argument}`);
|
|
823
918
|
}
|
|
824
919
|
if (directory !== void 0) {
|
|
825
920
|
throw new Error(
|
|
826
|
-
"Usage: create-riebeckite [directory] [--preset <name>] [--github-actions] [--content-repository <owner/repository>] [--site-repository <owner/repository>] [--force]"
|
|
921
|
+
"Usage: create-riebeckite [directory] [--preset <name>] [--utilities <names>] [--github-actions] [--content-repository <owner/repository>] [--site-repository <owner/repository>] [--force]"
|
|
827
922
|
);
|
|
828
923
|
}
|
|
829
924
|
directory = argument;
|
|
@@ -832,6 +927,7 @@ function parseArguments(arguments_) {
|
|
|
832
927
|
directory: directory ?? ".",
|
|
833
928
|
force,
|
|
834
929
|
preset: preset ?? "starter",
|
|
930
|
+
utilities: utilities ?? SCAFFOLD_DEFAULT_UTILITIES,
|
|
835
931
|
listPresets,
|
|
836
932
|
deployment: scaffoldDeploymentFromFlags({
|
|
837
933
|
githubActions,
|
|
@@ -849,7 +945,7 @@ function printPresets() {
|
|
|
849
945
|
}
|
|
850
946
|
|
|
851
947
|
// src/interactive.ts
|
|
852
|
-
import { isCancel, log, select, text } from "@clack/prompts";
|
|
948
|
+
import { isCancel, log, multiselect, select, text } from "@clack/prompts";
|
|
853
949
|
var DEFAULT_DIRECTORY = "my-riebeckite-site";
|
|
854
950
|
var DEFAULT_INTERACTIVE_DEPLOYMENT = "none";
|
|
855
951
|
function interactiveAnswersToOptions(answers) {
|
|
@@ -857,6 +953,7 @@ function interactiveAnswersToOptions(answers) {
|
|
|
857
953
|
directory: answers.directory,
|
|
858
954
|
force: false,
|
|
859
955
|
preset: answers.preset,
|
|
956
|
+
utilities: answers.utilities,
|
|
860
957
|
listPresets: false,
|
|
861
958
|
deployment: deploymentFromAnswers(answers)
|
|
862
959
|
};
|
|
@@ -898,6 +995,17 @@ async function promptInteractiveAnswers() {
|
|
|
898
995
|
}))
|
|
899
996
|
});
|
|
900
997
|
if (isCancel(preset)) return null;
|
|
998
|
+
const utilities = await multiselect({
|
|
999
|
+
message: "Extra project files",
|
|
1000
|
+
options: SCAFFOLD_UTILITIES.map(({ name, label, description }) => ({
|
|
1001
|
+
value: name,
|
|
1002
|
+
label,
|
|
1003
|
+
hint: description
|
|
1004
|
+
})),
|
|
1005
|
+
initialValues: [...SCAFFOLD_DEFAULT_UTILITIES],
|
|
1006
|
+
required: false
|
|
1007
|
+
});
|
|
1008
|
+
if (isCancel(utilities)) return null;
|
|
901
1009
|
const contentSource = await select({
|
|
902
1010
|
message: "Where will you write content?",
|
|
903
1011
|
initialValue: "local",
|
|
@@ -925,6 +1033,7 @@ async function promptInteractiveAnswers() {
|
|
|
925
1033
|
answers = {
|
|
926
1034
|
directory,
|
|
927
1035
|
preset,
|
|
1036
|
+
utilities,
|
|
928
1037
|
contentSource,
|
|
929
1038
|
contentRepository: contentRepository.trim(),
|
|
930
1039
|
siteRepository: siteRepository.trim()
|
|
@@ -948,7 +1057,7 @@ async function promptInteractiveAnswers() {
|
|
|
948
1057
|
]
|
|
949
1058
|
});
|
|
950
1059
|
if (isCancel(deployment)) return null;
|
|
951
|
-
answers = { directory, preset, contentSource, deployment };
|
|
1060
|
+
answers = { directory, preset, utilities, contentSource, deployment };
|
|
952
1061
|
}
|
|
953
1062
|
log.step("Creating Riebeckite site...");
|
|
954
1063
|
return answers;
|
|
@@ -1080,8 +1189,8 @@ import path3 from "node:path";
|
|
|
1080
1189
|
|
|
1081
1190
|
// src/scaffold/content-pages.ts
|
|
1082
1191
|
var HELPERS = {
|
|
1083
|
-
en: "https://github.com/Rerurate514/riebeckite/blob/main/docs/README.
|
|
1084
|
-
ja: "https://github.com/Rerurate514/riebeckite/blob/main/docs/README.md"
|
|
1192
|
+
en: "https://github.com/Rerurate514/riebeckite/blob/main/docs/README.md",
|
|
1193
|
+
ja: "https://github.com/Rerurate514/riebeckite/blob/main/docs/README.ja.md"
|
|
1085
1194
|
};
|
|
1086
1195
|
var PLUGIN_INDEX_URL = "https://github.com/Rerurate514/riebeckite/tree/main/packages/plugins";
|
|
1087
1196
|
var THEMES_INDEX_URL = "https://github.com/Rerurate514/riebeckite/tree/main/packages/themes";
|
|
@@ -1240,7 +1349,7 @@ var PLUGIN_MARKDOWN_GUIDES = {
|
|
|
1240
1349
|
},
|
|
1241
1350
|
"@riebeckite/plugin-shortcodes": {
|
|
1242
1351
|
summary: "Expands built-in shortcode syntax inside Markdown.",
|
|
1243
|
-
markdown: '
|
|
1352
|
+
markdown: '::youtube[id=dQw4w9WgXcQ]\n\n::figure[Demo image]{src="/images/demo.png"}'
|
|
1244
1353
|
},
|
|
1245
1354
|
"@riebeckite/plugin-series": {
|
|
1246
1355
|
summary: "Groups Markdown pages into a reading series using frontmatter.",
|
|
@@ -2480,7 +2589,7 @@ function referenceThemesContent(preset) {
|
|
|
2480
2589
|
}
|
|
2481
2590
|
|
|
2482
2591
|
// src/scaffold/version.ts
|
|
2483
|
-
var RIEBECKITE_VERSION = "^0.0.
|
|
2592
|
+
var RIEBECKITE_VERSION = "^0.0.20";
|
|
2484
2593
|
|
|
2485
2594
|
// src/scaffold/templates.ts
|
|
2486
2595
|
function siteTemplateFiles(preset, variables, options = {}) {
|
|
@@ -2491,6 +2600,7 @@ function siteTemplateFiles(preset, variables, options = {}) {
|
|
|
2491
2600
|
content: riebeckiteConfig(preset, variables)
|
|
2492
2601
|
},
|
|
2493
2602
|
...copyTemplateTree("base"),
|
|
2603
|
+
...utilityTemplateFiles(options.utilities ?? SCAFFOLD_DEFAULT_UTILITIES),
|
|
2494
2604
|
...copyTemplateTree(
|
|
2495
2605
|
`presets/${preset.name}`,
|
|
2496
2606
|
{},
|
|
@@ -2633,16 +2743,16 @@ var README_INTRO = {
|
|
|
2633
2743
|
ja: "空の Riebeckite アプリケーションシェルです。テーマもプラグインもコンポーネントもコンテンツもなく、すべてを自由に追加できます。"
|
|
2634
2744
|
},
|
|
2635
2745
|
minimal: {
|
|
2636
|
-
en: "The smallest
|
|
2637
|
-
ja: "
|
|
2746
|
+
en: "The smallest readable Riebeckite site: Obsidian Markdown, the minimal theme, and a single page you can read end to end.",
|
|
2747
|
+
ja: "最小で読みやすい Riebeckite サイトです。Obsidian マークダウン・minimal テーマ・1 ページだけで、サイトの組み立て方を学べます。"
|
|
2638
2748
|
},
|
|
2639
2749
|
starter: {
|
|
2640
|
-
en: "Recommended
|
|
2641
|
-
ja: "
|
|
2750
|
+
en: "Recommended default: a practical Markdown garden with search, navigation, and reading essentials.",
|
|
2751
|
+
ja: "大半のサイトにおすすめの既定構成です。検索・ナビゲーション・閲覧に必要な機能を備えた実用的な Markdown サイトを作れます。"
|
|
2642
2752
|
},
|
|
2643
2753
|
showcase: {
|
|
2644
|
-
en: "
|
|
2645
|
-
ja: "
|
|
2754
|
+
en: "A feature-rich example that demonstrates the Riebeckite plugin ecosystem with rendered samples, reference pages, and local fixtures.",
|
|
2755
|
+
ja: "Riebeckite の Plugin エコシステムを実際に確認できる機能紹介用の構成です。描画例・リファレンスページ・ローカルのフィクスチャを含みます。"
|
|
2646
2756
|
}
|
|
2647
2757
|
};
|
|
2648
2758
|
var README_WORDS = {
|
|
@@ -2661,7 +2771,7 @@ var README_WORDS = {
|
|
|
2661
2771
|
noPlugins: "no plugins",
|
|
2662
2772
|
single: "single language",
|
|
2663
2773
|
configReference: "Configuration reference",
|
|
2664
|
-
configReferenceBody: "`riebeckite.config.ts`
|
|
2774
|
+
configReferenceBody: "`riebeckite.config.ts` registers every plugin below with its full option set. Treat it as a starting point; the documented options live in the [configuration reference](https://riebeckite.dev/docs/reference/configuration-reference) and each plugin's package README.",
|
|
2665
2775
|
factory: "Factory",
|
|
2666
2776
|
options: "Options",
|
|
2667
2777
|
emDash: "—",
|
|
@@ -2685,7 +2795,7 @@ var README_WORDS = {
|
|
|
2685
2795
|
noPlugins: "プラグインなし",
|
|
2686
2796
|
single: "単一言語",
|
|
2687
2797
|
configReference: "設定リファレンス",
|
|
2688
|
-
configReferenceBody: "`riebeckite.config.ts`
|
|
2798
|
+
configReferenceBody: "`riebeckite.config.ts` には、以下の全プラグインが全オプション付きで登録されています。これは出発点として使い、設定の仕様は[設定リファレンス](https://riebeckite.dev/docs/reference/configuration-reference)と各プラグインパッケージの README を確認してください。",
|
|
2689
2799
|
factory: "ファクトリ",
|
|
2690
2800
|
options: "オプション",
|
|
2691
2801
|
emDash: "—",
|
|
@@ -2753,8 +2863,8 @@ function readmeEn(preset, variables) {
|
|
|
2753
2863
|
lines.push(`## ${words.extending}`, "");
|
|
2754
2864
|
lines.push(words.extendingBody, "");
|
|
2755
2865
|
lines.push(
|
|
2756
|
-
`- Docs: [English](${REPO}/blob/main/docs/README.
|
|
2757
|
-
` · [日本語](${REPO}/blob/main/docs/README.md)`,
|
|
2866
|
+
`- Docs: [English](${REPO}/blob/main/docs/README.md)`,
|
|
2867
|
+
` · [日本語](${REPO}/blob/main/docs/README.ja.md)`,
|
|
2758
2868
|
""
|
|
2759
2869
|
);
|
|
2760
2870
|
}
|
|
@@ -2814,8 +2924,8 @@ function readmeJa(preset, variables) {
|
|
|
2814
2924
|
lines.push(`## ${words.extending}`, "");
|
|
2815
2925
|
lines.push(words.extendingBody, "");
|
|
2816
2926
|
lines.push(
|
|
2817
|
-
`- ドキュメント: [English](${REPO}/blob/main/docs/README.
|
|
2818
|
-
` · [日本語](${REPO}/blob/main/docs/README.md)`,
|
|
2927
|
+
`- ドキュメント: [English](${REPO}/blob/main/docs/README.md)`,
|
|
2928
|
+
` · [日本語](${REPO}/blob/main/docs/README.ja.md)`,
|
|
2819
2929
|
""
|
|
2820
2930
|
);
|
|
2821
2931
|
}
|
|
@@ -2845,7 +2955,7 @@ function deploymentSecretLines(language) {
|
|
|
2845
2955
|
`- \`${GITHUB_ACTIONS_SECRETS.SITE_DISPATCH_TOKEN}\` — in the **content repository**. Lets its \`notify-site.yml\` dispatch updates to this site. Use a fine-grained token scoped to this site repository with **Contents: read and write**.`,
|
|
2846
2956
|
`- \`${GITHUB_ACTIONS_SECRETS.CLOUDFLARE_API_TOKEN}\` and \`${GITHUB_ACTIONS_SECRETS.CLOUDFLARE_ACCOUNT_ID}\` — in **this site repository** for the Cloudflare deploy.`,
|
|
2847
2957
|
"",
|
|
2848
|
-
`The workflows reference these secret names and never contain their values. Never commit the values. See the [separate content repository guide](${REPO}/blob/main/docs/docs/guides/deployment/separate-content-repository.
|
|
2958
|
+
`The workflows reference these secret names and never contain their values. Never commit the values. See the [separate content repository guide](${REPO}/blob/main/docs/docs/guides/deployment/separate-content-repository.md) for the full setup.`,
|
|
2849
2959
|
""
|
|
2850
2960
|
];
|
|
2851
2961
|
}
|
|
@@ -3088,15 +3198,15 @@ var README_DEMOS = {
|
|
|
3088
3198
|
" - title: Default",
|
|
3089
3199
|
" description: A clean, typographic theme.",
|
|
3090
3200
|
" meta: v0.0.5",
|
|
3091
|
-
" href: https://
|
|
3201
|
+
" href: https://riebeckite.dev/docs/themes/default",
|
|
3092
3202
|
" - title: Minimal",
|
|
3093
3203
|
" description: Stripped back to the essentials.",
|
|
3094
3204
|
" meta: v0.0.5",
|
|
3095
|
-
" href: https://
|
|
3205
|
+
" href: https://riebeckite.dev/docs/themes/minimal",
|
|
3096
3206
|
" - title: Gruvbox",
|
|
3097
3207
|
" description: A warm, high-contrast palette.",
|
|
3098
3208
|
" meta: v0.0.5",
|
|
3099
|
-
" href: https://
|
|
3209
|
+
" href: https://riebeckite.dev/docs/themes/gruvbox"
|
|
3100
3210
|
].join("\n")
|
|
3101
3211
|
)
|
|
3102
3212
|
},
|
|
@@ -3348,7 +3458,8 @@ async function scaffoldRiebeckiteSite(options) {
|
|
|
3348
3458
|
}
|
|
3349
3459
|
const files = [
|
|
3350
3460
|
...siteTemplateFiles(preset, templateVariables(options, targetDirectory), {
|
|
3351
|
-
cloudflareWorkers: deployment.type === "cloudflare-workers"
|
|
3461
|
+
cloudflareWorkers: deployment.type === "cloudflare-workers",
|
|
3462
|
+
utilities: options.utilities
|
|
3352
3463
|
}),
|
|
3353
3464
|
...deploymentTemplateOrConfig(deployment, targetDirectory)
|
|
3354
3465
|
];
|
|
@@ -3441,6 +3552,7 @@ async function runCreateRiebeckite(arguments_) {
|
|
|
3441
3552
|
targetDirectory,
|
|
3442
3553
|
overwrite: options.force,
|
|
3443
3554
|
preset: options.preset,
|
|
3555
|
+
utilities: options.utilities,
|
|
3444
3556
|
deployment: options.deployment
|
|
3445
3557
|
});
|
|
3446
3558
|
} catch (error) {
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import type { CreateRiebeckiteOptions } from "./arguments.js";
|
|
2
2
|
import { type ScaffoldPresetName } from "./scaffold/presets.js";
|
|
3
|
+
import { type ScaffoldUtilityName } from "./scaffold/utilities.js";
|
|
3
4
|
export declare const DEFAULT_INTERACTIVE_DEPLOYMENT: InteractiveDeployment;
|
|
4
5
|
export type InteractiveContentSource = "local" | "external";
|
|
5
6
|
export type InteractiveDeployment = "cloudflare" | "github-actions" | "none";
|
|
6
7
|
export type InteractiveAnswers = {
|
|
7
8
|
readonly directory: string;
|
|
8
9
|
readonly preset: ScaffoldPresetName;
|
|
10
|
+
readonly utilities: readonly ScaffoldUtilityName[];
|
|
9
11
|
readonly contentSource: "local";
|
|
10
12
|
readonly deployment: InteractiveDeployment;
|
|
11
13
|
} | {
|
|
12
14
|
readonly directory: string;
|
|
13
15
|
readonly preset: ScaffoldPresetName;
|
|
16
|
+
readonly utilities: readonly ScaffoldUtilityName[];
|
|
14
17
|
readonly contentSource: "external";
|
|
15
18
|
readonly contentRepository: string;
|
|
16
19
|
readonly siteRepository: string;
|
|
@@ -3,5 +3,6 @@ export { deploymentWorkflow, scaffoldDeploymentFromFlags, } from "./deployment.j
|
|
|
3
3
|
export { formatScaffoldNextSteps, type ScaffoldNextStepsOptions, } from "./next-steps.js";
|
|
4
4
|
export { type ScaffoldContentSource, type ScaffoldDeployment, type ScaffoldDeploymentFlags, ScaffoldSiteError, type ScaffoldSiteMetadata, type ScaffoldSiteOptions, type ScaffoldSiteResult, } from "./options.js";
|
|
5
5
|
export { isScaffoldPresetName, SCAFFOLD_DEFAULT_PRESET, SCAFFOLD_PRESETS, type ScaffoldPresetName, type ScaffoldPresetSummary, } from "./presets.js";
|
|
6
|
+
export { isScaffoldUtilityName, parseScaffoldUtilities, SCAFFOLD_DEFAULT_UTILITIES, SCAFFOLD_UTILITIES, SCAFFOLD_UTILITY_NAMES, type ScaffoldUtilityName, type ScaffoldUtilitySummary, } from "./utilities.js";
|
|
6
7
|
export { GITHUB_ACTIONS_SECRETS, wranglerConfigForDirectory, } from "./wrangler-defaults.js";
|
|
7
8
|
export declare function scaffoldRiebeckiteSite(options: ScaffoldSiteOptions): Promise<ScaffoldSiteResult>;
|