Skip to content

Commit

Permalink
feat: docz basic
Browse files Browse the repository at this point in the history
  • Loading branch information
shaoruu committed Jun 7, 2020
1 parent d27f0b7 commit c86b780
Show file tree
Hide file tree
Showing 8 changed files with 6,507 additions and 373 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ yarn-debug.log*
yarn-error.log*

.vscode
.docz
10 changes: 0 additions & 10 deletions .storybook/preview.js

This file was deleted.

18 changes: 18 additions & 0 deletions docs/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: Example Component
route: /
---

import { ExampleComponent } from 'fiber'
import { Playground } from 'docz'

# Example Component

<Playground>
<ExampleComponent
locale={{ welcome: 'locale overwrite' }}
mt='50px'
background='black'
text='text'
/>
</Playground>
7 changes: 7 additions & 0 deletions doczrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
port: 3030,
src: './docs',
title: 'Fiber UI',
description: 'A React UI Component library 🧸',
typescript: true
}
12 changes: 12 additions & 0 deletions gatsby-node.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const path = require('path')

exports.onCreateWebpackConfig = (args) => {
args.actions.setWebpackConfig({
resolve: {
modules: [path.resolve(__dirname, '../src'), 'node_modules'],
alias: {
fiber: path.resolve(__dirname, '../src')
}
}
})
}
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"node": ">=10"
},
"scripts": {
"start": "concurrently 'yarn:dev' 'yarn:storybook'",
"start": "concurrently 'yarn:dev' 'yarn:docz:dev'",
"build": "microbundle-crl --no-compress --format modern,cjs",
"dev": "microbundle-crl watch --no-compress --format modern,cjs",
"prepublish": "run-s build",
Expand All @@ -27,8 +27,9 @@
"lint:scss:fix": "stylelint 'src/**/*.scss' --syntax scss --fix",
"lint:js": "eslint . --ext .js,.jsx",
"lint:js:fix": "yarn run lint:js -- --fix",
"storybook": "start-storybook -p 9009",
"build-storybook": "build-storybook"
"docz:dev": "docz dev",
"docz:build": "docz build",
"docz:serve": "docz build && docz serve"
},
"lint-staged": {
"src/**/*.{js,jsx,ts,tsx}": [
Expand Down Expand Up @@ -106,6 +107,7 @@
"@types/react-test-renderer": "^16.9.2",
"@types/styled-components": "^5.1.0",
"@types/styled-system": "^5.1.9",
"docz": "^2.3.1",
"eslint-import-resolver-alias": "^1.1.2",
"polished": "^3.6.4",
"styled-components": "^5.1.0",
Expand Down
4 changes: 4 additions & 0 deletions src/gatsby-theme-docz/wrapper.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import React from 'react'
import { UIProvider } from 'fiber'

export default ({ children }) => <UIProvider>{children}</UIProvider>
6,820 changes: 6,460 additions & 360 deletions yarn.lock

Large diffs are not rendered by default.

0 comments on commit c86b780

Please sign in to comment.