Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing repos #882

Merged
merged 68 commits into from
Apr 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
5e59b18
Initial Release.
arunoda Aug 30, 2016
71a4f59
Update README.md
arunoda Aug 30, 2016
2f40184
Remove unwanted files.
arunoda Aug 30, 2016
7c7bec3
1.0.0
arunoda Aug 30, 2016
6e6300d
Update CHANGELOG.md
arunoda Aug 30, 2016
839206c
Update docs.
arunoda Aug 30, 2016
b513446
1.0.1
arunoda Aug 30, 2016
f3acfe0
Update CHANGELOG.md
arunoda Aug 30, 2016
23dcc33
chore(package): update eslint-plugin-react to version 6.2.2
greenkeeperio-bot Sep 14, 2016
1ef18dd
Merge pull request #4 from kadirahq/greenkeeper-eslint-plugin-react-6…
Sep 15, 2016
2745ec8
Initial version
thani-sh Sep 27, 2016
78ebfb3
Select the iframe by id
thani-sh Sep 27, 2016
f5d45c8
chore(package): update mocha to version 3.1.0
greenkeeperio-bot Sep 27, 2016
2abaa5f
Update CHANGELOG
thani-sh Sep 27, 2016
9f6bb93
1.0.1
thani-sh Sep 27, 2016
d3ffa8a
chore(package): update @kadira/storybook to version 2.20.0
greenkeeperio-bot Sep 27, 2016
f118688
chore(package): update babel-eslint to version 7.0.0
greenkeeperio-bot Sep 27, 2016
a261e15
Merge pull request #22 from kadirahq/greenkeeper-babel-eslint-7.0.0
Sep 28, 2016
33db142
Merge pull request #21 from kadirahq/greenkeeper-mocha-3.1.0
Sep 28, 2016
7f6f0e2
Merge pull request #20 from kadirahq/greenkeeper-@kadira/storybook-2.…
Sep 28, 2016
e3e250a
chore(package): update sinon to version 1.17.6
greenkeeperio-bot Sep 28, 2016
b3b26e7
chore(package): update react-addons-test-utils to version 15.3.2
greenkeeperio-bot Sep 28, 2016
eeccda1
chore(package): update react to version 15.3.2
greenkeeperio-bot Sep 28, 2016
1bcb275
chore(package): update eslint-config-airbnb to version 12.0.0
greenkeeperio-bot Sep 28, 2016
05e10a1
chore(package): update eslint to version 3.6.1
greenkeeperio-bot Sep 28, 2016
81d2df0
Merge pull request #9 from kadirahq/greenkeeper-sinon-1.17.6
Sep 28, 2016
cc6ad4d
Merge pull request #10 from kadirahq/greenkeeper-react-addons-test-ut…
Sep 28, 2016
9b2b213
Merge pull request #11 from kadirahq/greenkeeper-react-15.3.2
Sep 28, 2016
ab92d73
chore(package): update react-dom to version 15.3.2
greenkeeperio-bot Sep 28, 2016
6ea7097
Merge pull request #12 from kadirahq/greenkeeper-react-dom-15.3.2
Sep 28, 2016
b3f8439
Merge pull request #17 from kadirahq/greenkeeper-eslint-config-airbnb…
Sep 28, 2016
908c947
Merge pull request #19 from kadirahq/greenkeeper-eslint-3.6.1
Sep 28, 2016
ea53caf
chore(package): update @kadira/storybook to version 2.20.1
greenkeeperio-bot Sep 28, 2016
4e1654c
Merge pull request #23 from kadirahq/greenkeeper-@kadira/storybook-2.…
Sep 28, 2016
af17685
Remove serialization step because postMessage api does it
roonyh Sep 28, 2016
f0e2545
Merge pull request #1 from kadirahq/remove-serialization
Sep 28, 2016
ae0c765
Update CHANGELOG
thani-sh Sep 28, 2016
0ecc7bc
1.0.2
thani-sh Sep 28, 2016
046a5d1
Stringify data before sending over channel
thani-sh Sep 29, 2016
2a398d1
Merge pull request #3 from kadirahq/safe-encode
Sep 29, 2016
a716884
Update CHANGELOG
thani-sh Sep 29, 2016
98fd5b2
1.0.3
thani-sh Sep 29, 2016
0b91b38
add note about version quirement
bdougie Oct 15, 2016
d91bdb0
Merge pull request #41 from bdougie/patch-1
arunoda Oct 15, 2016
6f1deb3
Take the call to handlers out of try block so they can throw.
Oct 20, 2016
08e888b
Merge pull request #4 from kadirahq/allow-handlers-to-throw
Oct 20, 2016
5b83b68
Update CHANGELOG
thani-sh Oct 28, 2016
fe70080
1.0.4
thani-sh Oct 28, 2016
7574f20
Use a constant key to identify messages
thani-sh Oct 28, 2016
9a62220
Merge pull request #6 from kadirahq/constant-key
Oct 28, 2016
8c37bae
Update CHANGELOG
thani-sh Oct 28, 2016
5fa7953
1.1.0
thani-sh Oct 28, 2016
a66e500
Identify the page using a param
thani-sh Nov 10, 2016
cb891ff
Merge pull request #7 from storybooks/work-in-iframe
Nov 17, 2016
b016a02
Update CHANGELOG
thani-sh Nov 17, 2016
f40a3f0
2.0.0
thani-sh Nov 17, 2016
2a93e7f
Fix stories not being listed when storybook is iframed
rexxars Nov 22, 2016
83991ce
Merge pull request #8 from rexxars/iframe-fix
Nov 24, 2016
86a1ce2
Update CHANGELOG
thani-sh Nov 24, 2016
8b28a78
2.0.1
thani-sh Nov 24, 2016
0635aa6
Update README --save -> --save-dev
usulpro Dec 1, 2016
d97b004
Merge pull request #42 from UsulPro/patch-1
Dec 1, 2016
70dc05c
Update README.md
ndelangen Apr 15, 2017
9da8a98
Update README.md
ndelangen Apr 15, 2017
c79a423
Merge branch 'master' of github.com:storybooks/storybook-channel-post…
ndelangen Apr 15, 2017
5d16de8
Merge branch 'master' of github.com:storybooks/storybook-addon-notes …
ndelangen Apr 15, 2017
afd0d20
FIX linting
ndelangen Apr 15, 2017
bf06bf4
REMOVE testing and listing from project
ndelangen Apr 15, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2016 Your Name. <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
3 changes: 3 additions & 0 deletions packages/addon-notes/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["es2015", "stage-2", "react"]
}
11 changes: 11 additions & 0 deletions packages/addon-notes/.scripts/get_gh_pages_url.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// IMPORTANT
// ---------
// This is an auto generated file with React CDK.
// Do not modify this file.

const parse = require('git-url-parse');
var ghUrl = process.argv[2];
const parsedUrl = parse(ghUrl);

const ghPagesUrl = 'https://' + parsedUrl.owner + '.github.io/' + parsedUrl.name;
console.log(ghPagesUrl);
33 changes: 33 additions & 0 deletions packages/addon-notes/.scripts/mocha_runner.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// IMPORTANT
// ---------
// This is an auto generated file with React CDK.
// Do not modify this file.
// Use `.scripts/user/pretest.js instead`.

require('babel-core/register');
require('babel-polyfill');

// Add jsdom support, which is required for enzyme.
var jsdom = require('jsdom').jsdom;

var exposedProperties = ['window', 'navigator', 'document'];

global.document = jsdom('');
global.window = document.defaultView;
Object.keys(document.defaultView).forEach((property) => {
if (typeof global[property] === 'undefined') {
exposedProperties.push(property);
global[property] = document.defaultView[property];
}
});

global.navigator = {
userAgent: 'node.js'
};

process.on('unhandledRejection', function (error) {
console.error('Unhandled Promise Rejection:');
console.error(error && error.stack || error);
});

require('./user/pretest.js');
16 changes: 16 additions & 0 deletions packages/addon-notes/.scripts/prepublish.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

# IMPORTANT
# ---------
# This is an auto generated file with React CDK.
# Do not modify this file.
# Use `.scripts/user/prepublish.sh instead`.

echo "=> Transpiling 'src' into ES5 ..."
echo ""
rm -rf ./dist
./node_modules/.bin/babel --ignore tests,stories --plugins "transform-runtime" ./src --out-dir ./dist
echo ""
echo "=> Transpiling completed."

. .scripts/user/prepublish.sh
47 changes: 47 additions & 0 deletions packages/addon-notes/.scripts/publish_storybook.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/bin/bash

# IMPORTANT
# ---------
# This is an auto generated file with React CDK.
# Do not modify this file.

set -e # exit with nonzero exit code if anything fails

# get GIT url

GIT_URL=`git config --get remote.origin.url`
if [[ $GIT_URL == "" ]]; then
echo "This project is not configured with a remote git repo".
exit 1
fi

# clear and re-create the out directory
rm -rf .out || exit 0;
mkdir .out;

# run our compile script, discussed above
build-storybook -o .out

# go to the out directory and create a *new* Git repo
cd .out
git init

# inside this git repo we'll pretend to be a new user
git config user.name "GH Pages Bot"
git config user.email "[email protected]"

# The first and only commit to this new Git repo contains all the
# files present with the commit message "Deploy to GitHub Pages".
git add .
git commit -m "Deploy Storybook to GitHub Pages"

# Force push from the current repo's master branch to the remote
# repo's gh-pages branch. (All previous history on the gh-pages branch
# will be lost, since we are overwriting it.) We redirect any output to
# /dev/null to hide any sensitive credential data that might otherwise be exposed.
git push --force --quiet $GIT_URL master:gh-pages > /dev/null 2>&1
cd ..
rm -rf .out

echo ""
echo "=> Storybook deployed to: `node .scripts/get_gh_pages_url.js $GIT_URL`"
1 change: 1 addition & 0 deletions packages/addon-notes/.scripts/user/prepublish.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Use this file to your own code to run at NPM `prepublish` event.
1 change: 1 addition & 0 deletions packages/addon-notes/.scripts/user/pretest.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Use this file to setup any test utilities.
12 changes: 12 additions & 0 deletions packages/addon-notes/.storybook/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// IMPORTANT
// ---------
// This is an auto generated file with React CDK.
// Do not modify this file.

import { configure } from '@kadira/storybook';

function loadStories() {
require('../src/stories');
}

configure(loadStories, module);
11 changes: 11 additions & 0 deletions packages/addon-notes/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# ChangeLog

### v1.0.1
30-August-2016

* Update docs.

### v1.0.0
30-August-2016

* Initial version
7 changes: 7 additions & 0 deletions packages/addon-notes/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Contributing to Storybook Addon Notes Component

We welcome your help to make this component better. This document will help to streamline the contributing process and save everyone's precious time.

## Development Setup

This component has been setup with [React CDK](https://github.com/kadirahq/react-cdk). Refer [React CDK documentation](https://github.com/kadirahq/react-cdk)) to get started with the development.
42 changes: 42 additions & 0 deletions packages/addon-notes/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Storybook Addon Notes

This [Storybook](https://getstorybook.io) addon allows you to write notes for your stories.

![Storybook Addon Notes Demo](docs/demo.png)

### Getting Started
**note: addons require @kadira/storybook 2.x or greater*

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

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

Add following content to it:

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

Then write your stories like this:

```js
import React from 'react';
import { storiesOf, action } from '@kadira/storybook';
import Button from './Button';
import { WithNotes } from '@kadira/storybook-addon-notes';

storiesOf('Button', module)
.add('with text', () => (
<WithNotes notes={'This is a very simple Button and you can click on it.'}>
<Button onClick={action('clicked')}>Hello Button</Button>
</WithNotes>
))
.add('with some emoji', () => (
<WithNotes notes={'Here we use some emoji as the Button text. Isn\'t it look nice?'}>
<Button onClick={action('clicked')}>😀 😎 👍 💯</Button>
</WithNotes>
));
```
Binary file added packages/addon-notes/docs/demo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 44 additions & 0 deletions packages/addon-notes/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"name": "@kadira/storybook-addon-notes",
"version": "1.0.1",
"description": "Write notes for your Storybook stories.",
"repository": {
"type": "git",
"url": "https://github.com/kadirahq/storybook-addon-notes.git"
},
"license": "MIT",
"scripts": {
"prepublish": ". ./.scripts/prepublish.sh",
"test": "echo \"Error: no test specified\" && exit 0",
"storybook": "start-storybook -p 9010",
"publish-storybook": "bash .scripts/publish_storybook.sh"
},
"devDependencies": {
"react": "^15.3.2",
"react-dom": "^15.3.2",
"babel-core": "^6.5.0",
"babel-loader": "^6.2.4",
"babel-polyfill": "^6.5.0",
"babel-preset-es2015": "^6.5.0",
"babel-preset-react": "^6.5.0",
"babel-preset-stage-2": "^6.5.0",
"babel-plugin-transform-runtime": "^6.5.0",
"babel-cli": "^6.5.0",
"react-addons-test-utils": "^15.3.2",
"@kadira/storybook": "^2.20.1",
"git-url-parse": "^6.0.1"
},
"peerDependencies": {
"react": "^0.14.7 || ^15.0.0",
"@kadira/storybook-addons": "^v1.3.1"
},
"dependencies": {
"babel-runtime": "^6.5.0"
},
"main": "dist/index.js",
"keywords": [
"react",
"storybook",
"addon"
]
}
1 change: 1 addition & 0 deletions packages/addon-notes/register.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require('./dist/register.js');
19 changes: 19 additions & 0 deletions packages/addon-notes/src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import React from 'react';
import addons from '@kadira/storybook-addons';

export class WithNotes extends React.Component {
render() {
const { children, notes } = this.props;
const channel = addons.getChannel();

// send the notes to the channel.
channel.emit('kadira/notes/add_notes', notes);
// return children elements.
return children;
}
}

WithNotes.propTypes = {
children: React.PropTypes.node,
notes: React.PropTypes.string,
};
72 changes: 72 additions & 0 deletions packages/addon-notes/src/register.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
import React from 'react';
import addons from '@kadira/storybook-addons';

const styles = {
notesPanel: {
margin: 10,
fontFamily: 'Arial',
fontSize: 14,
color: '#444',
width: '100%',
overflow: 'auto',
},
};

export class Notes extends React.Component {
constructor(...args) {
super(...args);
this.state = { text: '' };
this.onAddNotes = this.onAddNotes.bind(this);
}

componentDidMount() {
const { channel, api } = this.props;
// Listen to the notes and render it.
channel.on('kadira/notes/add_notes', this.onAddNotes);

// Clear the current notes on every story change.
this.stopListeningOnStory = api.onStory(() => {
this.onAddNotes('');
});
}

// This is some cleanup tasks when the Notes panel is unmounting.
componentWillUnmount() {
if (this.stopListeningOnStory) {
this.stopListeningOnStory();
}

this.unmounted = true;
const { channel } = this.props;
channel.removeListener('kadira/notes/add_notes', this.onAddNotes);
}

onAddNotes(text) {
this.setState({ text });
}

render() {
const { text } = this.state;
const textAfterFormatted = text ? text.trim().replace(/\n/g, '<br />') : '';

return (
<div style={styles.notesPanel}>
<div dangerouslySetInnerHTML={{ __html: textAfterFormatted }} />
</div>
);
}
}

Notes.propTypes = {
channel: React.PropTypes.object,
api: React.PropTypes.object,
};

// Register the addon with a unique name.
addons.register('kadira/notes', api => {
// Also need to set a unique name to the panel.
addons.addPanel('kadira/notes/panel', {
title: 'Notes',
render: () => <Notes channel={addons.getChannel()} api={api} />,
});
});
Empty file.
5 changes: 5 additions & 0 deletions packages/addon-notes/src/tests/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const { describe, it } = global;

describe('Storybook Addon Notes', () => {
it('should have some tests');
});
3 changes: 3 additions & 0 deletions packages/channel-postmessage/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["react-app"]
}
9 changes: 9 additions & 0 deletions packages/channel-postmessage/.scripts/npm-prepublish.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
var path = require('path');
var shell = require('shelljs');
var babel = ['node_modules', '.bin', 'babel'].join(path.sep);

// required for react-app preset
process.env.NODE_ENV = 'production';

shell.rm('-rf', 'dist')
shell.exec(babel + ' --ignore __tests__ src --out-dir dist')
Loading