juo 0.3.0-alpha.6 → 0.3.0-alpha.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/README.md CHANGED
@@ -20,7 +20,7 @@ $ npm install -g juo
20
20
  $ juo COMMAND
21
21
  running command...
22
22
  $ juo (--version)
23
- juo/0.3.0-alpha.6 linux-x64 node-v22.21.0
23
+ juo/0.3.0-alpha.8 linux-x64 node-v22.21.0
24
24
  $ juo --help [COMMAND]
25
25
  USAGE
26
26
  $ juo COMMAND
@@ -1,12 +1,12 @@
1
1
  import { t as BaseCommand } from "../../base-command-BQVnm_gK.js";
2
- import * as _oclif_core_interfaces8 from "@oclif/core/interfaces";
2
+ import * as _oclif_core_interfaces0 from "@oclif/core/interfaces";
3
3
 
4
4
  //#region src/commands/blocks/dev.d.ts
5
5
  declare class Dev extends BaseCommand<typeof Dev> {
6
6
  static description: string;
7
7
  static examples: string[];
8
8
  static flags: {
9
- port: _oclif_core_interfaces8.OptionFlag<number, _oclif_core_interfaces8.CustomOptions>;
9
+ port: _oclif_core_interfaces0.OptionFlag<number, _oclif_core_interfaces0.CustomOptions>;
10
10
  };
11
11
  run(): Promise<void>;
12
12
  private resolvePackageJsonPath;
@@ -1,13 +1,13 @@
1
1
  import { Command } from "@oclif/core";
2
- import * as _oclif_core_interfaces0 from "@oclif/core/interfaces";
2
+ import * as _oclif_core_interfaces1 from "@oclif/core/interfaces";
3
3
 
4
4
  //#region src/commands/create.d.ts
5
5
  declare class Create extends Command {
6
6
  static description: string;
7
7
  static flags: {
8
- quickstart: _oclif_core_interfaces0.BooleanFlag<boolean>;
9
- storybook: _oclif_core_interfaces0.BooleanFlag<boolean>;
10
- verbose: _oclif_core_interfaces0.BooleanFlag<boolean>;
8
+ quickstart: _oclif_core_interfaces1.BooleanFlag<boolean>;
9
+ storybook: _oclif_core_interfaces1.BooleanFlag<boolean>;
10
+ verbose: _oclif_core_interfaces1.BooleanFlag<boolean>;
11
11
  };
12
12
  run(): Promise<void>;
13
13
  private getProjectConfig;
@@ -1,5 +1,5 @@
1
1
  import { r as BaseTemplateGenerator } from "../juoTemplateGenerator-RkinYN2l.js";
2
- import { t as PackageGenerator } from "../packageGenerator-BwUFIvNN.js";
2
+ import { t as PackageGenerator } from "../packageGenerator-CM9jhdnh.js";
3
3
  import { t as Generate } from "../generate-BiHo2p9_.js";
4
4
  import { Command, Flags } from "@oclif/core";
5
5
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
@@ -21,9 +21,9 @@ var ConfigFilesGenerator = class extends BaseTemplateGenerator {
21
21
  var DevHarnessGenerator = class extends BaseTemplateGenerator {
22
22
  generate(destDir, options) {
23
23
  this.renderTemplate("dev", destDir, {
24
- devtoolsVersion: "0.1.0-alpha.4",
25
- editorVersion: "0.25.0-alpha.0",
26
- extensionsVersion: "1.12.0-alpha.0",
24
+ devtoolsVersion: "0.1.0-alpha.8",
25
+ editorVersion: "0.25.0-alpha.2",
26
+ extensionsVersion: "1.12.0-alpha.3",
27
27
  tailwind: options.tailwind
28
28
  });
29
29
  }
@@ -91,36 +91,6 @@ var StorybookGenerator = class extends BaseTemplateGenerator {
91
91
  const storybookDir = path.join(destDir, ".storybook");
92
92
  this.renderTemplate(".storybook", storybookDir, {});
93
93
  }
94
- /**
95
- * Prepends an import to the Storybook preview file (preview.ts/preview.js),
96
- * creating it if Storybook init didn't. No-ops when the import is already
97
- * present so repeated runs stay idempotent.
98
- */
99
- prependImportToPreview(destDir, importStatement) {
100
- const storybookDir = path.join(destDir, ".storybook");
101
- const previewTsPath = path.join(storybookDir, "preview.ts");
102
- const previewJsPath = path.join(storybookDir, "preview.js");
103
- const line = `${importStatement}\n`;
104
- let targetPath;
105
- if (existsSync(previewTsPath)) targetPath = previewTsPath;
106
- else if (existsSync(previewJsPath)) targetPath = previewJsPath;
107
- else {
108
- mkdirSync(storybookDir, { recursive: true });
109
- writeFileSync(previewTsPath, line);
110
- return;
111
- }
112
- const existingContent = readFileSync(targetPath, "utf8");
113
- if (!existingContent.includes(importStatement)) writeFileSync(targetPath, line + existingContent);
114
- }
115
- /**
116
- * The starter block renders `@juo/customer-ui` web components (`<juo-card>`,
117
- * `<juo-text>`, `<juo-button>`). The dev harness registers them via the
118
- * generated `register.ts`, but the Storybook preview has no such entry, so
119
- * import the side-effecting bundle here to define the custom elements.
120
- */
121
- registerWebComponents(destDir) {
122
- this.prependImportToPreview(destDir, "import \"@juo/customer-ui/web-components\";");
123
- }
124
94
  injectViteFinal(content, isTs) {
125
95
  const viteFinal = [
126
96
  " viteFinal: async (config) => {",
@@ -167,6 +137,36 @@ var StorybookGenerator = class extends BaseTemplateGenerator {
167
137
  }
168
138
  }
169
139
  /**
140
+ * Prepends an import to the Storybook preview file (preview.ts/preview.js),
141
+ * creating it if Storybook init didn't. No-ops when the import is already
142
+ * present so repeated runs stay idempotent.
143
+ */
144
+ prependImportToPreview(destDir, importStatement) {
145
+ const storybookDir = path.join(destDir, ".storybook");
146
+ const previewTsPath = path.join(storybookDir, "preview.ts");
147
+ const previewJsPath = path.join(storybookDir, "preview.js");
148
+ const line = `${importStatement}\n`;
149
+ let targetPath;
150
+ if (existsSync(previewTsPath)) targetPath = previewTsPath;
151
+ else if (existsSync(previewJsPath)) targetPath = previewJsPath;
152
+ else {
153
+ mkdirSync(storybookDir, { recursive: true });
154
+ writeFileSync(previewTsPath, line);
155
+ return;
156
+ }
157
+ const existingContent = readFileSync(targetPath, "utf8");
158
+ if (!existingContent.includes(importStatement)) writeFileSync(targetPath, line + existingContent);
159
+ }
160
+ /**
161
+ * The starter block renders `@juo/customer-ui` web components (`<juo-card>`,
162
+ * `<juo-text>`, `<juo-button>`). The dev harness registers them via the
163
+ * generated `register.ts`, but the Storybook preview has no such entry, so
164
+ * import the side-effecting bundle here to define the custom elements.
165
+ */
166
+ registerWebComponents(destDir) {
167
+ this.prependImportToPreview(destDir, "import \"@juo/customer-ui/web-components\";");
168
+ }
169
+ /**
170
170
  * Storybook init scaffolds example stories (Button/Header/Page) into
171
171
  * `src/stories`. The CLI emits real block stories into the top-level
172
172
  * `stories/` dir afterwards, so drop the scaffolding to avoid shipping
@@ -1,15 +1,15 @@
1
1
  import { Command } from "@oclif/core";
2
- import * as _oclif_core_interfaces2 from "@oclif/core/interfaces";
2
+ import * as _oclif_core_interfaces6 from "@oclif/core/interfaces";
3
3
 
4
4
  //#region src/commands/generate.d.ts
5
5
  declare class Generate extends Command {
6
6
  static description: string;
7
7
  static examples: string[];
8
8
  static flags: {
9
- name: _oclif_core_interfaces2.OptionFlag<string | undefined, _oclif_core_interfaces2.CustomOptions>;
10
- tailwind: _oclif_core_interfaces2.BooleanFlag<boolean>;
11
- type: _oclif_core_interfaces2.OptionFlag<string, _oclif_core_interfaces2.CustomOptions>;
12
- verbose: _oclif_core_interfaces2.BooleanFlag<boolean>;
9
+ name: _oclif_core_interfaces6.OptionFlag<string | undefined, _oclif_core_interfaces6.CustomOptions>;
10
+ tailwind: _oclif_core_interfaces6.BooleanFlag<boolean>;
11
+ type: _oclif_core_interfaces6.OptionFlag<string, _oclif_core_interfaces6.CustomOptions>;
12
+ verbose: _oclif_core_interfaces6.BooleanFlag<boolean>;
13
13
  };
14
14
  static id: string;
15
15
  run(): Promise<void>;
@@ -1,5 +1,5 @@
1
1
  import { t as BaseCommand } from "../../base-command-BQVnm_gK.js";
2
- import * as _oclif_core_interfaces10 from "@oclif/core/interfaces";
2
+ import * as _oclif_core_interfaces4 from "@oclif/core/interfaces";
3
3
 
4
4
  //#region src/commands/publish/index.d.ts
5
5
  declare class Publish extends BaseCommand<typeof Publish> {
@@ -7,7 +7,7 @@ declare class Publish extends BaseCommand<typeof Publish> {
7
7
  static description: string;
8
8
  static examples: string[];
9
9
  static flags: {
10
- theme: _oclif_core_interfaces10.OptionFlag<string, _oclif_core_interfaces10.CustomOptions>;
10
+ theme: _oclif_core_interfaces4.OptionFlag<string, _oclif_core_interfaces4.CustomOptions>;
11
11
  };
12
12
  getAllFiles(dirPath: string, basePath: string): string[];
13
13
  run(): Promise<void>;
package/dist/lib/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  import { n as StoryGenerator, r as BaseTemplateGenerator, t as JuoTemplateGenerator } from "../juoTemplateGenerator-RkinYN2l.js";
2
- import { t as PackageGenerator } from "../packageGenerator-BwUFIvNN.js";
2
+ import { t as PackageGenerator } from "../packageGenerator-CM9jhdnh.js";
3
3
 
4
4
  export { BaseTemplateGenerator, JuoTemplateGenerator, PackageGenerator, StoryGenerator };
@@ -80,8 +80,8 @@ var PackageGenerator = class {
80
80
  });
81
81
  const frameworkConfig = FRAMEWORK_CONFIGS[options.framework];
82
82
  baseConfig.dependencies = {
83
- "@juo/blocks": "1.13.0-alpha.0",
84
- "@juo/customer-ui": "0.5.0-alpha.7",
83
+ "@juo/blocks": "1.13.0-alpha.2",
84
+ "@juo/customer-ui": "0.5.0-alpha.8",
85
85
  ...baseConfig.dependencies,
86
86
  ...frameworkConfig.dependencies
87
87
  };
@@ -179,5 +179,5 @@
179
179
  ]
180
180
  }
181
181
  },
182
- "version": "0.3.0-alpha.6"
182
+ "version": "0.3.0-alpha.8"
183
183
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "juo",
3
3
  "description": "A CLI tool for the Juo platform",
4
- "version": "0.3.0-alpha.6",
4
+ "version": "0.3.0-alpha.8",
5
5
  "author": "Juo (https://juo.io)",
6
6
  "bin": {
7
7
  "juo": "./bin/run.js"
@@ -28,7 +28,7 @@ export default defineConfig({
28
28
  fileName: "index",
29
29
  },
30
30
  rollupOptions: {
31
- external: [/^@juo\/blocks/],
31
+ external: ["@juo/blocks"],
32
32
  },
33
33
  },
34
34
  });