Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
joscha committed Apr 19, 2017
2 parents dd49bda + 53f5f01 commit 1f2dae8
Show file tree
Hide file tree
Showing 505 changed files with 19,835 additions and 4,681 deletions.
14 changes: 14 additions & 0 deletions .bettercodehub.yml
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
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dist
build
coverage
node_modules
27 changes: 0 additions & 27 deletions .eslintrc

This file was deleted.

28 changes: 28 additions & 0 deletions .eslintrc.js
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'],
},
}
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,12 @@ node_modules
.idea
npm-shrinkwrap.json
dist
.tern-port
*.DS_Store
.jest
junit.xml
coverage/
*.lerna_backup
build
packages/examples/automated-*
yarn.lock
20 changes: 20 additions & 0 deletions .jestrc
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"
]
}
2 changes: 0 additions & 2 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
docs
src
.babelrc
17 changes: 16 additions & 1 deletion .travis.yml
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
21 changes: 11 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
# Contributing to React Storybook

We welcome you help to make React Storybook better. This document will help to streamline the contributing process and save everyone's precious time.
Thanks for your interest in improving Storybook! We are a community-driven project and welcome contributions of all kinds: from discussion to documentation to bugfixes to feature improvements.

Please review this document to help to streamline the process and save everyone's precious time.

## Issues

No software is bug free. So, if you got an issue, follow these steps:

* Search the [issue list](https://github.com/storybooks/react-storybook/issues?utf8=%E2%9C%93&q=) for current and old issues.
* Search the [issue list](https://github.com/storybooks/storybook/issues?utf8=%E2%9C%93&q=) for current and old issues.
* If non of that is helping, create an issue with with following information:
* Clear title (make is shorter if possible).
* Describe the issue in clear language.
* Share error logs, screenshots and etc.
* To speed up the issue fixing process, send us a sample repo with the issue you faced:

### Reproductions

The best way to help figure out an issue you are having is to produce a minimal reproduction. A good way to do that is using Create React App:
Expand All @@ -37,7 +39,7 @@ git remote add origin https://github.com/<your-username>/<repo-name>
git push -u origin master
```

If you follow that process, you can then link to the github repository in the issue. See https://github.com/storybooks/react-storybook/issues/708#issuecomment-290589886 for an example.
If you follow that process, you can then link to the github repository in the issue. See https://github.com/storybooks/storybook/issues/708#issuecomment-290589886 for an example.

**NOTE**: If your issue involves a webpack config, create-react-app will prevent you from modifying the *app's* webpack config, however you can still modify storybook's to mirror your app's version of storybook. Alternatively, use `npm run eject` in the CRA app to get a modifiable webpack config.

Expand All @@ -46,8 +48,8 @@ If you follow that process, you can then link to the github repository in the is
We welcome your contributions. There are many ways you can help us. This is few of those ways:

* Fix typos and add more documentation.
* Try to fix some [bugs](https://github.com/storybooks/react-storybook/labels/bug).
* Work on [enhancements](https://github.com/storybooks/react-storybook/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement) and new [features](https://github.com/storybooks/react-storybook/issues?q=is%3Aissue+is%3Aopen+label%3Afeature).
* Try to fix some [bugs](https://github.com/storybooks/storybook/labels/bug).
* Work on [enhancements](https://github.com/storybooks/storybook/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement) and new [features](https://github.com/storybooks/storybook/issues?q=is%3Aissue+is%3Aopen+label%3Afeature).
* Add more tests (specially for the UI).

Before you submit a new PR, make you to run `npm test`. Do not submit a PR if tests are failing. If you need any help, create an issue and ask.
Expand All @@ -58,7 +60,7 @@ If you are looking for a way to help the project, triaging issues is a great pla

### Responding to issues

Issues that are tagged `question / support` or `needs reproduction` are great places to help. If you can answer a question, it will help the asker as well as anyone searching. If an issue needs reproduction, you may be able to guide the reporter toward one, or even reproduce it yourself using [this technique](https://github.com/storybooks/react-storybook/blob/master/CONTRIBUTING.md#reproductions).
Issues that are tagged `question / support` or `needs reproduction` are great places to help. If you can answer a question, it will help the asker as well as anyone searching. If an issue needs reproduction, you may be able to guide the reporter toward one, or even reproduce it yourself using [this technique](https://github.com/storybooks/storybook/blob/master/CONTRIBUTING.md#reproductions).

### Triaging issues

Expand All @@ -83,7 +85,7 @@ If an issue is a `bug`, and it doesn't have a clear reproduction that you have p

## Development Guide

> If you want to work on a UI feature, refer to the [Storybook UI](https://github.com/kadirahq/storybook-ui) project.
> If you want to work on a UI feature, refer to the [Storybook UI](https://github.com/storybooks/storybook/tree/master/storybook-ui) project.
This project written in ES2016+ syntax so, we need to transpile it before use.
So run the following command:
Expand Down Expand Up @@ -123,5 +125,4 @@ npm link @kadira/storybook

### Getting Changes

After you've done any change, you need to run the `npm run storybook` command everytime to see those changes.

After you've done any change, you need to run the `npm run storybook` command every time to see those changes.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016 Kadira Inc. <hello@kadira.io>
Copyright (c) 2016 Your Name. <name@emailprovider.io>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
48 changes: 33 additions & 15 deletions README.md
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)
1 change: 1 addition & 0 deletions __mocks__/fileMock.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = 'file-stub';
1 change: 1 addition & 0 deletions __mocks__/styleMock.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = {};
38 changes: 0 additions & 38 deletions dist/client/index.js

This file was deleted.

16 changes: 0 additions & 16 deletions dist/client/manager/index.js

This file was deleted.

Loading

0 comments on commit 1f2dae8

Please sign in to comment.