Skip to content

Commit

Permalink
Refactor StoryStore into @storybook/core
Browse files Browse the repository at this point in the history
  • Loading branch information
shilman committed Nov 5, 2017
1 parent 36a4aad commit 9eca833
Show file tree
Hide file tree
Showing 17 changed files with 51 additions and 290 deletions.
1 change: 1 addition & 0 deletions app/angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"@storybook/addon-actions": "^3.3.0-alpha.2",
"@storybook/addon-links": "^3.3.0-alpha.2",
"@storybook/addons": "^3.3.0-alpha.2",
"@storybook/core": "^3.3.0-alpha.2",
"@storybook/channel-postmessage": "^3.3.0-alpha.2",
"@storybook/ui": "^3.3.0-alpha.2",
"airbnb-js-shims": "^1.1.1",
Expand Down
2 changes: 1 addition & 1 deletion app/angular/src/client/preview/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { createStore } from 'redux';
import addons from '@storybook/addons';
import createChannel from '@storybook/channel-postmessage';
import qs from 'qs';
import StoryStore from './story_store';
import { StoryStore } from '@storybook/core/client';
import ClientApi from './client_api';
import ConfigApi from './config_api';
import render from './render';
Expand Down
89 changes: 0 additions & 89 deletions app/angular/src/client/preview/story_store.js

This file was deleted.

1 change: 1 addition & 0 deletions app/react-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"@storybook/addon-links": "^3.3.0-alpha.2",
"@storybook/addons": "^3.3.0-alpha.2",
"@storybook/channel-websocket": "^3.3.0-alpha.2",
"@storybook/core": "^3.3.0-alpha.2",
"@storybook/ui": "^3.3.0-alpha.2",
"autoprefixer": "^7.1.6",
"babel-core": "^6.26.0",
Expand Down
2 changes: 1 addition & 1 deletion app/react-native/src/preview/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import parse from 'url-parse';
import addons from '@storybook/addons';
import createChannel from '@storybook/channel-websocket';
import { EventEmitter } from 'events';
import StoryStore from './story_store';
import { StoryStore } from '@storybook/core/client';
import StoryKindApi from './story_kind';
import OnDeviceUI from './components/OnDeviceUI';
import StoryView from './components/StoryView';
Expand Down
98 changes: 0 additions & 98 deletions app/react-native/src/preview/story_store.js

This file was deleted.

1 change: 1 addition & 0 deletions app/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"@storybook/addon-links": "^3.3.0-alpha.2",
"@storybook/addons": "^3.3.0-alpha.2",
"@storybook/channel-postmessage": "^3.3.0-alpha.2",
"@storybook/core": "^3.3.0-alpha.2",
"@storybook/ui": "^3.3.0-alpha.2",
"airbnb-js-shims": "^1.3.0",
"autoprefixer": "^7.1.6",
Expand Down
2 changes: 1 addition & 1 deletion app/react/src/client/preview/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { createStore } from 'redux';
import addons from '@storybook/addons';
import createChannel from '@storybook/channel-postmessage';
import qs from 'qs';
import StoryStore from './story_store';
import { StoryStore } from '@storybook/core/client';
import ClientApi from './client_api';
import ConfigApi from './config_api';
import render from './render';
Expand Down
1 change: 1 addition & 0 deletions app/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"@storybook/addon-links": "^3.3.0-alpha.2",
"@storybook/addons": "^3.3.0-alpha.2",
"@storybook/channel-postmessage": "^3.3.0-alpha.2",
"@storybook/core": "^3.3.0-alpha.2",
"@storybook/ui": "^3.3.0-alpha.2",
"airbnb-js-shims": "^1.3.0",
"autoprefixer": "^7.1.6",
Expand Down
2 changes: 1 addition & 1 deletion app/vue/src/client/preview/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { createStore } from 'redux';
import addons from '@storybook/addons';
import createChannel from '@storybook/channel-postmessage';
import qs from 'qs';
import StoryStore from './story_store';
import { StoryStore } from '@storybook/core/client';
import ClientApi from './client_api';
import ConfigApi from './config_api';
import render from './render';
Expand Down
99 changes: 0 additions & 99 deletions app/vue/src/client/preview/story_store.js

This file was deleted.

13 changes: 13 additions & 0 deletions lib/core/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Storybook for React

[![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)
[![Known Vulnerabilities](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847/badge.svg)](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847)
[![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/)

This package contains common data structures used among the different frameworks
(React, RN, Vue, Angular, etc).

FIXME
2 changes: 2 additions & 0 deletions lib/core/client.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/* eslint-disable global-require */
module.exports = require('./dist/client').default;
22 changes: 22 additions & 0 deletions lib/core/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "@storybook/core",
"version": "3.3.0-alpha.2",
"description": "Storybook framework-agnostic API",
"homepage": "https://github.com/storybooks/storybook/tree/master/lib/core",
"bugs": {
"url": "https://github.com/storybooks/storybook/issues"
},
"license": "MIT",
"main": "dist/client/index.js",
"repository": {
"type": "git",
"url": "https://github.com/storybooks/storybook.git"
},
"scripts": {
"dev": "DEV_BUILD=1 nodemon --watch ./src --exec 'yarn prepare'",
"prepare": "node ../../scripts/prepare.js"
},
"devDependencies": {
"babel-cli": "^6.26.0"
}
}
Loading

3 comments on commit 9eca833

@tmeasday
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a great first step!

@Hypnosphi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, cool!

@dangreenisrael
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Epic!!!!

Please sign in to comment.