Skip to content

Commit

Permalink
feat(docz-example-babel6): add package
Browse files Browse the repository at this point in the history
  • Loading branch information
pedronauck committed Jun 17, 2018
1 parent 68e364a commit 92ead5a
Show file tree
Hide file tree
Showing 9 changed files with 479 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/babel6/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"plugins": [
"emotion"
]
}
222 changes: 222 additions & 0 deletions examples/babel6/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,222 @@
# Change Log

All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

<a name="0.2.5"></a>
## [0.2.5](https://github.com/pedronauck/docz/compare/v0.2.4...v0.2.5) (2018-06-15)




**Note:** Version bump only for package docz-example-basic

<a name="0.2.4"></a>
## [0.2.4](https://github.com/pedronauck/docz/compare/v0.2.3...v0.2.4) (2018-06-13)




**Note:** Version bump only for package docz-example-basic

<a name="0.2.3"></a>
## [0.2.3](https://github.com/pedronauck/docz/compare/v0.2.2...v0.2.3) (2018-06-13)




**Note:** Version bump only for package docz-example-basic

<a name="0.2.2"></a>
## [0.2.2](https://github.com/pedronauck/docz/compare/v0.2.1...v0.2.2) (2018-06-12)




**Note:** Version bump only for package docz-example-basic

<a name="0.2.1"></a>
## [0.2.1](https://github.com/pedronauck/docz/compare/v0.2.0...v0.2.1) (2018-06-12)




**Note:** Version bump only for package docz-example-basic

<a name="0.2.0"></a>
# [0.2.0](https://github.com/pedronauck/docz/compare/v0.2.0-beta.2...v0.2.0) (2018-06-11)




**Note:** Version bump only for package docz-example-basic

<a name="0.2.0-beta.2"></a>
# [0.2.0-beta.2](https://github.com/doczjs/docz/compare/v0.2.0-beta.1...v0.2.0-beta.2) (2018-06-10)


### Bug Fixes

* **docz-core:** autolink headings ([0b8369d](https://github.com/doczjs/docz/commit/0b8369d))




<a name="0.2.0-beta.1"></a>
# [0.2.0-beta.1](https://github.com/doczjs/docz/compare/v0.2.0-beta.0...v0.2.0-beta.1) (2018-06-10)




**Note:** Version bump only for package docz-example-basic

<a name="0.2.0-beta.0"></a>
# [0.2.0-beta.0](https://github.com/doczjs/docz/compare/v0.1.2-beta.6...v0.2.0-beta.0) (2018-06-10)




**Note:** Version bump only for package docz-example-basic

<a name="0.1.2-beta.6"></a>
## [0.1.2-beta.6](https://github.com/doczjs/docz/compare/v0.1.2-beta.5...v0.1.2-beta.6) (2018-06-09)




**Note:** Version bump only for package docz-example-basic

<a name="0.1.2-beta.5"></a>
## [0.1.2-beta.5](https://github.com/doczjs/docz/compare/v0.1.2-beta.4...v0.1.2-beta.5) (2018-06-09)




**Note:** Version bump only for package docz-example-basic

<a name="0.1.2-beta.4"></a>
## [0.1.2-beta.4](https://github.com/doczjs/docz/compare/v0.1.2-beta.3...v0.1.2-beta.4) (2018-06-09)




**Note:** Version bump only for package docz-example-basic

<a name="0.1.2-beta.3"></a>
## [0.1.2-beta.3](https://github.com/doczjs/docz/compare/v0.1.2-beta.2...v0.1.2-beta.3) (2018-06-09)




**Note:** Version bump only for package docz-example-basic

<a name="0.1.2-beta.2"></a>
## [0.1.2-beta.2](https://github.com/doczjs/docz/compare/v0.1.2-beta.1...v0.1.2-beta.2) (2018-06-09)




**Note:** Version bump only for package docz-example-basic

<a name="0.1.2-beta.1"></a>
## [0.1.2-beta.1](https://github.com/doczjs/docz/compare/v0.1.2-beta.0...v0.1.2-beta.1) (2018-06-09)




**Note:** Version bump only for package docz-example-basic

<a name="0.1.2-beta.0"></a>
## [0.1.2-beta.0](https://github.com/doczjs/docz/compare/v0.1.1...v0.1.2-beta.0) (2018-06-02)




**Note:** Version bump only for package docz-example-basic

<a name="0.1.1-beta.6"></a>
## [0.1.1-beta.6](https://github.com/doczjs/docz/compare/v0.1.1-beta.5...v0.1.1-beta.6) (2018-06-01)




**Note:** Version bump only for package docz-example-basic

<a name="0.1.1-beta.5"></a>
## [0.1.1-beta.5](https://github.com/doczjs/docz/compare/v0.1.1-beta.4...v0.1.1-beta.5) (2018-06-01)


### Bug Fixes

* **load-cfg:** add namedExports options ([d36194d](https://github.com/doczjs/docz/commit/d36194d))




<a name="0.1.1-beta.4"></a>
## [0.1.1-beta.4](https://github.com/doczjs/docz/compare/v0.1.1-beta.3...v0.1.1-beta.4) (2018-05-29)




**Note:** Version bump only for package docz-example-basic

<a name="0.1.1-beta.3"></a>
## [0.1.1-beta.3](https://github.com/doczjs/docz/compare/v0.1.1-beta.2...v0.1.1-beta.3) (2018-05-29)




**Note:** Version bump only for package docz-example-basic

<a name="0.1.1-beta.2"></a>
## [0.1.1-beta.2](https://github.com/doczjs/docz/compare/v0.1.1-beta.0...v0.1.1-beta.2) (2018-05-29)




**Note:** Version bump only for package docz-example-basic

<a name="0.1.1-beta.1"></a>
## [0.1.1-beta.1](https://github.com/doczjs/docz/compare/v0.1.1-beta.0...v0.1.1-beta.1) (2018-05-29)




**Note:** Version bump only for package docz-example-basic

<a name="0.1.1-beta.0"></a>
## [0.1.1-beta.0](https://github.com/doczjs/docz/compare/v0.1.0...v0.1.1-beta.0) (2018-05-29)




**Note:** Version bump only for package docz-example-basic

<a name="0.1.0"></a>
# 0.1.0 (2018-05-29)


### Bug Fixes

* **docz-core:** config watch for directory operations ([43fa7ab](https://github.com/doczjs/docz/commit/43fa7ab))
* **docz-core:** create plugin to fix paragraph parse on mdx ([42b4f05](https://github.com/doczjs/docz/commit/42b4f05))
* **docz-core:** packages splitting ([d2e74ee](https://github.com/doczjs/docz/commit/d2e74ee))
* **docz-example-basic:** package name ([dec5713](https://github.com/doczjs/docz/commit/dec5713))


### Features

* **docz:** add groups feature ([9652b30](https://github.com/doczjs/docz/commit/9652b30))
* add basic monorepo structure ([5a977ed](https://github.com/doczjs/docz/commit/5a977ed))
* **docz:** add components parser ([a4127d9](https://github.com/doczjs/docz/commit/a4127d9))
* **docz:** add custom routes for docs ([8458d91](https://github.com/doczjs/docz/commit/8458d91))
* **docz-core:** add build command ([ef7abd2](https://github.com/doczjs/docz/commit/ef7abd2))
* **docz-core:** add hot reload ([9ebe65d](https://github.com/doczjs/docz/commit/9ebe65d))
* **docz-core:** add playground code parse section ([6bbf158](https://github.com/doczjs/docz/commit/6bbf158))
* **docz-core:** set babel on the fly ([672be49](https://github.com/doczjs/docz/commit/672be49))
* add component props parse feature ([987627d](https://github.com/doczjs/docz/commit/987627d))
* add support for highlight code sections ([19bf7ea](https://github.com/doczjs/docz/commit/19bf7ea))
* **docz-core:** use websockets instead of generate json to process entries ([e0773a0](https://github.com/doczjs/docz/commit/e0773a0))
* **docz-theme-default:** start logic to create theme feature ([900cf2b](https://github.com/doczjs/docz/commit/900cf2b))
* refac to use mdx ([04b59e5](https://github.com/doczjs/docz/commit/04b59e5))
5 changes: 5 additions & 0 deletions examples/babel6/doczrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { babel } from 'docz-plugin-babel6'

export default {
plugins: [babel()],
}
22 changes: 22 additions & 0 deletions examples/babel6/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "docz-example-babel6",
"version": "0.2.5",
"license": "MIT",
"scripts": {
"dev": "docz dev",
"build": "docz build"
},
"dependencies": {
"docz": "^0.2.5",
"docz-core": "^0.2.4",
"emotion": "^9.2.1",
"prop-types": "^15.6.1",
"react": "^16.4.0",
"react-dom": "^16.4.0",
"react-emotion": "^9.2.1"
},
"devDependencies": {
"babel-plugin-emotion": "^9.2.0",
"docz-plugin-babel6": "^0.2.4"
}
}
30 changes: 30 additions & 0 deletions examples/babel6/src/components/Alert.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import React, { Fragment } from 'react'
import styled from 'react-emotion'
import t from 'prop-types'

const kinds = {
info: '#5352ED',
positive: '#2ED573',
negative: '#FF4757',
warning: '#FFA502',
}

const AlertStyled = styled('div')`
padding: 15px 20px;
background: white;
border-radius: 3px;
color: white;
background: ${({ kind = 'info' }) => kinds[kind]};
`

const Alert = props => <AlertStyled {...props} />

Alert.propTypes = {
kind: t.oneOf(['info', 'positive', 'negative', 'warning']),
}

Alert.defaultProps = {
kind: 'info',
}

export default Alert
40 changes: 40 additions & 0 deletions examples/babel6/src/components/Alert.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
name: Alert
menu: Components
---

import { Playground, PropsTable } from 'docz'
import Alert from './Alert'

# Alert

## Properties

<PropsTable of={Alert} />

## Basic usage

<Playground>
<Alert>Some message</Alert>
</Playground>

## Using different kinds

<Playground>
<Alert kind="info">Some message</Alert>
<Alert kind="positive">Some message</Alert>
<Alert kind="negative">Some message</Alert>
<Alert kind="warning">Some message</Alert>
</Playground>

## Use with children as a function

<Playground>
{() => {
const message = 'Hello world'

return (
<Alert>{message}</Alert>
)
}}
</Playground>
Loading

0 comments on commit 92ead5a

Please sign in to comment.