Skip to content

Commit

Permalink
chore: Upgrade storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
cliedeman committed May 30, 2019
1 parent c02ff15 commit 50f282c
Show file tree
Hide file tree
Showing 5 changed files with 1,153 additions and 878 deletions.
10 changes: 6 additions & 4 deletions .storybook/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
const path = require('path');

module.exports = (baseConfig, env, config) => {
// Extend defaultConfig as you need.

module.exports = ({ config }) => {
config.module.rules.push({
test: /\.(ts|tsx)$/,
loader: require.resolve('ts-loader'),
use: [
{
loader: require.resolve('ts-loader'),
},
],
});
config.resolve.extensions.push('.ts', '.tsx');
return config;
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@
"devDependencies": {
"@babel/core": "^7.1.6",
"@material-ui/core": "^4.0.1",
"@storybook/addon-actions": "^4.0.9",
"@storybook/addon-links": "^4.0.9",
"@storybook/addons": "^4.0.9",
"@storybook/react": "^4.0.9",
"@storybook/addon-actions": "^5.0.11",
"@storybook/addon-links": "^5.0.11",
"@storybook/addons": "^5.0.11",
"@storybook/react": "^5.0.11",
"@types/jest": "^23.3.10",
"@types/prop-types": "^15.5.4",
"@types/react-test-renderer": "^16.0.3",
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@
"stripInternal": true,
"target": "es5"
},
"include": ["src", "./typings.d.ts", "types", "test", "stories"],
"include": ["src", "types", "test", "stories"],
"exclude": ["node_modules", "dist"]
}
17 changes: 0 additions & 17 deletions types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,3 @@
declare module '@storybook/react-native' {
export function storiesOf(name: string, module: any): any;
}

declare module '@storybook/addon-knobs/react' {
export function text(name: string, value: string): string;
export function boolean(name: string, value: boolean): boolean;
export function select(name: string, options: any, value: any): any;
export function number(name: string, value: number, opts?: any): number;
export function date(name: string, value?: Date): Date;
export function withKnobs(): any;
}

declare module '@storybook/addon-storyshots' {
export default function initStoryshots(): any;
}

declare module '@storybook/addon-actions' {
export function action(name: string): (...args: any[]) => any;
}
Loading

0 comments on commit 50f282c

Please sign in to comment.