@riebeckite/honox 0.0.7 → 0.0.8

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/dist/index.js CHANGED
@@ -144,6 +144,7 @@ async function loadRiebeckiteConfig(options) {
144
144
  function resolveHonoxConfig(config, appRoot) {
145
145
  return {
146
146
  ...config,
147
+ buildDirectory: path2.join(appRoot, ".riebeckite"),
147
148
  content: {
148
149
  ...config.content,
149
150
  directory: path2.resolve(appRoot, config.content.directory)
@@ -937,9 +938,21 @@ ${imports}
937
938
  `;
938
939
  }
939
940
  function writeGeneratedFile(filePath, contents) {
941
+ if (readGeneratedFile(filePath) === contents) return;
940
942
  fs4.mkdirSync(path4.dirname(filePath), { recursive: true });
941
943
  fs4.writeFileSync(filePath, contents);
942
944
  }
945
+ function readGeneratedFile(filePath) {
946
+ try {
947
+ return fs4.readFileSync(filePath, "utf8");
948
+ } catch (error) {
949
+ if (isNotFoundError(error)) return void 0;
950
+ throw error;
951
+ }
952
+ }
953
+ function isNotFoundError(error) {
954
+ return typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT";
955
+ }
943
956
 
944
957
  // src/client_module.ts
945
958
  import {
@@ -1285,6 +1298,11 @@ function riebeckite(options = {}) {
1285
1298
  define: {
1286
1299
  "process.env.RIEBECKITE_APP_ROOT": JSON.stringify(appRoot)
1287
1300
  },
1301
+ server: {
1302
+ watch: {
1303
+ ignored: ["**/.riebeckite/**"]
1304
+ }
1305
+ },
1288
1306
  resolve: {
1289
1307
  alias: options.workspaceRoot ? createWorkspacePackageAliases(options.workspaceRoot) : []
1290
1308
  }
@@ -2305,7 +2323,14 @@ function guideContent() {
2305
2323
  "",
2306
2324
  heading(2, "Run the site"),
2307
2325
  "",
2308
- codeBlock("sh", ["npm install", "npm run dev", "npm run build"].join("\n")),
2326
+ codeBlock(
2327
+ "sh",
2328
+ [
2329
+ "npm install",
2330
+ "npm exec riebeckite dev",
2331
+ "npm exec riebeckite build"
2332
+ ].join("\n")
2333
+ ),
2309
2334
  "",
2310
2335
  heading(2, "Localize a page"),
2311
2336
  "",
@@ -2399,7 +2424,7 @@ function referenceThemesContent() {
2399
2424
  }
2400
2425
 
2401
2426
  // src/scaffold/version.ts
2402
- var RIEBECKITE_VERSION = "^0.0.7";
2427
+ var RIEBECKITE_VERSION = "^0.0.8";
2403
2428
 
2404
2429
  // src/scaffold/templates.ts
2405
2430
  function siteTemplateFiles(preset, variables) {
@@ -2651,7 +2676,13 @@ function tsconfig() {
2651
2676
  `;
2652
2677
  }
2653
2678
  function gitignore() {
2654
- return ["node_modules/", "dist/", ".riebeckite/", ""].join("\n");
2679
+ return [
2680
+ "node_modules/",
2681
+ "dist/",
2682
+ ".riebeckite/",
2683
+ "app/.riebeckite/",
2684
+ ""
2685
+ ].join("\n");
2655
2686
  }
2656
2687
  var REPO = "https://github.com/Rerurate514/riebeckite";
2657
2688
  var README_INTRO = {
@@ -2707,7 +2738,7 @@ var README_WORDS = {
2707
2738
  demoPages: "Try the demos",
2708
2739
  demoPagesBody: "The generated site ships content pages that exercise these features:",
2709
2740
  copyDemos: "Copy-paste demos",
2710
- copyDemosBody: "Paste any of these snippets into a Markdown file under `content/` and run `npm run dev`. Each one renders through a plugin this preset registers."
2741
+ copyDemosBody: "Paste any of these snippets into a Markdown file under `content/` and run `npm exec riebeckite dev`. Each one renders through a plugin this preset registers."
2711
2742
  },
2712
2743
  ja: {
2713
2744
  included: "含まれているもの",
@@ -2731,7 +2762,7 @@ var README_WORDS = {
2731
2762
  demoPages: "デモを試す",
2732
2763
  demoPagesBody: "生成されたサイトには、各機能を体験できるコンテンツページが含まれています:",
2733
2764
  copyDemos: "コピーして使えるデモ",
2734
- copyDemosBody: "以下のスニペットを `content/` 配下の Markdown ファイルに貼り付けて `npm run dev` を実行してください。それぞれ、このプリセットが登録しているプラグインでレンダリングされます。"
2765
+ copyDemosBody: "以下のスニペットを `content/` 配下の Markdown ファイルに貼り付けて `npm exec riebeckite dev` を実行してください。それぞれ、このプリセットが登録しているプラグインでレンダリングされます。"
2735
2766
  }
2736
2767
  };
2737
2768
  function readme(preset, variables) {
@@ -2765,9 +2796,9 @@ function readmeEn(preset, variables) {
2765
2796
  lines.push(
2766
2797
  "```sh",
2767
2798
  "npm install",
2768
- "npm run check",
2769
- "npm run dev",
2770
- "npm run build",
2799
+ "npm exec riebeckite check",
2800
+ "npm exec riebeckite dev",
2801
+ "npm exec riebeckite build",
2771
2802
  "```",
2772
2803
  ""
2773
2804
  );
@@ -2813,9 +2844,9 @@ function readmeJa(preset, variables) {
2813
2844
  lines.push(
2814
2845
  "```sh",
2815
2846
  "npm install",
2816
- "npm run check",
2817
- "npm run dev",
2818
- "npm run build",
2847
+ "npm exec riebeckite check",
2848
+ "npm exec riebeckite dev",
2849
+ "npm exec riebeckite build",
2819
2850
  "```",
2820
2851
  ""
2821
2852
  );
@@ -3319,6 +3350,7 @@ const resolvedConfig = resolveConfigModule(rawConfigModule);
3319
3350
 
3320
3351
  export const config = {
3321
3352
  ...resolvedConfig,
3353
+ buildDirectory: path.join(appRoot, ".riebeckite"),
3322
3354
  content: {
3323
3355
  ...resolvedConfig.content,
3324
3356
  directory: path.resolve(appRoot, resolvedConfig.content.directory),
@@ -3700,7 +3732,7 @@ async function assertTargetWritable(targetDirectory, files, overwrite) {
3700
3732
  try {
3701
3733
  entries = await fs6.readdir(targetDirectory);
3702
3734
  } catch (error) {
3703
- if (isNotFoundError(error)) return;
3735
+ if (isNotFoundError2(error)) return;
3704
3736
  throw error;
3705
3737
  }
3706
3738
  const conflicts = entries.filter(
@@ -3718,7 +3750,7 @@ function normalizePackageName(value) {
3718
3750
  const normalized = value.trim().toLowerCase().replace(/[^a-z0-9._-]+/g, "-").replace(/^[-_.]+/, "").replace(/[-_.]+$/, "");
3719
3751
  return normalized || "riebeckite-site";
3720
3752
  }
3721
- function isNotFoundError(error) {
3753
+ function isNotFoundError2(error) {
3722
3754
  return typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT";
3723
3755
  }
3724
3756
 
@@ -3729,9 +3761,9 @@ function formatScaffoldNextSteps(relativeDirectory) {
3729
3761
  lines.push(` cd ${relativeDirectory}`);
3730
3762
  }
3731
3763
  lines.push(" npm install");
3732
- lines.push(" npm run check");
3733
- lines.push(" npm run dev");
3734
- lines.push(" npm run build");
3764
+ lines.push(" npm exec riebeckite check");
3765
+ lines.push(" npm exec riebeckite dev");
3766
+ lines.push(" npm exec riebeckite build");
3735
3767
  return lines.join("\n");
3736
3768
  }
3737
3769
  export {
@@ -1 +1 @@
1
- export declare const RIEBECKITE_VERSION = "^0.0.7";
1
+ export declare const RIEBECKITE_VERSION = "^0.0.8";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riebeckite/honox",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -36,7 +36,7 @@
36
36
  "esbuild": "^0.28.2",
37
37
  "hono": "^4.12.25",
38
38
  "vite": "^8.0.9",
39
- "@riebeckite/core": "0.0.7"
39
+ "@riebeckite/core": "0.0.8"
40
40
  },
41
41
  "publishConfig": {
42
42
  "access": "public"