mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-06 01:51:05 +08:00
Mark the link addon as essential
This commit is contained in:
parent
221f6a7833
commit
3a8a5f5e2e
@ -85,7 +85,6 @@ const config: StorybookConfig = {
|
|||||||
// },
|
// },
|
||||||
],
|
],
|
||||||
addons: [
|
addons: [
|
||||||
'@storybook/addon-links',
|
|
||||||
'@storybook/addon-themes',
|
'@storybook/addon-themes',
|
||||||
'@storybook/addon-essentials',
|
'@storybook/addon-essentials',
|
||||||
'@storybook/addon-interactions',
|
'@storybook/addon-interactions',
|
||||||
|
@ -52,6 +52,12 @@
|
|||||||
"import": "./dist/highlight/preview.mjs",
|
"import": "./dist/highlight/preview.mjs",
|
||||||
"require": "./dist/highlight/preview.js"
|
"require": "./dist/highlight/preview.js"
|
||||||
},
|
},
|
||||||
|
"./link/preview": {
|
||||||
|
"types": "./dist/link/preview.d.ts",
|
||||||
|
"import": "./dist/link/preview.mjs",
|
||||||
|
"require": "./dist/link/preview.js"
|
||||||
|
},
|
||||||
|
"./link/manager": "./dist/link/manager.js",
|
||||||
"./measure/preview": {
|
"./measure/preview": {
|
||||||
"types": "./dist/measure/preview.d.ts",
|
"types": "./dist/measure/preview.d.ts",
|
||||||
"import": "./dist/measure/preview.mjs",
|
"import": "./dist/measure/preview.mjs",
|
||||||
@ -93,6 +99,7 @@
|
|||||||
"@storybook/addon-controls": "workspace:*",
|
"@storybook/addon-controls": "workspace:*",
|
||||||
"@storybook/addon-docs": "workspace:*",
|
"@storybook/addon-docs": "workspace:*",
|
||||||
"@storybook/addon-highlight": "workspace:*",
|
"@storybook/addon-highlight": "workspace:*",
|
||||||
|
"@storybook/addon-links": "workspace:*",
|
||||||
"@storybook/addon-measure": "workspace:*",
|
"@storybook/addon-measure": "workspace:*",
|
||||||
"@storybook/addon-outline": "workspace:*",
|
"@storybook/addon-outline": "workspace:*",
|
||||||
"@storybook/addon-toolbars": "workspace:*",
|
"@storybook/addon-toolbars": "workspace:*",
|
||||||
@ -118,6 +125,7 @@
|
|||||||
"./src/actions/manager.ts",
|
"./src/actions/manager.ts",
|
||||||
"./src/backgrounds/manager.ts",
|
"./src/backgrounds/manager.ts",
|
||||||
"./src/controls/manager.ts",
|
"./src/controls/manager.ts",
|
||||||
|
"./src/links/manager.ts",
|
||||||
"./src/measure/manager.ts",
|
"./src/measure/manager.ts",
|
||||||
"./src/outline/manager.ts",
|
"./src/outline/manager.ts",
|
||||||
"./src/toolbars/manager.ts",
|
"./src/toolbars/manager.ts",
|
||||||
@ -128,6 +136,7 @@
|
|||||||
"./src/backgrounds/preview.ts",
|
"./src/backgrounds/preview.ts",
|
||||||
"./src/docs/preview.ts",
|
"./src/docs/preview.ts",
|
||||||
"./src/highlight/preview.ts",
|
"./src/highlight/preview.ts",
|
||||||
|
"./src/links/preview.ts",
|
||||||
"./src/measure/preview.ts",
|
"./src/measure/preview.ts",
|
||||||
"./src/outline/preview.ts",
|
"./src/outline/preview.ts",
|
||||||
"./src/viewport/preview.ts"
|
"./src/viewport/preview.ts"
|
||||||
|
2
code/addons/essentials/src/links/manager.ts
Normal file
2
code/addons/essentials/src/links/manager.ts
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
// @ts-expect-error (no types needed for this)
|
||||||
|
export * from '@storybook/addon-link/manager';
|
2
code/addons/essentials/src/links/preview.ts
Normal file
2
code/addons/essentials/src/links/preview.ts
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
// @ts-expect-error (no types needed for this)
|
||||||
|
export * from '@storybook/addon-link/preview';
|
@ -3,8 +3,8 @@
|
|||||||
"version": "8.4.0-alpha.0",
|
"version": "8.4.0-alpha.0",
|
||||||
"description": "Link stories together to build demos and prototypes with your UI components",
|
"description": "Link stories together to build demos and prototypes with your UI components",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"addon",
|
"storybook-addons",
|
||||||
"storybook",
|
"essentials",
|
||||||
"organize"
|
"organize"
|
||||||
],
|
],
|
||||||
"homepage": "https://github.com/storybookjs/storybook/tree/next/code/addons/links",
|
"homepage": "https://github.com/storybookjs/storybook/tree/next/code/addons/links",
|
||||||
|
@ -20,7 +20,6 @@ const config: StorybookConfig = {
|
|||||||
'@storybook/addon-essentials',
|
'@storybook/addon-essentials',
|
||||||
'@storybook/addon-interactions',
|
'@storybook/addon-interactions',
|
||||||
'@storybook/addon-storysource',
|
'@storybook/addon-storysource',
|
||||||
'@storybook/addon-links',
|
|
||||||
'@storybook/addon-jest',
|
'@storybook/addon-jest',
|
||||||
'@storybook/addon-a11y',
|
'@storybook/addon-a11y',
|
||||||
],
|
],
|
||||||
|
@ -1,10 +1,6 @@
|
|||||||
const config = {
|
const config = {
|
||||||
stories: ['../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
|
stories: ['../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
|
||||||
addons: [
|
addons: ['@storybook/addon-essentials', '@storybook/addon-interactions'],
|
||||||
'@storybook/addon-links',
|
|
||||||
'@storybook/addon-essentials',
|
|
||||||
'@storybook/addon-interactions',
|
|
||||||
],
|
|
||||||
framework: {
|
framework: {
|
||||||
name: '@storybook/angular',
|
name: '@storybook/angular',
|
||||||
options: {},
|
options: {},
|
||||||
|
@ -228,11 +228,7 @@ export async function baseGenerator(
|
|||||||
})
|
})
|
||||||
: extraAddonPackages;
|
: extraAddonPackages;
|
||||||
|
|
||||||
extraAddonsToInstall.push(
|
extraAddonsToInstall.push('@storybook/addon-essentials', '@chromatic-com/storybook@^1');
|
||||||
'@storybook/addon-links',
|
|
||||||
'@storybook/addon-essentials',
|
|
||||||
'@chromatic-com/storybook@^1'
|
|
||||||
);
|
|
||||||
|
|
||||||
// added to main.js
|
// added to main.js
|
||||||
const addons = [
|
const addons = [
|
||||||
|
@ -81,7 +81,6 @@ describe('configureMain', () => {
|
|||||||
language: SupportedLanguage.JAVASCRIPT,
|
language: SupportedLanguage.JAVASCRIPT,
|
||||||
prefixes: [],
|
prefixes: [],
|
||||||
addons: [
|
addons: [
|
||||||
"%%path.dirname(require.resolve(path.join('@storybook/addon-links', 'package.json')))%%",
|
|
||||||
"%%path.dirname(require.resolve(path.join('@storybook/addon-essentials', 'package.json')))%%",
|
"%%path.dirname(require.resolve(path.join('@storybook/addon-essentials', 'package.json')))%%",
|
||||||
"%%path.dirname(require.resolve(path.join('@storybook/preset-create-react-app', 'package.json')))%%",
|
"%%path.dirname(require.resolve(path.join('@storybook/preset-create-react-app', 'package.json')))%%",
|
||||||
"%%path.dirname(require.resolve(path.join('@storybook/addon-interactions', 'package.json')))%%",
|
"%%path.dirname(require.resolve(path.join('@storybook/addon-interactions', 'package.json')))%%",
|
||||||
@ -103,7 +102,6 @@ describe('configureMain', () => {
|
|||||||
const config = {
|
const config = {
|
||||||
stories: ['../stories/**/*.mdx', '../stories/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
|
stories: ['../stories/**/*.mdx', '../stories/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
|
||||||
addons: [
|
addons: [
|
||||||
path.dirname(require.resolve(path.join('@storybook/addon-links', 'package.json'))),
|
|
||||||
path.dirname(require.resolve(path.join('@storybook/addon-essentials', 'package.json'))),
|
path.dirname(require.resolve(path.join('@storybook/addon-essentials', 'package.json'))),
|
||||||
path.dirname(require.resolve(path.join('@storybook/preset-create-react-app', 'package.json'))),
|
path.dirname(require.resolve(path.join('@storybook/preset-create-react-app', 'package.json'))),
|
||||||
path.dirname(require.resolve(path.join('@storybook/addon-interactions', 'package.json'))),
|
path.dirname(require.resolve(path.join('@storybook/addon-interactions', 'package.json'))),
|
||||||
|
@ -5458,6 +5458,7 @@ __metadata:
|
|||||||
"@storybook/addon-controls": "workspace:*"
|
"@storybook/addon-controls": "workspace:*"
|
||||||
"@storybook/addon-docs": "workspace:*"
|
"@storybook/addon-docs": "workspace:*"
|
||||||
"@storybook/addon-highlight": "workspace:*"
|
"@storybook/addon-highlight": "workspace:*"
|
||||||
|
"@storybook/addon-links": "workspace:*"
|
||||||
"@storybook/addon-measure": "workspace:*"
|
"@storybook/addon-measure": "workspace:*"
|
||||||
"@storybook/addon-outline": "workspace:*"
|
"@storybook/addon-outline": "workspace:*"
|
||||||
"@storybook/addon-toolbars": "workspace:*"
|
"@storybook/addon-toolbars": "workspace:*"
|
||||||
|
@ -3,12 +3,7 @@ export default {
|
|||||||
// Replace your-framework with the framework you are using (e.g., react-webpack5, vue3-vite)
|
// Replace your-framework with the framework you are using (e.g., react-webpack5, vue3-vite)
|
||||||
framework: '@storybook/your-framework',
|
framework: '@storybook/your-framework',
|
||||||
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
|
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
|
||||||
addons: [
|
addons: ['@storybook/addon-essentials', '@storybook/addon-interactions', '@storybook/addon-a11y'],
|
||||||
'@storybook/addon-links',
|
|
||||||
'@storybook/addon-essentials',
|
|
||||||
'@storybook/addon-interactions',
|
|
||||||
'@storybook/addon-a11y',
|
|
||||||
],
|
|
||||||
build: {
|
build: {
|
||||||
test: {
|
test: {
|
||||||
disabledAddons: ['@storybook/addon-a11y'],
|
disabledAddons: ['@storybook/addon-a11y'],
|
||||||
@ -24,12 +19,7 @@ import type { StorybookConfig } from '@storybook/your-framework';
|
|||||||
const config: StorybookConfig = {
|
const config: StorybookConfig = {
|
||||||
framework: '@storybook/your-framework',
|
framework: '@storybook/your-framework',
|
||||||
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
|
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
|
||||||
addons: [
|
addons: ['@storybook/addon-essentials', '@storybook/addon-interactions', '@storybook/addon-a11y'],
|
||||||
'@storybook/addon-links',
|
|
||||||
'@storybook/addon-essentials',
|
|
||||||
'@storybook/addon-interactions',
|
|
||||||
'@storybook/addon-a11y',
|
|
||||||
],
|
|
||||||
build: {
|
build: {
|
||||||
test: {
|
test: {
|
||||||
disabledAddons: ['@storybook/addon-a11y'],
|
disabledAddons: ['@storybook/addon-a11y'],
|
||||||
@ -39,4 +29,3 @@ const config: StorybookConfig = {
|
|||||||
|
|
||||||
export default config;
|
export default config;
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -4,7 +4,6 @@ export default {
|
|||||||
framework: '@storybook/your-framework',
|
framework: '@storybook/your-framework',
|
||||||
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
|
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
|
||||||
addons: [
|
addons: [
|
||||||
'@storybook/addon-links',
|
|
||||||
'@storybook/addon-essentials',
|
'@storybook/addon-essentials',
|
||||||
'@storybook/addon-interactions',
|
'@storybook/addon-interactions',
|
||||||
'@storybook/addon-coverage',
|
'@storybook/addon-coverage',
|
||||||
@ -25,7 +24,6 @@ const config: StorybookConfig = {
|
|||||||
framework: '@storybook/your-framework',
|
framework: '@storybook/your-framework',
|
||||||
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
|
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
|
||||||
addons: [
|
addons: [
|
||||||
'@storybook/addon-links',
|
|
||||||
'@storybook/addon-essentials',
|
'@storybook/addon-essentials',
|
||||||
'@storybook/addon-interactions',
|
'@storybook/addon-interactions',
|
||||||
'@storybook/addon-coverage',
|
'@storybook/addon-coverage',
|
||||||
@ -39,4 +37,3 @@ const config: StorybookConfig = {
|
|||||||
|
|
||||||
export default config;
|
export default config;
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
```js filename=".storybook/main.js|ts" renderer="common" language="js"
|
```js filename=".storybook/main.js|ts" renderer="common" language="js"
|
||||||
export default {
|
export default {
|
||||||
stories: ['../src/**/*.mdx', '../stories/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
|
stories: ['../src/**/*.mdx', '../stories/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
|
||||||
addons: ['@storybook/addon-links', '@storybook/addon-essentials'],
|
addons: ['@storybook/addon-essentials'],
|
||||||
core: {
|
core: {
|
||||||
builder: '@storybook/builder-vite',
|
builder: '@storybook/builder-vite',
|
||||||
},
|
},
|
||||||
@ -18,4 +18,3 @@ export default {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
```js filename=".storybook/main.js|ts" renderer="common" language="js"
|
```js filename=".storybook/main.js|ts" renderer="common" language="js"
|
||||||
export default {
|
export default {
|
||||||
stories: ['../src/**/*.mdx', '../stories/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
|
stories: ['../src/**/*.mdx', '../stories/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
|
||||||
addons: ['@storybook/addon-links', '@storybook/addon-essentials'],
|
addons: ['@storybook/addon-essentials'],
|
||||||
core: {
|
core: {
|
||||||
builder: '@storybook/builder-vite',
|
builder: '@storybook/builder-vite',
|
||||||
},
|
},
|
||||||
@ -12,4 +12,3 @@ export default {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
```js filename=".storybook/main.js|ts" renderer="common" language="js"
|
```js filename=".storybook/main.js|ts" renderer="common" language="js"
|
||||||
export default {
|
export default {
|
||||||
stories: ['../src/**/*.mdx', '../stories/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
|
stories: ['../src/**/*.mdx', '../stories/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
|
||||||
addons: ['@storybook/addon-links', '@storybook/addon-essentials'],
|
addons: ['@storybook/addon-essentials'],
|
||||||
core: {
|
core: {
|
||||||
builder: '@storybook/builder-vite', // 👈 The builder enabled here.
|
builder: '@storybook/builder-vite', // 👈 The builder enabled here.
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -274,7 +274,6 @@ Storybook Environment Info:
|
|||||||
npmPackages:
|
npmPackages:
|
||||||
@storybook/addon-essentials: ^7.6.6 => 7.6.6
|
@storybook/addon-essentials: ^7.6.6 => 7.6.6
|
||||||
@storybook/addon-interactions: ^7.6.6 => 7.6.6
|
@storybook/addon-interactions: ^7.6.6 => 7.6.6
|
||||||
@storybook/addon-links: ^7.6.6 => 7.6.6
|
|
||||||
@storybook/addon-onboarding: ^1.0.10 => 1.0.10
|
@storybook/addon-onboarding: ^1.0.10 => 1.0.10
|
||||||
@storybook/blocks: ^7.6.6 => 7.6.6
|
@storybook/blocks: ^7.6.6 => 7.6.6
|
||||||
@storybook/preset-create-react-app: ^7.6.6 => 7.6.6
|
@storybook/preset-create-react-app: ^7.6.6 => 7.6.6
|
||||||
|
@ -127,9 +127,6 @@ Will generate the following output:
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"addons": {
|
"addons": {
|
||||||
"@storybook/addon-links": {
|
|
||||||
"version": "7.1.0"
|
|
||||||
},
|
|
||||||
"@storybook/addon-essentials": {
|
"@storybook/addon-essentials": {
|
||||||
"version": "7.1.0"
|
"version": "7.1.0"
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user