Skip to content

Commit

Permalink
chore: upgrade storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
urish committed Jan 20, 2020
1 parent 67f9043 commit 9cfb02b
Show file tree
Hide file tree
Showing 8 changed files with 4,833 additions and 1,502 deletions.
2 changes: 1 addition & 1 deletion .storybook/config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { configure } from '@storybook/polymer';
import { configure } from '@storybook/web-components';

// automatically import all files ending in *.stories.ts
const req = require.context('../src', true, /\.stories\.ts$/);
Expand Down
6,302 changes: 4,810 additions & 1,492 deletions package-lock.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@
],
"devDependencies": {
"@babel/core": "^7.7.5",
"@storybook/addon-actions": "^5.2.8",
"@storybook/addon-knobs": "^5.2.8",
"@storybook/polymer": "^5.2.8",
"@types/storybook__polymer": "^5.1.0",
"@storybook/addon-actions": "^5.3.7",
"@storybook/addon-knobs": "^5.3.7",
"@storybook/web-components": "^5.3.7",
"@typescript-eslint/eslint-plugin": "^2.10.0",
"@typescript-eslint/parser": "^2.10.0",
"awesome-typescript-loader": "^5.2.1",
Expand All @@ -26,7 +25,7 @@
"eslint-plugin-prettier": "^3.1.1",
"husky": "^3.1.0",
"lint-staged": "^9.5.0",
"polymer-webpack-loader": "^2.0.3",
"patch-package": "^6.2.0",
"prettier": "^1.19.1",
"rimraf": "^3.0.0",
"typescript": "^3.7.3"
Expand All @@ -38,6 +37,7 @@
"build": "rimraf dist && tsc --sourceMap false && tsc -m esnext --outDir dist/esm --sourceMap false",
"lint": "eslint src/**/*.ts",
"prepare": "npm run build",
"postinstall": "patch-package",
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook"
},
Expand Down
13 changes: 13 additions & 0 deletions patches/@storybook+web-components+5.3.7.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/node_modules/@storybook/web-components/dist/client/preview/types.d.ts b/node_modules/@storybook/web-components/dist/client/preview/types.d.ts
index 030d480..48a9e00 100644
--- a/node_modules/@storybook/web-components/dist/client/preview/types.d.ts
+++ b/node_modules/@storybook/web-components/dist/client/preview/types.d.ts
@@ -1,5 +1,7 @@
import { StoryFn } from '@storybook/addons';
-export declare type StoryFnHtmlReturnType = string | Node;
+import { TemplateResult, SVGTemplateResult } from 'lit-element';
+
+export declare type StoryFnHtmlReturnType = string | Node | TemplateResult | SVGTemplateResult;
export interface IStorybookStory {
name: string;
render: () => any;
2 changes: 1 addition & 1 deletion src/7segment-element.stories.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { withKnobs } from '@storybook/addon-knobs';
import { storiesOf } from '@storybook/polymer';
import { storiesOf } from '@storybook/web-components';
import { html } from 'lit-html';
import './7segment-element';
import { LitElement, customElement, property } from 'lit-element';
Expand Down
2 changes: 1 addition & 1 deletion src/led-element.stories.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { storiesOf } from '@storybook/polymer';
import { storiesOf } from '@storybook/web-components';
import { withKnobs, boolean, text, number } from '@storybook/addon-knobs';
import { html } from 'lit-html';
import './led-element';
Expand Down
2 changes: 1 addition & 1 deletion src/pushbutton-element.stories.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { storiesOf } from '@storybook/polymer';
import { storiesOf } from '@storybook/web-components';
import { action } from '@storybook/addon-actions';
import { html } from 'lit-html';
import './pushbutton-element';
Expand Down
2 changes: 1 addition & 1 deletion src/resistor-element.stories.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { storiesOf } from '@storybook/polymer';
import { storiesOf } from '@storybook/web-components';
import { html } from 'lit-html';
import { withKnobs, number } from '@storybook/addon-knobs';

Expand Down

0 comments on commit 9cfb02b

Please sign in to comment.