mirror of
https://github.com/c8r/x0.git
synced 2024-09-11 13:45:52 +03:00
Clean up docs
This commit is contained in:
parent
05dce94908
commit
b71ae596a8
17
README.md
17
README.md
@ -1,7 +1,7 @@
|
||||
|
||||
# x0
|
||||
|
||||
Zero-config React development environment and static site generator
|
||||
Document & develop React components without breaking a sweat
|
||||
|
||||
[![Build Status][build-badge]][build]
|
||||
|
||||
@ -17,19 +17,16 @@ npm install -g @compositor/x0
|
||||
## Features
|
||||
|
||||
- Zero-config
|
||||
- Hot-loading development environment
|
||||
- Works with virtually any React component\*
|
||||
- No confusing APIs
|
||||
- No plugins
|
||||
- Components over configuration
|
||||
- Use markdown, MDX, or React components
|
||||
- Automatic file system based routing
|
||||
- Exports static HTML
|
||||
- Exports JS bundles
|
||||
- Works with CSS-in-JS libraries like [styled-components][sc] and [emotion][emotion]
|
||||
- Support for async data fetching
|
||||
- Completely customizable
|
||||
- Export static sites
|
||||
- Works as an isolated development environment
|
||||
|
||||
Read more about x0 in our [blog post](https://compositor.io/blog/x0-making-react-component-development-stupid-simple/).
|
||||
|
||||
\* Custom [webpack configuration](#webpack) is required for components that rely on webpack-based features
|
||||
|
||||
|
||||
## Isolated development environment
|
||||
|
||||
|
@ -3,16 +3,18 @@ import * as scope from 'rebass'
|
||||
import { Link } from 'react-router-dom'
|
||||
import { ScopeProvider, SidebarLayout } from '../components'
|
||||
import {
|
||||
Provider as RebassProvider,
|
||||
Flex,
|
||||
Box,
|
||||
Container,
|
||||
} from 'rebass'
|
||||
|
||||
import LandingLayout from './_layout'
|
||||
import theme from './_theme'
|
||||
|
||||
export default class App extends React.Component {
|
||||
static defaultProps = {
|
||||
title: 'Hello'
|
||||
title: 'x0'
|
||||
}
|
||||
|
||||
render () {
|
||||
@ -29,7 +31,9 @@ export default class App extends React.Component {
|
||||
|
||||
return (
|
||||
<ScopeProvider scope={scope}>
|
||||
<RebassProvider theme={theme}>
|
||||
<Layout {...this.props} />
|
||||
</RebassProvider>
|
||||
</ScopeProvider>
|
||||
)
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
import React from 'react'
|
||||
import {
|
||||
Provider,
|
||||
Flex,
|
||||
Box,
|
||||
Container,
|
||||
@ -10,10 +9,9 @@ import {
|
||||
} from 'rebass'
|
||||
import { Link } from 'react-router-dom'
|
||||
import { Logo } from '@compositor/logo'
|
||||
import theme from './theme'
|
||||
|
||||
export default ({ children }) =>
|
||||
<Provider theme={theme}>
|
||||
<React.Fragment>
|
||||
<Flex alignItems='center'>
|
||||
<BlockLink
|
||||
href='https://compositor.io'>
|
||||
@ -55,4 +53,4 @@ export default ({ children }) =>
|
||||
</Text>
|
||||
</Flex>
|
||||
</Container>
|
||||
</Provider>
|
||||
</React.Fragment>
|
||||
|
@ -1,8 +0,0 @@
|
||||
---
|
||||
title: Beep JSX
|
||||
---
|
||||
import { Box, Heading } from 'rebass'
|
||||
|
||||
<Box p={3} bg='tomato'>
|
||||
<Heading>Beep JSX</Heading>
|
||||
</Box>
|
@ -1,19 +0,0 @@
|
||||
---
|
||||
title: Components
|
||||
---
|
||||
import { Box } from 'rebass'
|
||||
|
||||
# Components
|
||||
|
||||
This is a standard markdown file.
|
||||
|
||||
This is a live/editable code block:
|
||||
|
||||
```.jsx
|
||||
<Box p={4} bg='tomato'>Hello</Box>
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
<Box>fm title: {frontMatter.title}</Box>
|
||||
|
@ -58,6 +58,7 @@ export default class extends React.Component {
|
||||
GitHub
|
||||
</Button>
|
||||
<Box mx={1} />
|
||||
{/*
|
||||
<Button
|
||||
is={Link}
|
||||
px={4}
|
||||
@ -66,6 +67,7 @@ export default class extends React.Component {
|
||||
to='/docs'>
|
||||
Documentation
|
||||
</Button>
|
||||
*/}
|
||||
</Flex>
|
||||
</Container>
|
||||
</React.Fragment>
|
@ -1,6 +0,0 @@
|
||||
|
||||
# Button
|
||||
|
||||
```.jsx
|
||||
<Button>Button</Button>
|
||||
```
|
@ -1,5 +0,0 @@
|
||||
import React from 'react'
|
||||
import { Donut } from 'rebass'
|
||||
|
||||
export default () =>
|
||||
<Donut value={2/3} />
|
@ -1,3 +0,0 @@
|
||||
```!jsx
|
||||
<Heading>Hello</Heading>
|
||||
```
|
@ -1 +0,0 @@
|
||||
export { Library as default } from '../../components'
|
@ -1,5 +0,0 @@
|
||||
|
||||
|
||||
# hello
|
||||
|
||||
`/examples/nested/hello.md`
|
@ -1,4 +0,0 @@
|
||||
|
||||
# Nested
|
||||
|
||||
`/examples/nested/index.md`
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@compositor/x0",
|
||||
"version": "6.0.0-4",
|
||||
"description": "Zero-config React development environment and static site generator",
|
||||
"description": "Document & develop React components without breaking a sweat",
|
||||
"main": "index.js",
|
||||
"bin": {
|
||||
"x0": "cli.js"
|
||||
@ -93,12 +93,12 @@
|
||||
"sinon": "^6.0.0"
|
||||
},
|
||||
"x0": {
|
||||
"title": "Compositor x0",
|
||||
"title": "x0",
|
||||
"basename": "/x0",
|
||||
"meta": [
|
||||
{
|
||||
"name": "description",
|
||||
"content": "Zero-config React development environment and static site generator"
|
||||
"content": "Document & develop React components without breaking a sweat"
|
||||
},
|
||||
{
|
||||
"name": "twitter:card",
|
||||
|
Loading…
Reference in New Issue
Block a user