@cedarjs/cli-storybook-vite 0.0.4

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Cedar
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,9 @@
1
+ # CLI Packages - Storybook Vite
2
+
3
+ This CLI package is intended to be used with the [Storybook Framework package](../../storybook/README.md). We are still finalizing usage details.
4
+ For now, get started as follows:
5
+
6
+ - Run `yarn rw sb` from your project. This will:
7
+ - Add the necessary config files, if they don't already exist: `web/.storybook/{main.ts + preview-body.html}`.
8
+ - Create the Mock Service Worker, which is needed for all Cell mocking.
9
+ - Run Storybook.
@@ -0,0 +1,9 @@
1
+ import type { Argv } from 'yargs';
2
+ import type { StorybookYargsOptions } from '../types';
3
+ export declare const command = "storybook";
4
+ export declare const aliases: string[];
5
+ export declare const description = "Launch Storybook: a tool for building UI components and pages in isolation";
6
+ export declare const defaultOptions: StorybookYargsOptions;
7
+ export declare function builder(yargs: Argv<StorybookYargsOptions>): Argv<StorybookYargsOptions>;
8
+ export declare function handler(options: StorybookYargsOptions): Promise<void>;
9
+ //# sourceMappingURL=storybook.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storybook.d.ts","sourceRoot":"","sources":["../../src/commands/storybook.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAIjC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAA;AAErD,eAAO,MAAM,OAAO,cAAc,CAAA;AAClC,eAAO,MAAM,OAAO,UAAS,CAAA;AAC7B,eAAO,MAAM,WAAW,+EACsD,CAAA;AAE9E,eAAO,MAAM,cAAc,EAAE,qBAO5B,CAAA;AAED,wBAAgB,OAAO,CACrB,KAAK,EAAE,IAAI,CAAC,qBAAqB,CAAC,GACjC,IAAI,CAAC,qBAAqB,CAAC,CAwC7B;AAED,wBAAsB,OAAO,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAgB3E"}
@@ -0,0 +1,104 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var storybook_exports = {};
30
+ __export(storybook_exports, {
31
+ aliases: () => aliases,
32
+ builder: () => builder,
33
+ command: () => command,
34
+ defaultOptions: () => defaultOptions,
35
+ description: () => description,
36
+ handler: () => handler
37
+ });
38
+ module.exports = __toCommonJS(storybook_exports);
39
+ var import_terminal_link = __toESM(require("terminal-link"));
40
+ var import_cli_helpers = require("@cedarjs/cli-helpers");
41
+ const command = "storybook";
42
+ const aliases = ["sb"];
43
+ const description = "Launch Storybook: a tool for building UI components and pages in isolation";
44
+ const defaultOptions = {
45
+ open: true,
46
+ build: false,
47
+ ci: false,
48
+ port: 7910,
49
+ buildDirectory: "public/storybook",
50
+ smokeTest: false
51
+ };
52
+ function builder(yargs) {
53
+ return yargs.option("build", {
54
+ describe: "Build Storybook",
55
+ type: "boolean",
56
+ default: defaultOptions.build
57
+ }).option("build-directory", {
58
+ describe: "Directory in web/ to store static files",
59
+ type: "string",
60
+ default: defaultOptions.buildDirectory
61
+ }).option("ci", {
62
+ describe: "Start server in CI mode, with no interactive prompts",
63
+ type: "boolean",
64
+ default: defaultOptions.ci
65
+ }).option("open", {
66
+ describe: "Open storybook in your browser on start",
67
+ type: "boolean",
68
+ default: defaultOptions.open
69
+ }).option("port", {
70
+ describe: "Which port to run storybook on",
71
+ type: "number",
72
+ default: defaultOptions.port
73
+ }).option("smoke-test", {
74
+ describe: "CI mode plus smoke-test (skip prompts; don't open browser; exit after successful start)",
75
+ type: "boolean",
76
+ default: defaultOptions.smokeTest
77
+ }).epilogue(
78
+ `Also see the ${(0, import_terminal_link.default)(
79
+ "Redwood CLI Reference",
80
+ "https://redwoodjs.com/docs/cli-commands#storybook"
81
+ )}`
82
+ );
83
+ }
84
+ async function handler(options) {
85
+ (0, import_cli_helpers.recordTelemetryAttributes)({
86
+ command: "storybook",
87
+ build: options.build,
88
+ ci: options.ci,
89
+ open: options.open,
90
+ smokeTest: options.smokeTest
91
+ });
92
+ process.emit("shutdown-telemetry");
93
+ const { handler: storybookHandler } = await import("./storybookHandler.js");
94
+ await storybookHandler(options);
95
+ }
96
+ // Annotate the CommonJS export names for ESM import in node:
97
+ 0 && (module.exports = {
98
+ aliases,
99
+ builder,
100
+ command,
101
+ defaultOptions,
102
+ description,
103
+ handler
104
+ });
@@ -0,0 +1,3 @@
1
+ import type { StorybookYargsOptions } from '../types';
2
+ export declare function handler({ build, buildDirectory, ci, open, port, smokeTest, }: StorybookYargsOptions): Promise<void>;
3
+ //# sourceMappingURL=storybookHandler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storybookHandler.d.ts","sourceRoot":"","sources":["../../src/commands/storybookHandler.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAA;AAkBrD,wBAAsB,OAAO,CAAC,EAC5B,KAAK,EACL,cAAc,EACd,EAAE,EACF,IAAI,EACJ,IAAI,EACJ,SAAS,GACV,EAAE,qBAAqB,iBA+IvB"}
@@ -0,0 +1,179 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var storybookHandler_exports = {};
30
+ __export(storybookHandler_exports, {
31
+ handler: () => handler
32
+ });
33
+ module.exports = __toCommonJS(storybookHandler_exports);
34
+ var import_node_fs = __toESM(require("node:fs"));
35
+ var import_node_path = __toESM(require("node:path"));
36
+ var import_node_process = __toESM(require("node:process"));
37
+ var import_execa = __toESM(require("execa"));
38
+ var import_semver = __toESM(require("semver"));
39
+ var import_cli_helpers = require("@cedarjs/cli-helpers");
40
+ var import_project_config = require("@cedarjs/project-config");
41
+ var import_telemetry = require("@cedarjs/telemetry");
42
+ var import_colors = __toESM(require("../lib/colors"));
43
+ const readFile = (target) => import_node_fs.default.readFileSync(target, { encoding: "utf8" });
44
+ const writeFile = (target, contents) => {
45
+ const { base } = (0, import_project_config.getPaths)();
46
+ if (import_node_fs.default.existsSync(target)) {
47
+ throw new Error(`${target} already exists.`);
48
+ }
49
+ const filename = import_node_path.default.basename(target);
50
+ const targetDir = target.replace(filename, "");
51
+ import_node_fs.default.mkdirSync(targetDir, { recursive: true });
52
+ import_node_fs.default.writeFileSync(target, contents);
53
+ console.log(`Successfully wrote file \`./${import_node_path.default.relative(base, target)}\``);
54
+ };
55
+ async function handler({
56
+ build,
57
+ buildDirectory,
58
+ ci,
59
+ open,
60
+ port,
61
+ smokeTest
62
+ }) {
63
+ console.log(
64
+ import_colors.default.bold(
65
+ `
66
+ Please find documentation and links to provide feedback for this new command at:
67
+ -> https://community.redwoodjs.com/t/7212
68
+
69
+ `
70
+ )
71
+ );
72
+ import_node_fs.default.rmSync(
73
+ import_node_path.default.join((0, import_project_config.getPaths)().generated.types.includes, "web-storybook.d.ts"),
74
+ { force: true }
75
+ );
76
+ if (build && smokeTest) {
77
+ throw new Error('Can not provide both "--build" and "--smoke-test"');
78
+ }
79
+ if (build && open) {
80
+ console.warn(
81
+ import_colors.default.warning(
82
+ "Warning: --open option has no effect when running Storybook build"
83
+ )
84
+ );
85
+ }
86
+ const cwd = (0, import_project_config.getPaths)().web.base;
87
+ const staticAssetsFolder = import_node_path.default.join(cwd, "public");
88
+ const execaOptions = {
89
+ stdio: "inherit",
90
+ shell: true,
91
+ cwd
92
+ };
93
+ await import_execa.default.command(
94
+ `yarn msw init "${staticAssetsFolder}" --no-save`,
95
+ execaOptions
96
+ );
97
+ const usingTS = (0, import_cli_helpers.isTypeScriptProject)();
98
+ const mainFileName = usingTS ? "main.ts" : "main.js";
99
+ const redwoodProjectPaths = (0, import_project_config.getPaths)();
100
+ const storybookConfigPath = import_node_path.default.dirname(
101
+ `${redwoodProjectPaths.web.storybook}/${mainFileName}`
102
+ );
103
+ const storybookMainFilePath = import_node_path.default.join(storybookConfigPath, mainFileName);
104
+ const storybookPreviewBodyFilePath = import_node_path.default.join(
105
+ storybookConfigPath,
106
+ "preview-body.html"
107
+ );
108
+ if (!import_node_fs.default.existsSync(storybookMainFilePath)) {
109
+ const isTSProject = (0, import_cli_helpers.isTypeScriptProject)();
110
+ console.log(`Storybook's ${mainFileName} not found. Creating it now...`);
111
+ const mainConfigTemplatePath = import_node_path.default.join(
112
+ __dirname,
113
+ "templates/main.ts.template"
114
+ // The template is TS, and we'll convert it to JS if needed
115
+ );
116
+ const mainConfigContentTS = readFile(mainConfigTemplatePath);
117
+ if (isTSProject) {
118
+ writeFile(storybookMainFilePath, mainConfigContentTS);
119
+ } else {
120
+ const mainConfigContentJS = await (0, import_cli_helpers.transformTSToJS)(
121
+ storybookMainFilePath,
122
+ mainConfigContentTS
123
+ );
124
+ writeFile(storybookMainFilePath, mainConfigContentJS);
125
+ }
126
+ console.log(`${mainFileName} created!`);
127
+ }
128
+ if (!import_node_fs.default.existsSync(storybookPreviewBodyFilePath)) {
129
+ console.log("Storybook's preview-body.html not found. Creating it now...");
130
+ const previewBodyTemplatePath = import_node_path.default.join(
131
+ __dirname,
132
+ "templates/preview-body.html.template"
133
+ );
134
+ const previewBodyConfigContent = readFile(previewBodyTemplatePath);
135
+ writeFile(storybookPreviewBodyFilePath, previewBodyConfigContent);
136
+ console.log("preview-body.html created!");
137
+ }
138
+ let command = "";
139
+ const flags = [`--config-dir "${storybookConfigPath}"`];
140
+ if (build) {
141
+ command = `yarn storybook build ${[
142
+ ...flags,
143
+ `--output-dir "${buildDirectory}"`
144
+ ].filter(Boolean).join(" ")}`;
145
+ } else if (smokeTest) {
146
+ command = `yarn storybook dev ${[
147
+ ...flags,
148
+ `--port ${port}`,
149
+ `--smoke-test`,
150
+ `--ci`,
151
+ `--no-version-updates`
152
+ ].filter(Boolean).join(" ")}`;
153
+ } else {
154
+ command = `yarn storybook dev ${[
155
+ ...flags,
156
+ `--port ${port}`,
157
+ `--no-version-updates`,
158
+ ci && "--ci",
159
+ !open && `--no-open`
160
+ ].filter(Boolean).join(" ")}`;
161
+ }
162
+ const env = {};
163
+ if (import_semver.default.parse(import_node_process.default.version) !== null && import_semver.default.lt(import_node_process.default.version, "22.0.0") && import_semver.default.gte(import_node_process.default.version, "20.19.0")) {
164
+ env.NODE_OPTIONS = "--no-experimental-require-module";
165
+ }
166
+ try {
167
+ await import_execa.default.command(command, { ...execaOptions, env });
168
+ } catch (e) {
169
+ if (e.signal !== "SIGINT") {
170
+ console.log(import_colors.default.error(e.message));
171
+ (0, import_telemetry.errorTelemetry)(import_node_process.default.argv, e.message);
172
+ }
173
+ import_node_process.default.exit(e.exitCode ?? 1);
174
+ }
175
+ }
176
+ // Annotate the CommonJS export names for ESM import in node:
177
+ 0 && (module.exports = {
178
+ handler
179
+ });
@@ -0,0 +1,19 @@
1
+ import type { StorybookConfig } from 'storybook-framework-cedar'
2
+
3
+ import { getPaths, importStatementPath } from '@cedarjs/project-config'
4
+
5
+ const cedarProjectPaths = getPaths()
6
+
7
+ const config: StorybookConfig = {
8
+ framework: 'storybook-framework-cedar',
9
+
10
+ stories: [
11
+ `${importStatementPath(
12
+ cedarProjectPaths.web.src
13
+ )}/**/*.stories.@(js|jsx|ts|tsx|mdx)`,
14
+ ],
15
+
16
+ addons: ['@storybook/addon-essentials'],
17
+ }
18
+
19
+ export default config
@@ -0,0 +1 @@
1
+ <div id="redwood-app"></div>
@@ -0,0 +1,9 @@
1
+ import { builder, handler } from './commands/storybook';
2
+ export declare const commands: {
3
+ command: string;
4
+ aliases: string[];
5
+ description: string;
6
+ builder: typeof builder;
7
+ handler: typeof handler;
8
+ }[];
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,OAAO,EACP,OAAO,EACR,MAAM,sBAAsB,CAAA;AAE7B,eAAO,MAAM,QAAQ;;;;;;GAQpB,CAAA"}
package/dist/index.js ADDED
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var index_exports = {};
20
+ __export(index_exports, {
21
+ commands: () => commands
22
+ });
23
+ module.exports = __toCommonJS(index_exports);
24
+ var import_storybook = require("./commands/storybook");
25
+ const commands = [
26
+ {
27
+ command: import_storybook.command,
28
+ aliases: import_storybook.aliases,
29
+ description: import_storybook.description,
30
+ builder: import_storybook.builder,
31
+ handler: import_storybook.handler
32
+ }
33
+ ];
34
+ // Annotate the CommonJS export names for ESM import in node:
35
+ 0 && (module.exports = {
36
+ commands
37
+ });
@@ -0,0 +1,22 @@
1
+ import chalk from 'chalk';
2
+ /**
3
+ * To keep a consistent color/style palette between cli packages, such as
4
+ * \@redwood/cli and \@redwood/create-cedar-app, please keep them compatible
5
+ * with one and another. We'll might split up and refactor these into a
6
+ * separate package when there is a strong motivation behind it.
7
+ *
8
+ * Current files:
9
+ *
10
+ * - packages/cli/src/lib/colors.js (this file)
11
+ * - packages/create-cedar-app/src/create-cedar-app.js
12
+ */
13
+ declare const _default: {
14
+ error: chalk.Chalk;
15
+ warning: chalk.Chalk;
16
+ green: chalk.Chalk;
17
+ info: chalk.Chalk;
18
+ bold: chalk.Chalk;
19
+ underline: chalk.Chalk;
20
+ };
21
+ export default _default;
22
+ //# sourceMappingURL=colors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/lib/colors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB;;;;;;;;;;GAUG;;;;;;;;;AACH,wBAOC"}
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var colors_exports = {};
30
+ __export(colors_exports, {
31
+ default: () => colors_default
32
+ });
33
+ module.exports = __toCommonJS(colors_exports);
34
+ var import_chalk = __toESM(require("chalk"));
35
+ var colors_default = {
36
+ error: import_chalk.default.bold.red,
37
+ warning: import_chalk.default.keyword("orange"),
38
+ green: import_chalk.default.green,
39
+ info: import_chalk.default.grey,
40
+ bold: import_chalk.default.bold,
41
+ underline: import_chalk.default.underline
42
+ };
@@ -0,0 +1,9 @@
1
+ export interface StorybookYargsOptions {
2
+ open: boolean;
3
+ build: boolean;
4
+ ci: boolean;
5
+ port: number;
6
+ buildDirectory: string;
7
+ smokeTest: boolean;
8
+ }
9
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,OAAO,CAAA;IACb,KAAK,EAAE,OAAO,CAAA;IACd,EAAE,EAAE,OAAO,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,cAAc,EAAE,MAAM,CAAA;IACtB,SAAS,EAAE,OAAO,CAAA;CACnB"}
package/dist/types.js ADDED
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var types_exports = {};
16
+ module.exports = __toCommonJS(types_exports);
package/package.json ADDED
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "@cedarjs/cli-storybook-vite",
3
+ "version": "0.0.4",
4
+ "repository": {
5
+ "type": "git",
6
+ "url": "git+https://github.com/cedarjs/cedar.git",
7
+ "directory": "packages/cli-packages/storybook-vite"
8
+ },
9
+ "license": "MIT",
10
+ "main": "./dist/index.js",
11
+ "types": "./dist/index.d.ts",
12
+ "files": [
13
+ "dist"
14
+ ],
15
+ "scripts": {
16
+ "build": "tsx ./build.mts && yarn build:types",
17
+ "build:pack": "yarn pack -o cedar-cli-storybook-vite.tgz",
18
+ "build:types": "tsc --build --verbose",
19
+ "build:watch": "nodemon --watch src --ext \"js,jsx,ts,tsx\" --ignore dist --exec \"yarn build\"",
20
+ "prepublishOnly": "NODE_ENV=production yarn build",
21
+ "test": "yarn test:unit",
22
+ "test:unit": "vitest run"
23
+ },
24
+ "dependencies": {
25
+ "@cedarjs/cli-helpers": "0.0.4",
26
+ "@cedarjs/project-config": "0.0.4",
27
+ "@cedarjs/telemetry": "0.0.4",
28
+ "chalk": "4.1.2",
29
+ "execa": "5.1.1",
30
+ "semver": "7.6.3",
31
+ "storybook": "7.6.20",
32
+ "storybook-framework-cedar": "0.0.4",
33
+ "terminal-link": "2.1.1",
34
+ "vitest": "2.1.9",
35
+ "yargs": "17.7.2"
36
+ },
37
+ "devDependencies": {
38
+ "@cedarjs/framework-tools": "0.0.4",
39
+ "@types/semver": "^7",
40
+ "@types/yargs": "17.0.33",
41
+ "tsx": "4.19.3",
42
+ "typescript": "5.6.2"
43
+ },
44
+ "publishConfig": {
45
+ "access": "public"
46
+ },
47
+ "gitHead": "5b4f77f985bd86ee31ee7338312627accf0cb85b"
48
+ }