@storybook/addon-themes 7.4.0-alpha.1 → 7.4.0
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +10 -9
- package/postinstall.js +17 -0
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@storybook/addon-themes",
|
3
|
-
"version": "7.4.0
|
3
|
+
"version": "7.4.0",
|
4
4
|
"description": "Switch between multiple themes for you components in Storybook",
|
5
5
|
"keywords": [
|
6
6
|
"css",
|
@@ -43,7 +43,8 @@
|
|
43
43
|
"require": "./dist/preview.js",
|
44
44
|
"import": "./dist/preview.mjs"
|
45
45
|
},
|
46
|
-
"./package.json": "./package.json"
|
46
|
+
"./package.json": "./package.json",
|
47
|
+
"./postinstall": "./postinstall.js"
|
47
48
|
},
|
48
49
|
"main": "dist/index.js",
|
49
50
|
"module": "dist/index.mjs",
|
@@ -73,13 +74,13 @@
|
|
73
74
|
"prep": "../../../scripts/prepare/bundle.ts"
|
74
75
|
},
|
75
76
|
"dependencies": {
|
76
|
-
"@storybook/client-logger": "7.4.0
|
77
|
-
"@storybook/components": "7.4.0
|
78
|
-
"@storybook/core-events": "7.4.0
|
79
|
-
"@storybook/manager-api": "7.4.0
|
80
|
-
"@storybook/preview-api": "7.4.0
|
81
|
-
"@storybook/theming": "7.4.0
|
82
|
-
"@storybook/types": "7.4.0
|
77
|
+
"@storybook/client-logger": "7.4.0",
|
78
|
+
"@storybook/components": "7.4.0",
|
79
|
+
"@storybook/core-events": "7.4.0",
|
80
|
+
"@storybook/manager-api": "7.4.0",
|
81
|
+
"@storybook/preview-api": "7.4.0",
|
82
|
+
"@storybook/theming": "7.4.0",
|
83
|
+
"@storybook/types": "7.4.0",
|
83
84
|
"ts-dedent": "^2.0.0"
|
84
85
|
},
|
85
86
|
"devDependencies": {
|
package/postinstall.js
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
const { spawn } = require('child_process');
|
2
|
+
|
3
|
+
const PACKAGE_MANAGER_TO_COMMAND = {
|
4
|
+
npm: 'npx',
|
5
|
+
yarn1: 'yarn dlx',
|
6
|
+
yarn2: 'yarn dlx',
|
7
|
+
pnpm: 'pnpm dlx',
|
8
|
+
};
|
9
|
+
|
10
|
+
module.exports = function postinstall(options) {
|
11
|
+
const command = PACKAGE_MANAGER_TO_COMMAND[options.packageManager];
|
12
|
+
|
13
|
+
spawn(command, ['@storybook/auto-config', 'themes'], {
|
14
|
+
stdio: 'inherit',
|
15
|
+
cwd: process.cwd(),
|
16
|
+
});
|
17
|
+
};
|