@storybook/addon-themes 10.1.0-alpha.12 → 10.1.0-alpha.13
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 +10 -11
- package/package.json +2 -2
package/dist/postinstall.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_8iwy4wfpgc9 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_8iwy4wfpgc9 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_8iwy4wfpgc9 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_8iwy4wfpgc9.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_8iwy4wfpgc9.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_8iwy4wfpgc9.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
|
|
13
13
|
// src/postinstall.ts
|
|
14
|
-
import {
|
|
14
|
+
import { spawnSync } from "child_process";
|
|
15
15
|
var PACKAGE_MANAGER_TO_COMMAND = {
|
|
16
16
|
npm: "npx",
|
|
17
17
|
pnpm: "pnpm dlx",
|
|
@@ -20,11 +20,10 @@ var PACKAGE_MANAGER_TO_COMMAND = {
|
|
|
20
20
|
bun: "bunx"
|
|
21
21
|
}, selectPackageManagerCommand = (packageManager) => PACKAGE_MANAGER_TO_COMMAND[packageManager];
|
|
22
22
|
async function postinstall({ packageManager = "npm" }) {
|
|
23
|
-
let
|
|
24
|
-
|
|
23
|
+
let commandString = selectPackageManagerCommand(packageManager), [command, ...commandArgs] = commandString.split(" ");
|
|
24
|
+
spawnSync(command, [...commandArgs, "@storybook/auto-config", "themes"], {
|
|
25
25
|
stdio: "inherit",
|
|
26
|
-
cwd: process.cwd()
|
|
27
|
-
shell: !0
|
|
26
|
+
cwd: process.cwd()
|
|
28
27
|
});
|
|
29
28
|
}
|
|
30
29
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/addon-themes",
|
|
3
|
-
"version": "10.1.0-alpha.
|
|
3
|
+
"version": "10.1.0-alpha.13",
|
|
4
4
|
"description": "Storybook Themes addon: Switch between themes from the toolbar",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"css",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"typescript": "^5.8.3"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
|
-
"storybook": "^10.1.0-alpha.
|
|
70
|
+
"storybook": "^10.1.0-alpha.13"
|
|
71
71
|
},
|
|
72
72
|
"publishConfig": {
|
|
73
73
|
"access": "public"
|