mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-04 12:31:06 +08:00
MIGRATE ember-example to triconfig
This commit is contained in:
parent
662d0a5676
commit
6ffad2a6d3
@ -1,9 +0,0 @@
|
||||
import '@storybook/addon-a11y/register';
|
||||
import '@storybook/addon-storysource/register';
|
||||
import '@storybook/addon-actions/register';
|
||||
import '@storybook/addon-links/register';
|
||||
import '@storybook/addon-notes/register';
|
||||
import '@storybook/addon-knobs/register';
|
||||
import '@storybook/addon-viewport/register';
|
||||
import '@storybook/addon-options/register';
|
||||
import '@storybook/addon-backgrounds/register';
|
@ -1,11 +0,0 @@
|
||||
import { configure, addParameters, addDecorator } from '@storybook/ember';
|
||||
import { withA11y } from '@storybook/addon-a11y';
|
||||
|
||||
addDecorator(withA11y);
|
||||
addParameters({
|
||||
options: {
|
||||
showRoots: true,
|
||||
},
|
||||
});
|
||||
|
||||
configure(require.context('../stories', true, /\.stories\.js$/), module);
|
25
examples/ember-cli/.storybook/main.js
Normal file
25
examples/ember-cli/.storybook/main.js
Normal file
@ -0,0 +1,25 @@
|
||||
const path = require('path');
|
||||
|
||||
module.exports = {
|
||||
addons: [
|
||||
'@storybook/addon-a11y/register',
|
||||
'@storybook/addon-storysource/register',
|
||||
'@storybook/addon-actions/register',
|
||||
'@storybook/addon-links/register',
|
||||
'@storybook/addon-notes/register',
|
||||
'@storybook/addon-knobs/register',
|
||||
'@storybook/addon-viewport/register',
|
||||
'@storybook/addon-options/register',
|
||||
'@storybook/addon-backgrounds/register',
|
||||
],
|
||||
stories: ['../stories/**/*.stories.js'],
|
||||
webpack: async config => {
|
||||
config.module.rules.push({
|
||||
test: [/\.stories\.js$/, /index\.js$/],
|
||||
loaders: [require.resolve('@storybook/source-loader')],
|
||||
include: [path.resolve(__dirname, '../')],
|
||||
enforce: 'pre',
|
||||
});
|
||||
return config;
|
||||
},
|
||||
};
|
9
examples/ember-cli/.storybook/preview.js
Normal file
9
examples/ember-cli/.storybook/preview.js
Normal file
@ -0,0 +1,9 @@
|
||||
import { addParameters, addDecorator } from '@storybook/ember';
|
||||
import { withA11y } from '@storybook/addon-a11y';
|
||||
|
||||
addDecorator(withA11y);
|
||||
addParameters({
|
||||
options: {
|
||||
showRoots: true,
|
||||
},
|
||||
});
|
@ -1,11 +0,0 @@
|
||||
const path = require('path');
|
||||
|
||||
module.exports = async ({ config }) => {
|
||||
config.module.rules.push({
|
||||
test: [/\.stories\.js$/, /index\.js$/],
|
||||
loaders: [require.resolve('@storybook/source-loader')],
|
||||
include: [path.resolve(__dirname, '../')],
|
||||
enforce: 'pre',
|
||||
});
|
||||
return config;
|
||||
};
|
@ -1 +1 @@
|
||||
export const version = '5.3.0-beta.3';
|
||||
export const version = '5.3.0-beta.6';
|
||||
|
Loading…
x
Reference in New Issue
Block a user