Skip to content

Commit

Permalink
CHANGE folder structure && CHANGE package-names
Browse files Browse the repository at this point in the history
  • Loading branch information
ndelangen committed May 14, 2017
1 parent 13f9c48 commit 6550c53
Show file tree
Hide file tree
Showing 425 changed files with 122 additions and 120 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Uncomment to register defaults
// import '@storybook/storybook/addons';
// import '@storybook/addons';

// Use the line below to register this addon
// import '@storybook/storybook-addon-hello/register';
// import '@storybook/addon-actions/register';
import '../register';
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions packages/addon-actions/README.md → addons/actions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Import the `action` function and use it to create actions handlers. When creatin
```js
import { storiesOf, action } from '@storybook/storybook'
// or import { action } from '@storybook/storybook-addon-actions'
// or import { action } from '@storybook/addon-actions'

storiesOf('Button', module)
.add('default view', () => (
Expand All @@ -31,7 +31,7 @@ If you wish to process action data before sending them over to the logger, you c
`decorateAction` takes an array of decorator functions. Each decorator function is passed an array of arguments, and should return a new arguments array to use. `decorateAction` returns a function that can be used like `action` but will log the modified arguments instead of the original arguments.

```js
import { action, decorateAction } from '@storybook/storybook-addon-actions'
import { action, decorateAction } from '@storybook/addon-actions'

const firstArgAction = decorateAction([
args => args.slice(0, 1)
Expand Down
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
"homepage": "https://github.com/storybooks/storybook/tree/master/packages/addon-actions",
"devDependencies": {
"@storybook/storybook": "*",
"@storybook/storybook-addons": "*",
"@storybook/storybook-ui": "*",
"@storybook/addons": "*",
"@storybook/ui": "*",
"react": "^15.5.4",
"react-dom": "^15.5.4",
"react-test-renderer": "^15.5.4",
Expand All @@ -36,7 +36,7 @@
"react-inspector": "^1.1.0"
},
"peerDependencies": {
"@storybook/storybook-addons": "*",
"@storybook/addons": "*",
"react": "*",
"react-dom": "*"
}
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import addons from '@storybook/storybook-addons';
import addons from '@storybook/addons';
import ActionLogger from './containers/ActionLogger';
import { ADDON_ID, PANEL_ID } from './';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import addons from '@storybook/storybook-addons';
import addons from '@storybook/addons';
import stringify from 'json-stringify-safe';
import { EVENT_ID } from './';

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Uncomment to register defaults
// import '@storybook/storybook/addons';
// import '@storybook/addons';

// Use the line below to register this addon
// import '@storybook/storybook-addon-comments/register';
import '@storybook/storybook-addon-actions/register';
// import '@storybook/addon-comments/register';
import '@storybook/addon-actions/register';
import '@storybook/storybook-database-cloud/register';
import { init } from '../src/manager';
init();
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ This Storybook addon allows you to add comments for your stories. This addon wor
First, install the addon

```shell
npm install -D @storybook/storybook-addon-comments
npm install -D @storybook/addon-comments
```

Add this line to your `addons.js` file (create this file inside your storybook config directory if needed).

```js
import '@storybook/storybook-addon-comments/register';
import '@storybook/addon-comments/register';
```
File renamed without changes
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,19 @@
"react-textarea-autosize": "^4.0.5"
},
"devDependencies": {
"@storybook/storybook": "*",
"@storybook/storybook-addons": "*",
"@storybook/react": "*",
"@storybook/addons": "*",
"@storybook/storybook-database-cloud": "*",
"@storybook/storybook-deployer": "*",
"@storybook/storybook-ui": "*",
"@storybook/ui": "*",
"git-url-parse": "^6.0.1",
"react": "^15.5.4",
"react-dom": "^15.5.4",
"react-test-renderer": "^15.5.4",
"shelljs": "^0.7.4"
},
"peerDependencies": {
"@storybook/storybook-addons": "*",
"@storybook/addons": "*",
"react": "*",
"react-dom": "*"
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import addons from '@storybook/storybook-addons';
import addons from '@storybook/addons';
import CommentsPanel from '../../components/CommentsPanel/';
import DataStore from './dataStore';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint import/prefer-default-export:0 */

import React from 'react';
import addons from '@storybook/storybook-addons';
import addons from '@storybook/addons';
import CommentsPanel from './containers/CommentsPanel';
import { ADDON_ID, PANEL_ID } from '../shared';

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@storybook/react-storybook-decorator-centered",
"name": "@storybook/decorator-centered",
"version": "1.1.2",
"description": "React Storybook decorator to center components",
"main": "build/index.js",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions packages/addon-graphql/README.md → addons/graphql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ The GraphiQL addon can be used to display the GraphiQL IDE with example queries.
First, install the addon

```shell
npm install -D @storybook/storybook-addon-graphql
npm install -D @storybook/addon-graphql
```

Import the `setupGraphiQL` function and use it to create the graphiql helper with a base url.

```js
import { storiesOf } from '@storybook/storybook'
import { setupGraphiQL } from '@storybook/storybook-addon-graphql'
import { setupGraphiQL } from '@storybook/addon-graphql'

// setup the graphiql helper which can be used with the add method later
const graphiql = setupGraphiQL({ url: 'http://localhost:3000/graphql' });
Expand All @@ -37,7 +37,7 @@ The `setupGraphiQL` function also accepts a fetcher parameter which can be used

```js
import { storiesOf } from '@storybook/storybook'
import { setupGraphiQL } from '@storybook/storybook-addon-graphql'
import { setupGraphiQL } from '@storybook/addon-graphql'

const fetcher = function (params) {
const options = {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"shelljs": "^0.7.3"
},
"peerDependencies": {
"@storybook/storybook-addons": "*",
"@storybook/addons": "*",
"react": "*"
},
"dependencies": {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
import '@storybook/storybook/addons';
import '@storybook/addons';
import 'react-storybook-addon-backgrounds/register';
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions addons/knobs/.storybook/addons.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import '../src/register';
import '@storybook/addons'
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 6 additions & 6 deletions packages/addon-knobs/README.md → addons/knobs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,24 @@ This is how Knobs look like:
First of all, you need to install knobs into your project as a dev dependency.

```js
npm i -D @storybook/storybook-addon-knobs
npm i -D @storybook/addon-knobs
```

Then, configure it as an addon by adding it to your `addons.js` file (located in the Storybook config directory).

```js
// To get our default addons (actions and links)
import '@storybook/storybook/addons';
import '@storybook/addons';
// To add the knobs addon
import '@storybook/storybook-addon-knobs/register'
import '@storybook/addon-knobs/register'
```

Now, write your stories with knobs.

```js
import React from 'react';
import { storiesOf } from '@storybook/storybook';
import { withKnobs, text, boolean, number } from '@storybook/storybook-addon-knobs';
import { withKnobs, text, boolean, number } from '@storybook/addon-knobs';

const stories = storiesOf('Storybook Knobs', module);

Expand Down Expand Up @@ -71,11 +71,11 @@ You can see your Knobs in a Storybook panel as shown below.

## Available Knobs

These are the knobs available for you to use. You can import these Knobs from the `@storybook/storybook-addon-knobs` module.
These are the knobs available for you to use. You can import these Knobs from the `@storybook/addon-knobs` module.
Here's how to import the **text** Knob.

```js
import { text } from '@storybook/storybook-addon-knobs';
import { text } from '@storybook/addon-knobs';
```

Just like that, you can import any other following Knobs:
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"typescript-definition-tester": "^0.0.5"
},
"peerDependencies": {
"@storybook/storybook-addons": "*",
"@storybook/addons": "*",
"react": "*",
"react-dom": "*"
},
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import addons from '@storybook/storybook-addons';
import addons from '@storybook/addons';
import KnobManager from './KnobManager';

const manager = new KnobManager();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import addons from '@storybook/storybook-addons';
import addons from '@storybook/addons';
import Panel from './components/Panel';

addons.register('storybooks/storybook-addon-knobs', api => {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions packages/addon-notes/README.md → addons/notes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ This [Storybook](https://getstorybook.io) addon allows you to write notes for yo
**note: addons require @storybook/storybook 2.x or greater*

```sh
npm i --save-dev @storybook/storybook-addon-notes
npm i --save-dev @storybook/addon-notes
```

Then create a file called `addons.js` in your storybook config.

Add following content to it:

```js
import '@storybook/storybook/addons';
import '@storybook/storybook-addon-notes/register';
import '@storybook/addons';
import '@storybook/addon-notes/register';
```

Then write your stories like this:
Expand All @@ -26,7 +26,7 @@ Then write your stories like this:
import React from 'react';
import { storiesOf, action } from '@storybook/storybook';
import Button from './Button';
import { WithNotes } from '@storybook/storybook-addon-notes';
import { WithNotes } from '@storybook/addon-notes';

storiesOf('Button', module)
.add('with text', () => (
Expand Down
File renamed without changes
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@storybook/storybook-addon-notes",
"name": "@storybook/addon-notes",
"version": "1.0.1",
"description": "Write notes for your Storybook stories.",
"repository": {
Expand All @@ -21,7 +21,7 @@
},
"peerDependencies": {
"react": "*",
"@storybook/storybook-addons": "*"
"@storybook/addons": "*"
},
"dependencies": {
"babel-runtime": "^6.5.0"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import addons from '@storybook/storybook-addons';
import addons from '@storybook/addons';

export class WithNotes extends React.Component {
render() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import addons from '@storybook/storybook-addons';
import addons from '@storybook/addons';

const styles = {
notesPanel: {
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Uncomment to register defaults
// import '@storybook/storybook/addons';
// import '@storybook/addons';

// Use the line below to register this addon
// import '@storybook/storybook-addon-actions/register';
// import '@storybook/addon-hello/register';
import '../register';
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions packages/addon-options/README.md → addons/options/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ The Options addon can be used to set configure the Storybook UI. This addon work
First, install the addon

```shell
npm install -D @storybook/storybook-addon-options
npm install -D @storybook/addon-options
```

Add this line to your `addons.js` file (create this file inside your storybook config directory if needed).

```js
import '@storybook/storybook-addon-options/register';
import '@storybook/addon-options/register';
```

Import and use the `setOptions` function in your config.js file.

```js
import * as storybook from '@storybook/storybook';
import { setOptions } from '@storybook/storybook-addon-options';
import { setOptions } from '@storybook/addon-options';

setOptions({
name: 'CUSTOM-OPTIONS',
Expand Down
File renamed without changes
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@storybook/storybook-addon-options",
"name": "@storybook/addon-options",
"version": "1.0.2",
"description": "Options addon for storybook",
"main": "preview.js",
Expand All @@ -21,15 +21,15 @@
"homepage": "https://github.com/storybooks/storybook/tree/master/packages/addon-options",
"devDependencies": {
"@storybook/storybook": "*",
"@storybook/storybook-addons": "*",
"@storybook/addons": "*",
"@storybook/storybook-ui": "*",
"react": "^15.5.4",
"react-dom": "^15.5.4",
"react-test-renderer": "^15.5.4",
"shelljs": "^0.7.7"
},
"peerDependencies": {
"@storybook/storybook-addons": "*",
"@storybook/addons": "*",
"react": "*",
"react-dom": "*"
},
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import addons from '@storybook/storybook-addons';
import addons from '@storybook/addons';
import { ADDON_ID, EVENT_ID } from '../shared';

// init function will be executed once when the storybook loads for the
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import addons from '@storybook/storybook-addons';
import addons from '@storybook/addons';
import { EVENT_ID } from '../shared';

// init function will be executed once when the storybook loads for the
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@storybook/react-native-storybook",
"name": "@storybook/react-native",
"version": "2.3.0",
"description": "A better way to develop React Native Components for your app",
"main": "dist/index.js",
Expand Down Expand Up @@ -34,11 +34,11 @@
"react-native": "^0.43.3"
},
"dependencies": {
"@storybook/storybook-addon-actions": "*",
"@storybook/storybook-addon-links": "*",
"@storybook/storybook-addons": "*",
"@storybook/storybook-channel-websocket": "*",
"@storybook/storybook-ui": "*",
"@storybook/addon-actions": "*",
"@storybook/addon-links": "*",
"@storybook/addons": "*",
"@storybook/channel-websocket": "*",
"@storybook/ui": "*",
"autoprefixer": "^6.7.7",
"babel-core": "^6.24.1",
"babel-loader": "^6.4.1",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 6550c53

Please sign in to comment.