@storybook/addon-themes 10.0.0-beta.1 → 10.0.0-beta.11
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/postinstall.js +14 -17
- package/package.json +3 -3
package/dist/postinstall.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_ichcv8ciro8 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_ichcv8ciro8 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_ichcv8ciro8 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_ichcv8ciro8.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_ichcv8ciro8.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_ichcv8ciro8.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -15,23 +15,20 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
15
15
|
// src/postinstall.ts
|
|
16
16
|
import { spawn } from "child_process";
|
|
17
17
|
var PACKAGE_MANAGER_TO_COMMAND = {
|
|
18
|
-
npm:
|
|
19
|
-
pnpm:
|
|
20
|
-
yarn1:
|
|
21
|
-
yarn2:
|
|
22
|
-
bun:
|
|
18
|
+
npm: "npx",
|
|
19
|
+
pnpm: "pnpm dlx",
|
|
20
|
+
yarn1: "npx",
|
|
21
|
+
yarn2: "yarn dlx",
|
|
22
|
+
bun: "bunx"
|
|
23
23
|
};
|
|
24
24
|
var selectPackageManagerCommand = /* @__PURE__ */ __name((packageManager) => PACKAGE_MANAGER_TO_COMMAND[packageManager], "selectPackageManagerCommand");
|
|
25
|
-
|
|
26
|
-
const
|
|
27
|
-
await spawn(command
|
|
25
|
+
async function postinstall({ packageManager = "npm" }) {
|
|
26
|
+
const command = selectPackageManagerCommand(packageManager);
|
|
27
|
+
await spawn(`${command} @storybook/auto-config themes`, {
|
|
28
28
|
stdio: "inherit",
|
|
29
29
|
cwd: process.cwd(),
|
|
30
30
|
shell: true
|
|
31
31
|
});
|
|
32
|
-
}, "spawnPackageManagerScript");
|
|
33
|
-
async function postinstall({ packageManager = "npm" }) {
|
|
34
|
-
await spawnPackageManagerScript(packageManager, ["@storybook/auto-config", "themes"]);
|
|
35
32
|
}
|
|
36
33
|
__name(postinstall, "postinstall");
|
|
37
34
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/addon-themes",
|
|
3
|
-
"version": "10.0.0-beta.
|
|
3
|
+
"version": "10.0.0-beta.11",
|
|
4
4
|
"description": "Storybook Themes addon: Switch between themes from the toolbar",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"css",
|
|
@@ -61,13 +61,13 @@
|
|
|
61
61
|
"ts-dedent": "^2.0.0"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
|
-
"@storybook/icons": "^1.
|
|
64
|
+
"@storybook/icons": "^1.6.0",
|
|
65
65
|
"react": "^18.2.0",
|
|
66
66
|
"react-dom": "^18.2.0",
|
|
67
67
|
"typescript": "^5.8.3"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
|
-
"storybook": "^10.0.0-beta.
|
|
70
|
+
"storybook": "^10.0.0-beta.11"
|
|
71
71
|
},
|
|
72
72
|
"publishConfig": {
|
|
73
73
|
"access": "public"
|