Upgrade storybook to v3 (#3558)
parent
e07b57852e
commit
b0fe58dc69
|
@ -111,7 +111,8 @@
|
||||||
"websocket.js": "^0.1.7"
|
"websocket.js": "^0.1.7"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@kadira/storybook": "^2.35.3",
|
"@storybook/addon-actions": "^3.0.0",
|
||||||
|
"@storybook/react": "^3.0.0",
|
||||||
"babel-eslint": "^7.2.3",
|
"babel-eslint": "^7.2.3",
|
||||||
"chai": "^4.0.1",
|
"chai": "^4.0.1",
|
||||||
"chai-enzyme": "^0.7.1",
|
"chai-enzyme": "^0.7.1",
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import { configure, setAddon } from '@kadira/storybook';
|
import { configure } from '@storybook/react';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { storiesOf, action } from '@kadira/storybook';
|
|
||||||
import { addLocaleData } from 'react-intl';
|
import { addLocaleData } from 'react-intl';
|
||||||
import en from 'react-intl/locale-data/en';
|
import en from 'react-intl/locale-data/en';
|
||||||
import '../app/javascript/styles/application.scss';
|
import '../app/javascript/styles/application.scss';
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { List } from 'immutable';
|
import { List } from 'immutable';
|
||||||
import { action, storiesOf } from '@kadira/storybook';
|
import { storiesOf } from '@storybook/react';
|
||||||
|
import { action } from '@storybook/addon-actions';
|
||||||
import AutosuggestTextarea from 'mastodon/components/autosuggest_textarea';
|
import AutosuggestTextarea from 'mastodon/components/autosuggest_textarea';
|
||||||
|
|
||||||
const props = {
|
const props = {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { action, storiesOf } from '@kadira/storybook';
|
import { storiesOf } from '@storybook/react';
|
||||||
|
import { action } from '@storybook/addon-actions';
|
||||||
import Button from 'mastodon/components/button';
|
import Button from 'mastodon/components/button';
|
||||||
|
|
||||||
storiesOf('Button', module)
|
storiesOf('Button', module)
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { storiesOf } from '@kadira/storybook';
|
import { storiesOf } from '@storybook/react';
|
||||||
|
import { action } from '@storybook/addon-actions';
|
||||||
import CharacterCounter from 'mastodon/features/compose/components/character_counter';
|
import CharacterCounter from 'mastodon/features/compose/components/character_counter';
|
||||||
|
|
||||||
storiesOf('CharacterCounter', module)
|
storiesOf('CharacterCounter', module)
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { IntlProvider } from 'react-intl';
|
import { IntlProvider } from 'react-intl';
|
||||||
import { storiesOf } from '@kadira/storybook';
|
import { storiesOf } from '@storybook/react';
|
||||||
|
import { action } from '@storybook/addon-actions';
|
||||||
import en from 'mastodon/locales/en.json';
|
import en from 'mastodon/locales/en.json';
|
||||||
import LoadingIndicator from 'mastodon/components/loading_indicator';
|
import LoadingIndicator from 'mastodon/components/loading_indicator';
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ const path = require('path');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
module: {
|
module: {
|
||||||
loaders: [
|
rules: [
|
||||||
{
|
{
|
||||||
test: /\.(jpg|jpeg|png|gif|svg|eot|ttf|woff|woff2)$/i,
|
test: /\.(jpg|jpeg|png|gif|svg|eot|ttf|woff|woff2)$/i,
|
||||||
loader: 'url-loader',
|
loader: 'url-loader',
|
||||||
|
@ -14,10 +14,8 @@ module.exports = {
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
modulesDirectories: [
|
alias: {
|
||||||
path.resolve(__dirname, '..', 'storybook'),
|
mastodon: path.resolve(__dirname, '..', 'app', 'javascript', 'mastodon'),
|
||||||
path.resolve(__dirname, '..', 'app', 'javascript'),
|
},
|
||||||
path.resolve(__dirname, '..', 'node_modules'),
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue