Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/janrywang/doc-scripts
React Document Build Tool Scripts , Like react-scripts of create react app
https://github.com/janrywang/doc-scripts
create-react-library demo documentation-tool react react-scripts
Last synced: 13 days ago
JSON representation
React Document Build Tool Scripts , Like react-scripts of create react app
- Host: GitHub
- URL: https://github.com/janrywang/doc-scripts
- Owner: janryWang
- License: mit
- Created: 2018-12-27T02:22:12.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-02-12T15:43:25.000Z (almost 3 years ago)
- Last Synced: 2024-10-23T04:12:54.269Z (22 days ago)
- Topics: create-react-library, demo, documentation-tool, react, react-scripts
- Language: JavaScript
- Homepage:
- Size: 204 KB
- Stars: 155
- Watchers: 2
- Forks: 13
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Features 🦑
- 🛠 No config
- 😆 Based on Markdown,Merge and Show all markdown files
- 👩💻 Code Highlighting And JSX Code is Runnable
- 💯 Emoji Support
- 🍖 React Props Table Support
- ✨ Creates Static files (only JS is prism)
- 🏳️🌈 Pretty Pages
- 🦄 Customizable
- 🇳🇱 [CodeSandbox](https://codesandbox.io/) and iframe Support## Install 🦅
```bash
npm install --save doc-scripts
```## Usage 🌈
**1. Node cli**
```bash
doc-scripts start --input docs
doc-script build --input docs --output doc-site
```
**2. Markdown Usage**
[examples](./examples/README.md)
**3. Javascript api**
```javascript
import {execute} from 'doc-scripts'
const options = {
title:'xxxx',
header:'',
footer:'xxxxx',
renderer:'./doc-renderer.js',
requires:[]
}const webpackConfig = {
module:{
rules:[...]
}
}execute('start',options,webpackConfig) or execute('build',options,webpackConfig)
```
**4. Webpack extended configuration**
Create a new file named doc-scripts.config.js in the root directory. The
following is the specific format specification.```javascript
module.exports = {
module: {
rules: []
},
plugins: []
}//or
module.exports = function(config) {
return {
...config,
module: {
rules: []
},
plugins: []
}
}
```**5. Demo HTML Template extended configuration**
Create a new file named doc-scripts.header.html or doc-scripts.footer.html in
the root directory. The following is the specific format specification.```html
```
**6. Customize Doc Renderer**
Create a new file named doc-scripts.renderer.js in
the root directory. The following is the specific format specification.```jsx
import DocRenderer from 'react-doc-renderer'
//react-doc-renderer default render engien in doc-scripts, so ,you can continue to reuse this component in doc-scripts.renderer.js, or you can completely override its behavior.
export default ({docs = []})=>(
)```
## Contributors 💪🏻
| [
Janry](https://github.com/janryWang)
[📖](https://github.com/janrywang/doc-scripts/commits?author=janryWang "Documentation") [💻](https://github.com/janrywang/doc-scripts/commits?author=janryWang "Code") [👀](#review-janryWang "Reviewed Pull Requests") [🤔](#ideas-janryWang "Ideas, Planning, & Feedback") |
| :---: |### LICENSE
Doc scripts is open source software licensed as [MIT.](./LICENSE)