1
1
mirror of https://github.com/c8r/x0.git synced 2024-10-26 15:15:04 +03:00

Clean up docs

This commit is contained in:
Brent Jackson 2018-06-23 18:37:55 -04:00
parent 05dce94908
commit b71ae596a8
14 changed files with 20 additions and 70 deletions

View File

@ -1,7 +1,7 @@
# x0 # x0
Zero-config React development environment and static site generator Document & develop React components without breaking a sweat
[![Build Status][build-badge]][build] [![Build Status][build-badge]][build]
@ -17,19 +17,16 @@ npm install -g @compositor/x0
## Features ## Features
- Zero-config - Zero-config
- Hot-loading development environment - No plugins
- Works with virtually any React component\* - Components over configuration
- No confusing APIs - Use markdown, MDX, or React components
- Automatic file system based routing - Automatic file system based routing
- Exports static HTML - Completely customizable
- Exports JS bundles - Export static sites
- Works with CSS-in-JS libraries like [styled-components][sc] and [emotion][emotion] - Works as an isolated development environment
- Support for async data fetching
Read more about x0 in our [blog post](https://compositor.io/blog/x0-making-react-component-development-stupid-simple/). 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 ## Isolated development environment

View File

@ -3,16 +3,18 @@ import * as scope from 'rebass'
import { Link } from 'react-router-dom' import { Link } from 'react-router-dom'
import { ScopeProvider, SidebarLayout } from '../components' import { ScopeProvider, SidebarLayout } from '../components'
import { import {
Provider as RebassProvider,
Flex, Flex,
Box, Box,
Container, Container,
} from 'rebass' } from 'rebass'
import LandingLayout from './_layout' import LandingLayout from './_layout'
import theme from './_theme'
export default class App extends React.Component { export default class App extends React.Component {
static defaultProps = { static defaultProps = {
title: 'Hello' title: 'x0'
} }
render () { render () {
@ -29,7 +31,9 @@ export default class App extends React.Component {
return ( return (
<ScopeProvider scope={scope}> <ScopeProvider scope={scope}>
<Layout {...this.props} /> <RebassProvider theme={theme}>
<Layout {...this.props} />
</RebassProvider>
</ScopeProvider> </ScopeProvider>
) )
} }

View File

@ -1,6 +1,5 @@
import React from 'react' import React from 'react'
import { import {
Provider,
Flex, Flex,
Box, Box,
Container, Container,
@ -10,10 +9,9 @@ import {
} from 'rebass' } from 'rebass'
import { Link } from 'react-router-dom' import { Link } from 'react-router-dom'
import { Logo } from '@compositor/logo' import { Logo } from '@compositor/logo'
import theme from './theme'
export default ({ children }) => export default ({ children }) =>
<Provider theme={theme}> <React.Fragment>
<Flex alignItems='center'> <Flex alignItems='center'>
<BlockLink <BlockLink
href='https://compositor.io'> href='https://compositor.io'>
@ -55,4 +53,4 @@ export default ({ children }) =>
</Text> </Text>
</Flex> </Flex>
</Container> </Container>
</Provider> </React.Fragment>

View File

@ -1,8 +0,0 @@
---
title: Beep JSX
---
import { Box, Heading } from 'rebass'
<Box p={3} bg='tomato'>
<Heading>Beep JSX</Heading>
</Box>

View File

@ -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>

View File

@ -58,6 +58,7 @@ export default class extends React.Component {
GitHub GitHub
</Button> </Button>
<Box mx={1} /> <Box mx={1} />
{/*
<Button <Button
is={Link} is={Link}
px={4} px={4}
@ -66,6 +67,7 @@ export default class extends React.Component {
to='/docs'> to='/docs'>
Documentation Documentation
</Button> </Button>
*/}
</Flex> </Flex>
</Container> </Container>
</React.Fragment> </React.Fragment>

View File

@ -1,6 +0,0 @@
# Button
```.jsx
<Button>Button</Button>
```

View File

@ -1,5 +0,0 @@
import React from 'react'
import { Donut } from 'rebass'
export default () =>
<Donut value={2/3} />

View File

@ -1,3 +0,0 @@
```!jsx
<Heading>Hello</Heading>
```

View File

@ -1 +0,0 @@
export { Library as default } from '../../components'

View File

@ -1,5 +0,0 @@
# hello
`/examples/nested/hello.md`

View File

@ -1,4 +0,0 @@
# Nested
`/examples/nested/index.md`

View File

@ -1,7 +1,7 @@
{ {
"name": "@compositor/x0", "name": "@compositor/x0",
"version": "6.0.0-4", "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", "main": "index.js",
"bin": { "bin": {
"x0": "cli.js" "x0": "cli.js"
@ -93,12 +93,12 @@
"sinon": "^6.0.0" "sinon": "^6.0.0"
}, },
"x0": { "x0": {
"title": "Compositor x0", "title": "x0",
"basename": "/x0", "basename": "/x0",
"meta": [ "meta": [
{ {
"name": "description", "name": "description",
"content": "Zero-config React development environment and static site generator" "content": "Document & develop React components without breaking a sweat"
}, },
{ {
"name": "twitter:card", "name": "twitter:card",