-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into patch-1
- Loading branch information
Showing
505 changed files
with
19,835 additions
and
4,681 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
component_depth: 2 | ||
languages: | ||
- javascript | ||
|
||
- name: javascript | ||
production: | ||
exclude: | ||
- .*\.test\.js | ||
- .*\/__test__\/.*\.js | ||
- .*\/__mock__\/.*\.js | ||
test: | ||
include: | ||
- .*\.test\.js | ||
- .*\/__test__\/.*\.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
dist | ||
build | ||
coverage | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
module.exports = { | ||
extends: [ | ||
'./node_modules/eslint-config-airbnb-base/rules/es6.js', | ||
], | ||
plugins: [ | ||
'prettier', | ||
], | ||
parser: 'babel-eslint', | ||
parserOptions: { | ||
sourceType: 'module', | ||
}, | ||
env: { | ||
es6: true, | ||
node: true, | ||
}, | ||
rules: { | ||
strict: 0, | ||
'prettier/prettier': ['warn', { | ||
printWidth: 100, | ||
tabWidth: 2, | ||
bracketSpacing: true, | ||
trailingComma: 'all', | ||
singleQuote: true, | ||
}], | ||
quotes: ['warn', 'single'], | ||
'arrow-parens': ['warn', 'as-needed'], | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"cacheDirectory": ".jest", | ||
"clearMocks": true, | ||
"moduleNameMapper": { | ||
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/__mocks__/fileMock.js", | ||
"\\.(css|scss)$": "<rootDir>/__mocks__/styleMock.js" | ||
}, | ||
"roots": ["packages"], | ||
"collectCoverage": false, | ||
"collectCoverageFrom": [ | ||
"packages/**/*.{js,jsx}", | ||
"!**/generators/**" | ||
], | ||
"coverageDirectory": "coverage", | ||
"testEnvironment": "jsdom", | ||
"setupTestFrameworkScriptFile": "./node_modules/jest-enzyme/lib/index.js", | ||
"snapshotSerializers": [ | ||
"enzyme-to-json/serializer" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
docs | ||
src | ||
.babelrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,18 @@ | ||
language: node_js | ||
cache: | ||
directories: | ||
- node_modules | ||
- .jest | ||
notifications: | ||
email: false | ||
node_js: | ||
- "5" | ||
- "node" | ||
before_install: ./scripts/travis/before_install.sh | ||
after_success: ./scripts/travis/after_success.sh | ||
script: | ||
- npm run lint | ||
- npm run test | ||
- npm run coverage | ||
- npm run test-examples | ||
git: | ||
depth: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,50 @@ | ||
# React Storybook [![Build Status](https://travis-ci.org/storybooks/react-storybook.svg?branch=master)](https://travis-ci.org/storybooks/react-storybook) [![npm version](https://badge.fury.io/js/%40kadira%2Fstorybook.svg)](https://badge.fury.io/js/%40kadira%2Fstorybook) [![Storybook Slack](https://storybooks-slackin.herokuapp.com/badge.svg)](https://storybooks-slackin.herokuapp.com/) | ||
# Storybook | ||
[![Greenkeeper badge](https://badges.greenkeeper.io/storybooks/storybook.svg)](https://greenkeeper.io/) | ||
[![Build Status](https://travis-ci.org/storybooks/storybook.svg?branch=master)](https://travis-ci.org/storybooks/storybook) | ||
[![CodeFactor](https://www.codefactor.io/repository/github/storybooks/storybook/badge)](https://www.codefactor.io/repository/github/storybooks/storybook) | ||
[![BCH compliance](https://bettercodehub.com/edge/badge/storybooks/storybook)](https://bettercodehub.com/results/storybooks/storybook) [![codecov](https://codecov.io/gh/storybooks/storybook/branch/master/graph/badge.svg)](https://codecov.io/gh/storybooks/storybook) | ||
[![Storybook Slack](https://storybooks-slackin.herokuapp.com/badge.svg)](https://storybooks-slackin.herokuapp.com/) | ||
|
||
React Storybook is a UI development environment for your React components. With it, you can visualize different states of your UI components and develop them interactively. | ||
Storybook is a development environment for React UI components. It allows you to browse a component library, view the different states of each component, and interactively develop and test components. | ||
|
||
![React Storybook Screenshot](docs/demo.gif) | ||
## Intro | ||
|
||
React Storybook runs outside of your app. So you can develop UI components in isolation without worrying about app specific dependencies and requirements. | ||
![React Storybook Screenshot](packages/react-storybook/docs/demo.gif) | ||
|
||
Storybook runs outside of your app. This allows you to develop UI components in isolation, which can improve component reuse, testability, and development speed. You can build quickly without having to worry about application-specific dependencies. | ||
|
||
Storybook comes with a lot of [addons](https://storybooks.js.org) for component design, documentation, testing, interactivity, and so on. Storybook's easy-to-use API makes it easy to configure and extend in various ways. It has even been extended to support React Native development for mobile. | ||
|
||
## Getting Started | ||
|
||
First install storybook: | ||
```js | ||
npm i -g getstorybook | ||
cd my-react-app | ||
getstorybook | ||
``` | ||
|
||
For more information visit: https://getstorybook.io | ||
|
||
--- | ||
Once it's installed, you can `npm run storybook` and it will run the development server on your local machine, and give you a URL to browse some sample stories. | ||
|
||
React Storybook also comes with a lot of [addons](https://getstorybook.io/docs/addons/introduction) and a great API to customize as you wish. You can also build a [static version](https://getstorybook.io/docs/basics/exporting-storybook) of your storybook and deploy it anywhere you want. | ||
For full documentation on using Storybook visit: https://storybooks.js.org | ||
|
||
Here are some featured storybooks that you can reference to see how Storybook works: | ||
## Main Projects | ||
- [react-storybook](packages/react-storybook) - Storybook for React components | ||
- [react-native-storybook](packages/react-native-storybook) - Storybook for React components | ||
- [storyshots](packages/storyshots) - Easy snapshot testing for storybook | ||
- [getstorybook](packages/getstorybook) - Streamlined installation for a variety of app types | ||
- [examples](packages/examples) - Code examples to illustrate different Storybook use cases | ||
|
||
* [Demo of React Dates](http://airbnb.io/react-dates/) - [source](https://github.com/airbnb/react-dates) | ||
* [Demo of React Native Web](http://necolas.github.io/react-native-web/storybook/) - [source](https://github.com/necolas/react-native-web) | ||
## Addons | ||
- [addon-actions](packages/addon-actions/) - Log actions as users interact with components in storybook | ||
- [addon-comments](packages/addon-comments/) - Comment on storybook stories | ||
- [addon-graphql](packages/addon-graphql/) - Query a GraphQL server within Storybook stories | ||
- [addon-info](packages/addon-info/) - Annotate stories with extra component usage information | ||
- [addon-knobs](packages/addon-knobs/) - Interactively edit component prop data in the Storybook UI | ||
- [addon-notes](packages/addon-notes/) - Annotate storybook stories with notes | ||
- [addon-options](packages/addon-options/) - Customize the storybook UI in code | ||
|
||
## Docs | ||
## Contributing | ||
|
||
* [Basics](https://getstorybook.io/docs/basics/introduction) | ||
* [Configurations](https://getstorybook.io/docs/configurations/default-config) | ||
* [Addons](https://getstorybook.io/docs/addons/introduction) | ||
We welcome contributions to Storybook! There are many ways to contribute to | ||
this project. [Get started here](CONTRIBUTING.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = 'file-stub'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = {}; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.