From aa803153e2161f4462d9d26ecd021fe0d2396cc5 Mon Sep 17 00:00:00 2001 From: Yamagishi Kazutoshi Date: Fri, 28 Jul 2017 05:30:27 +0900 Subject: [PATCH] Remove Storybook (#4397) --- .dockerignore | 1 - .nanoignore | 1 - .slugignore | 1 - package.json | 5 +- storybook/config.js | 15 - storybook/initial_state.js | 24 - .../stories/autosuggest_textarea.story.js | 18 - storybook/stories/button.story.js | 18 - storybook/stories/character_counter.story.js | 21 - storybook/stories/loading_indicator.story.js | 12 - storybook/stories/onboarding_modal.story.js | 24 - storybook/storybook.scss | 3 - storybook/webpack.config.js | 21 - yarn.lock | 893 ++---------------- 14 files changed, 65 insertions(+), 992 deletions(-) delete mode 100644 storybook/config.js delete mode 100644 storybook/initial_state.js delete mode 100644 storybook/stories/autosuggest_textarea.story.js delete mode 100644 storybook/stories/button.story.js delete mode 100644 storybook/stories/character_counter.story.js delete mode 100644 storybook/stories/loading_indicator.story.js delete mode 100644 storybook/stories/onboarding_modal.story.js delete mode 100644 storybook/storybook.scss delete mode 100644 storybook/webpack.config.js diff --git a/.dockerignore b/.dockerignore index 2ddfa9b95..5cd3b179a 100644 --- a/.dockerignore +++ b/.dockerignore @@ -4,7 +4,6 @@ public/system public/assets public/packs node_modules -storybook neo4j vendor/bundle .DS_Store diff --git a/.nanoignore b/.nanoignore index f02c0a68a..80e939703 100644 --- a/.nanoignore +++ b/.nanoignore @@ -14,7 +14,6 @@ node_modules/ public/assets/ public/system/ spec/ -storybook/ tmp/ .vagrant/ vendor/bundle/ diff --git a/.slugignore b/.slugignore index b0141b0e2..5470f6e3f 100644 --- a/.slugignore +++ b/.slugignore @@ -2,4 +2,3 @@ node_modules/ .cache/ docs/ spec/ -storybook/ diff --git a/package.json b/package.json index 9afb51285..34198c35b 100644 --- a/package.json +++ b/package.json @@ -7,9 +7,8 @@ "build:production": "cross-env RAILS_ENV=production ./bin/webpack", "manage:translations": "node ./config/webpack/translationRunner.js", "start": "node ./streaming/index.js", - "storybook": "cross-env NODE_ENV=test start-storybook -s ./public -p 9001 -c storybook", "test": "npm run test:lint && npm run test:mocha", - "test:lint": "eslint -c .eslintrc.yml --ext=js app/javascript/ config/webpack/ spec/javascript/ storybook/ streaming/", + "test:lint": "eslint -c .eslintrc.yml --ext=js app/javascript/ config/webpack/ spec/javascript/ streaming/", "test:mocha": "cross-env NODE_ENV=test mocha --require ./spec/javascript/setup.js --compilers js:babel-register ./spec/javascript/components/*.test.js", "postinstall": "npm rebuild node-sass" }, @@ -120,8 +119,6 @@ "websocket.js": "^0.1.12" }, "devDependencies": { - "@storybook/addon-actions": "^3.1.8", - "@storybook/react": "^3.1.8", "babel-eslint": "^7.2.3", "chai": "^4.1.0", "chai-enzyme": "^0.8.0", diff --git a/storybook/config.js b/storybook/config.js deleted file mode 100644 index 87479560f..000000000 --- a/storybook/config.js +++ /dev/null @@ -1,15 +0,0 @@ -import { configure } from '@storybook/react'; -import { addLocaleData } from 'react-intl'; -import en from 'react-intl/locale-data/en'; -import '../app/javascript/styles/application.scss'; -import './storybook.scss'; - -addLocaleData(en); - -let req = require.context('./stories/', true, /.story.js$/); - -function loadStories () { - req.keys().forEach((filename) => req(filename)); -} - -configure(loadStories, module); diff --git a/storybook/initial_state.js b/storybook/initial_state.js deleted file mode 100644 index 3872586f6..000000000 --- a/storybook/initial_state.js +++ /dev/null @@ -1,24 +0,0 @@ -export default { - meta: { - admin: 1, - domain: 'example.com', - me: 2, - }, - accounts: { - 1: { - acct: 'admin', - avatar: '/avatars/original/missing.png', - id: 1, - url: 'https://example.com/@admin', - }, - 2: { - acct: 'user', - avatar: '/avatars/original/missing.png', - id: 1, - url: 'https://example.com/@user', - }, - }, - media_attachments: { - accept_content_types: [], - }, -}; diff --git a/storybook/stories/autosuggest_textarea.story.js b/storybook/stories/autosuggest_textarea.story.js deleted file mode 100644 index 65dfe965c..000000000 --- a/storybook/stories/autosuggest_textarea.story.js +++ /dev/null @@ -1,18 +0,0 @@ -import React from 'react'; -import { List } from 'immutable'; -import { storiesOf } from '@storybook/react'; -import { action } from '@storybook/addon-actions'; -import AutosuggestTextarea from 'mastodon/components/autosuggest_textarea'; - -const props = { - onChange: action('changed'), - onPaste: action('pasted'), - onSuggestionSelected: action('suggestionsSelected'), - onSuggestionsClearRequested: action('suggestionsClearRequested'), - onSuggestionsFetchRequested: action('suggestionsFetchRequested'), - suggestions: List([]), -}; - -storiesOf('AutosuggestTextarea', module) - .add('default state', () => ) - .add('with text', () => ); diff --git a/storybook/stories/button.story.js b/storybook/stories/button.story.js deleted file mode 100644 index 1971451e8..000000000 --- a/storybook/stories/button.story.js +++ /dev/null @@ -1,18 +0,0 @@ -import React from 'react'; -import { storiesOf } from '@storybook/react'; -import { action } from '@storybook/addon-actions'; -import Button from 'mastodon/components/button'; - -storiesOf('Button', module) - .add('default state', () => ( -