@storybook/addon-themes 7.5.0 → 7.5.1
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +8 -8
- package/postinstall.js +14 -7
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@storybook/addon-themes",
|
3
|
-
"version": "7.5.
|
3
|
+
"version": "7.5.1",
|
4
4
|
"description": "Switch between multiple themes for you components in Storybook",
|
5
5
|
"keywords": [
|
6
6
|
"css",
|
@@ -74,13 +74,13 @@
|
|
74
74
|
"prep": "../../../scripts/prepare/bundle.ts"
|
75
75
|
},
|
76
76
|
"dependencies": {
|
77
|
-
"@storybook/client-logger": "7.5.
|
78
|
-
"@storybook/components": "7.5.
|
79
|
-
"@storybook/core-events": "7.5.
|
80
|
-
"@storybook/manager-api": "7.5.
|
81
|
-
"@storybook/preview-api": "7.5.
|
82
|
-
"@storybook/theming": "7.5.
|
83
|
-
"@storybook/types": "7.5.
|
77
|
+
"@storybook/client-logger": "7.5.1",
|
78
|
+
"@storybook/components": "7.5.1",
|
79
|
+
"@storybook/core-events": "7.5.1",
|
80
|
+
"@storybook/manager-api": "7.5.1",
|
81
|
+
"@storybook/preview-api": "7.5.1",
|
82
|
+
"@storybook/theming": "7.5.1",
|
83
|
+
"@storybook/types": "7.5.1",
|
84
84
|
"ts-dedent": "^2.0.0"
|
85
85
|
},
|
86
86
|
"devDependencies": {
|
package/postinstall.js
CHANGED
@@ -1,17 +1,24 @@
|
|
1
1
|
const { spawn } = require('child_process');
|
2
2
|
|
3
3
|
const PACKAGE_MANAGER_TO_COMMAND = {
|
4
|
-
npm: 'npx',
|
5
|
-
|
6
|
-
|
7
|
-
|
4
|
+
npm: ['npx'],
|
5
|
+
pnpm: ['pnpm', 'dlx'],
|
6
|
+
yarn1: ['npx'],
|
7
|
+
yarn2: ['yarn', 'dlx'],
|
8
8
|
};
|
9
9
|
|
10
|
-
|
11
|
-
const command = PACKAGE_MANAGER_TO_COMMAND[options.packageManager];
|
10
|
+
const selectPackageManagerCommand = (packageManager) => PACKAGE_MANAGER_TO_COMMAND[packageManager];
|
12
11
|
|
13
|
-
|
12
|
+
const spawnPackageManagerScript = async (packageManager, args) => {
|
13
|
+
const [command, ...baseArgs] = selectPackageManagerCommand(packageManager);
|
14
|
+
|
15
|
+
await spawn(command, [...baseArgs, ...args], {
|
14
16
|
stdio: 'inherit',
|
15
17
|
cwd: process.cwd(),
|
18
|
+
shell: true,
|
16
19
|
});
|
17
20
|
};
|
21
|
+
|
22
|
+
module.exports = async function postinstall({ packageManager = 'npm' }) {
|
23
|
+
await spawnPackageManagerScript(packageManager, ['@storybook/auto-config', 'themes']);
|
24
|
+
};
|