From e27a9c08f100e9168b1c8a6ff90fb1d0e5c00302 Mon Sep 17 00:00:00 2001 From: Tom Coleman Date: Tue, 22 Aug 2017 15:39:46 +1000 Subject: [PATCH] Remove the `test-cra` example app. No longer needed, we can now test `cra-kitchen-sink` --- .circleci/config.yml | 23 ------------ CONTRIBUTING.md | 4 +-- examples/test-cra/.gitignore | 18 ---------- examples/test-cra/.storybook/addons.js | 3 -- examples/test-cra/.storybook/config.js | 10 ------ examples/test-cra/README.md | 1 - examples/test-cra/package.json | 33 ------------------ examples/test-cra/public/favicon.ico | Bin 24838 -> 0 bytes examples/test-cra/public/index.html | 31 ---------------- examples/test-cra/src/App.css | 24 ------------- examples/test-cra/src/App.js | 16 --------- examples/test-cra/src/App.test.js | 10 ------ examples/test-cra/src/index.css | 5 --- examples/test-cra/src/index.js | 8 ----- examples/test-cra/src/logo.svg | 7 ---- .../test-cra/src/stories/ComponentWithRef.js | 20 ----------- examples/test-cra/src/stories/index.js | 16 --------- jest.config.js | 1 - lerna.json | 2 -- package.json | 1 - packs/README.md | 2 +- 21 files changed, 3 insertions(+), 232 deletions(-) delete mode 100644 examples/test-cra/.gitignore delete mode 100644 examples/test-cra/.storybook/addons.js delete mode 100644 examples/test-cra/.storybook/config.js delete mode 100644 examples/test-cra/README.md delete mode 100644 examples/test-cra/package.json delete mode 100644 examples/test-cra/public/favicon.ico delete mode 100644 examples/test-cra/public/index.html delete mode 100644 examples/test-cra/src/App.css delete mode 100644 examples/test-cra/src/App.js delete mode 100644 examples/test-cra/src/App.test.js delete mode 100644 examples/test-cra/src/index.css delete mode 100644 examples/test-cra/src/index.js delete mode 100644 examples/test-cra/src/logo.svg delete mode 100644 examples/test-cra/src/stories/ComponentWithRef.js delete mode 100644 examples/test-cra/src/stories/index.js diff --git a/.circleci/config.yml b/.circleci/config.yml index 87677e8c4c3..257f599f738 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -72,28 +72,6 @@ jobs: name: "Build vue kitchen-sink" command: | cd examples/vue-kitchen-sink && npm run build-storybook - example-test-cra: - <<: *defaults - steps: - - checkout - - restore_cache: - keys: - - root-dependencies-{{ checksum "package.json" }} - - root-dependencies- - - run: - name: "Install root dependencies" - command: | - yarn install - - run: - name: "Bootstrapping" - command: | - npm run bootstrap - npm run build-packs - npm run bootstrap:test-cra - - run: - name: "Build test-cra" - command: | - cd examples/test-cra && npm run build-storybook example-react-native: <<: *defaults steps: @@ -189,7 +167,6 @@ workflows: - validate - build - example-kitchen-sinks - - example-test-cra - example-react-native - docs - lint diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 06cdc399d36..578f6dd5f32 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -41,7 +41,7 @@ To test your project against the current latest version of storybook, you can cl The best way to help figure out an issue you are having is to produce a minimal reproduction against the `master` branch. -A good way to do that is using the example `test-cra` app embedded in this repository: +A good way to do that is using the example `cra-kitchen-sink` app embedded in this repository: ```bash # Download and build this repository: @@ -50,7 +50,7 @@ cd storybook npm install npm run bootstrap -cd examples/test-cra +cd examples/cra-kitchen-sink # make changes to try and reproduce the problem, such as adding components + stories npm start storybook diff --git a/examples/test-cra/.gitignore b/examples/test-cra/.gitignore deleted file mode 100644 index 927d17bb9c5..00000000000 --- a/examples/test-cra/.gitignore +++ /dev/null @@ -1,18 +0,0 @@ -# See https://help.github.com/ignore-files/ for more about ignoring files. - -# dependencies -/node_modules - -# testing -/coverage - -# production -/build - -# misc -.DS_Store -.env -npm-debug.log* -yarn-debug.log* -yarn-error.log* - diff --git a/examples/test-cra/.storybook/addons.js b/examples/test-cra/.storybook/addons.js deleted file mode 100644 index f66454f6038..00000000000 --- a/examples/test-cra/.storybook/addons.js +++ /dev/null @@ -1,3 +0,0 @@ -import '@storybook/addon-actions/register'; -import '@storybook/addon-options/register'; -import '@storybook/addon-links/register'; diff --git a/examples/test-cra/.storybook/config.js b/examples/test-cra/.storybook/config.js deleted file mode 100644 index 66d31c26adc..00000000000 --- a/examples/test-cra/.storybook/config.js +++ /dev/null @@ -1,10 +0,0 @@ -import { configure } from '@storybook/react'; -import { setOptions } from '@storybook/addon-options'; - -setOptions({ sidebarAnimations: false, }), - -function loadStories() { - require('../src/stories'); -} - -configure(loadStories, module); diff --git a/examples/test-cra/README.md b/examples/test-cra/README.md deleted file mode 100644 index 8b137891791..00000000000 --- a/examples/test-cra/README.md +++ /dev/null @@ -1 +0,0 @@ - diff --git a/examples/test-cra/package.json b/examples/test-cra/package.json deleted file mode 100644 index 146660f82de..00000000000 --- a/examples/test-cra/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "test-cra", - "version": "1.0.0", - "scripts": { - "build": "react-scripts build", - "build-storybook": "build-storybook -s public", - "eject": "react-scripts eject", - "start": "react-scripts start", - "storybook": "start-storybook -p 9009 -s public", - "pretest": "npm install", - "test": "react-scripts test --env=jsdom" - }, - "dependencies": { - "global": "^4.3.2", - "prop-types": "^15.5.10", - "react": "^15.6.1", - "react-dom": "^15.6.1" - }, - "devDependencies": { - "@storybook/addon-actions": "file:../../packs/storybook-addon-actions.tgz", - "@storybook/addon-links": "file:../../packs/storybook-addon-links.tgz", - "@storybook/addon-options": "file:../../packs/storybook-addon-options.tgz", - "@storybook/addons": "file:../../packs/storybook-addons.tgz", - "@storybook/channel-postmessage": "file:../../packs/storybook-channel-postmessage.tgz", - "@storybook/channels": "file:../../packs/storybook-channels.tgz", - "@storybook/components": "file:../../packs/storybook-components.tgz", - "@storybook/react": "file:../../packs/storybook-react.tgz", - "@storybook/ui": "file:../../packs/storybook-ui.tgz", - "react-scripts": "1.0.2", - "react-test-renderer": "^15.4.2" - }, - "private": true -} diff --git a/examples/test-cra/public/favicon.ico b/examples/test-cra/public/favicon.ico deleted file mode 100644 index 5c125de5d897c1ff5692a656485b3216123dcd89..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 24838 zcmeI4X^>UL6@VY56)S&I{`6Nu0RscWCdj@GJHx(%?6_-;yKy1n;EEf9f}pr1CW5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MNFHTNN<)40Rzg#`pABKF18@l}5A>RL`?Ri;Z zC8ExD$)im1@R{N7(wIog8$Yn(6%q$yd9(zKe};OnH%;mWBs7)>ls~T3Wi6!Xqw6+dpJLVS1P| z9qV%io-nE*rYcPxiS31>U_>mbPTXxkC*!?*zefr#2vF|qr8{|4|u^7-pD|f z&OPc->UKu)=iHgIpysp;Lsbyj}GJWoBkufOA={CRTUjr%af zc5pUH9{pg?M5%+)oN`q9yBbBt@+3xHV)qGm8b)Cp-w7~CwEhtBUk0rbjrqM zTb|tQ3-5-pw^cul`T+X&s?O;?V(FD!(Q9Qg@(LTCNz{0-vBM^SX5lti3|GpxFn4;Ax6pGc~t)R!Bo${lYH(* z!F&5X*?S&}YoDCyzwv1H+XI(+rL`;RN9}iLxlfr-r&vGG8OQa@=>+a)+Ij)sd_{wu z1Am(+3-RFr4&N8N6+hqo19S#;SA1-hG>07p3}&*j4CR+rqdV)^6n; z_vFr!(a%-=#=kb{pYmNL@6|DWkw~%E2V2jYl*e1}c{e$fib?(O+hs}eoBLRo&9(;J}YV}0Mi;LZAe{U$(s= zT<-IaV$Z+q-P!~3{HxN>Kbw30jXzM&I(S<6Ksx^}HvU2Vntb!etSsm0>)j}Me^+L5{2yz--)?W`Q?az z!WLG4UNP}+#C+NKH+ZG-Q=E>IPp%LuKLx$$8NAOGr(#~P>!EA zDYlpXDR=xM?Xv5(-qp74Cw3LzBeASHSBY`OezkbOyjP!G%WSymju_C$VBl--z - - - - - - - React App - - -
- - - diff --git a/examples/test-cra/src/App.css b/examples/test-cra/src/App.css deleted file mode 100644 index 15adfdc710c..00000000000 --- a/examples/test-cra/src/App.css +++ /dev/null @@ -1,24 +0,0 @@ -.App { - text-align: center; -} - -.App-logo { - animation: App-logo-spin infinite 20s linear; - height: 80px; -} - -.App-header { - background-color: #222; - height: 150px; - padding: 20px; - color: white; -} - -.App-intro { - font-size: large; -} - -@keyframes App-logo-spin { - from { transform: rotate(0deg); } - to { transform: rotate(360deg); } -} diff --git a/examples/test-cra/src/App.js b/examples/test-cra/src/App.js deleted file mode 100644 index 74635391da6..00000000000 --- a/examples/test-cra/src/App.js +++ /dev/null @@ -1,16 +0,0 @@ -import React from 'react'; -import logo from './logo.svg'; -import './App.css'; - -const App = () => -
-
- logo -

Welcome to React

-
-

- To get started, edit src/App.js and save to reload. -

-
; - -export default App; diff --git a/examples/test-cra/src/App.test.js b/examples/test-cra/src/App.test.js deleted file mode 100644 index 7c29c048d76..00000000000 --- a/examples/test-cra/src/App.test.js +++ /dev/null @@ -1,10 +0,0 @@ -import React from 'react'; -import ReactDOM from 'react-dom'; -import { document } from 'global'; - -import App from './App'; - -it('renders without crashing', () => { - const div = document.createElement('div'); - ReactDOM.render(, div); -}); diff --git a/examples/test-cra/src/index.css b/examples/test-cra/src/index.css deleted file mode 100644 index b4cc7250b98..00000000000 --- a/examples/test-cra/src/index.css +++ /dev/null @@ -1,5 +0,0 @@ -body { - margin: 0; - padding: 0; - font-family: sans-serif; -} diff --git a/examples/test-cra/src/index.js b/examples/test-cra/src/index.js deleted file mode 100644 index 0d9b8750cfa..00000000000 --- a/examples/test-cra/src/index.js +++ /dev/null @@ -1,8 +0,0 @@ -import React from 'react'; -import ReactDOM from 'react-dom'; -import { document } from 'global'; - -import App from './App'; -import './index.css'; - -ReactDOM.render(, document.getElementById('root')); diff --git a/examples/test-cra/src/logo.svg b/examples/test-cra/src/logo.svg deleted file mode 100644 index 6b60c1042f5..00000000000 --- a/examples/test-cra/src/logo.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/examples/test-cra/src/stories/ComponentWithRef.js b/examples/test-cra/src/stories/ComponentWithRef.js deleted file mode 100644 index a8bf2c6d869..00000000000 --- a/examples/test-cra/src/stories/ComponentWithRef.js +++ /dev/null @@ -1,20 +0,0 @@ -import React, { Component } from 'react'; - -class ComponentWithRef extends Component { - componentDidMount() { - // Read the scroll width off the DOM element - this.scrollWidth = this.ref.scrollWidth; - } - scrollWidth = 0; - render() { - return ( -
{ - this.ref = r; - }} - /> - ); - } -} - -export default ComponentWithRef; diff --git a/examples/test-cra/src/stories/index.js b/examples/test-cra/src/stories/index.js deleted file mode 100644 index d86c08937a1..00000000000 --- a/examples/test-cra/src/stories/index.js +++ /dev/null @@ -1,16 +0,0 @@ -import React from 'react'; - -import { storiesOf } from '@storybook/react'; -import { action } from '@storybook/addon-actions'; -import { linkTo } from '@storybook/addon-links'; - -import { Button, Welcome } from '@storybook/react/demo'; -import ComponentWithRef from './ComponentWithRef'; - -storiesOf('Welcome', module).add('to Storybook', () => ); - -storiesOf('Button', module) - .add('with text', () => ) - .add('with some emoji', () => ); - -storiesOf('ComponentWithRef', module).add('basic', () => ); diff --git a/jest.config.js b/jest.config.js index b97bf6bd126..fab43ecfcce 100644 --- a/jest.config.js +++ b/jest.config.js @@ -11,7 +11,6 @@ module.exports = { '/app', '/lib', '/examples/cra-kitchen-sink', - '/examples/test-cra', ], testPathIgnorePatterns: ['/node_modules/'], collectCoverage: false, diff --git a/lerna.json b/lerna.json index 9e94167a38b..5f9cc8abe70 100644 --- a/lerna.json +++ b/lerna.json @@ -4,7 +4,6 @@ "bootstrap": { "ignore": [ "crna-kitchen-sink", - "test-cra", "react-native-vanilla" ] }, @@ -12,7 +11,6 @@ "ignore": [ "cra-kitchen-sink", "crna-kitchen-sink", - "test-cra", "react-native-vanilla", "vue-example" ] diff --git a/package.json b/package.json index 7ddedcb4f36..915a4c3bf9d 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,6 @@ "bootstrap:docs": "cd docs && yarn install", "bootstrap:react-native-vanilla": "lerna exec --scope react-native-vanilla -- npm install", "bootstrap:crna-kitchen-sink": "lerna exec --scope crna-kitchen-sink -- npm install", - "bootstrap:test-cra": "lerna exec --scope test-cra -- npm install", "build-packs": "lerna exec --scope '@storybook/*' --parallel -- ../../scripts/build-pack.sh ../../packs", "start": "lerna run --stream --scope cra-kitchen-sink storybook", "changelog": "pr-log --sloppy", diff --git a/packs/README.md b/packs/README.md index bf283ac65a4..49703f9d3ad 100644 --- a/packs/README.md +++ b/packs/README.md @@ -2,4 +2,4 @@ This directory is filled with git packs of our packages when you run the `build-packs` command. -The purpose of this is to enable the `test-cra` app to use the packs as "local" installs without linking, and thus behave like a normal app would, yet still use our latest code. It's awkward for development but good to double check things, especially in CI. +The purpose of this is to enable the example apps to use the packs as "local" installs without linking, and thus behave like a normal app would, yet still use our latest code. It's awkward for development but good to double check things, especially in CI.