doc-scripts
react demo server
Last updated 2 months ago by janrywang .
MIT · Original npm · Tarball · package.json
$ cnpm install doc-scripts 
SYNC missed versions from official npm registry.

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 and iframe Support

Install ????

npm install --save doc-scripts

Usage ????

1. Node cli


doc-scripts start --input docs

doc-script build --input docs --output doc-site

2. Markdown Usage

examples

3. Javascript api


import {execute} from 'doc-scripts'

const options = {
  title:'xxxx',
  header:'<link rel="stylesheet" href="//xxxxxx">',
  footer:'<script>xxxxx</script>',
  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.

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.

<!-- this is doc-scripts.header.html -->
<link rel="stylesheet" href="//unpkg.com/@alifd/next/dist/next.min.css" />

6. Customize Doc Renderer

Create a new file named doc-scripts.renderer.js in the root directory. The following is the specific format specification.


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 = []})=>(
  <div>
    <DocRenderer docs={docs}/>
  </div>
)

Contributors ????????

Janry
Janry

???? ???? ???? ????

LICENSE

Doc scripts is open source software licensed as MIT.

Current Tags

  • 1.8.2                                ...           latest (2 months ago)

77 Versions

  • 1.8.2                                ...           2 months ago
  • 1.8.1                                ...           3 months ago
  • 1.8.0                                ...           3 months ago
  • 1.7.29                                ...           8 months ago
  • 1.7.28                                ...           8 months ago
  • 1.7.27                                ...           8 months ago
  • 1.7.26                                ...           8 months ago
  • 1.7.24                                ...           8 months ago
  • 1.7.23                                ...           8 months ago
  • 1.7.22                                ...           8 months ago
  • 1.7.21                                ...           8 months ago
  • 1.7.20                                ...           8 months ago
  • 1.7.19                                ...           8 months ago
  • 1.7.18                                ...           8 months ago
  • 1.7.17                                ...           8 months ago
  • 1.7.15                                ...           9 months ago
  • 1.7.14                                ...           9 months ago
  • 1.7.13                                ...           9 months ago
  • 1.7.12                                ...           9 months ago
  • 1.7.11                                ...           9 months ago
  • 1.7.10                                ...           9 months ago
  • 1.7.9                                ...           9 months ago
  • 1.7.8                                ...           9 months ago
  • 1.7.7                                ...           9 months ago
  • 1.7.6                                ...           9 months ago
  • 1.7.5                                ...           9 months ago
  • 1.7.4                                ...           a year ago
  • 1.7.3                                ...           a year ago
  • 1.7.2                                ...           a year ago
  • 1.7.1                                ...           a year ago
  • 1.7.0                                ...           a year ago
  • 1.6.17                                ...           a year ago
  • 1.6.16                                ...           a year ago
  • 1.6.15                                ...           a year ago
  • 1.6.14                                ...           a year ago
  • 1.6.13                                ...           a year ago
  • 1.6.12                                ...           a year ago
  • 1.6.11                                ...           a year ago
  • 1.6.10                                ...           a year ago
  • 1.6.9                                ...           a year ago
  • 1.6.8                                ...           a year ago
  • 1.6.7                                ...           a year ago
  • 1.6.6                                ...           a year ago
  • 1.6.5                                ...           a year ago
  • 1.6.4                                ...           a year ago
  • 1.6.3                                ...           a year ago
  • 1.6.2                                ...           a year ago
  • 1.6.1                                ...           a year ago
  • 1.6.0                                ...           a year ago
  • 1.5.2                                ...           a year ago
  • 1.5.1                                ...           a year ago
  • 1.5.0                                ...           a year ago
  • 1.4.0                                ...           a year ago
  • 1.3.8                                ...           a year ago
  • 1.3.7                                ...           a year ago
  • 1.3.6                                ...           a year ago
  • 1.3.5                                ...           a year ago
  • 1.3.4                                ...           a year ago
  • 1.3.2                                ...           a year ago
  • 1.3.1                                ...           a year ago
  • 1.3.0                                ...           a year ago
  • 1.2.0                                ...           a year ago
  • 1.1.2                                ...           a year ago
  • 1.1.1                                ...           a year ago
  • 1.1.0                                ...           a year ago
  • 1.0.0                                ...           a year ago
  • 0.9.0                                ...           a year ago
  • 0.8.0                                ...           a year ago
  • 0.7.0                                ...           a year ago
  • 0.6.0                                ...           a year ago
  • 0.5.0                                ...           a year ago
  • 0.4.2                                ...           a year ago
  • 0.4.1                                ...           a year ago
  • 0.4.0                                ...           a year ago
  • 0.3.0                                ...           a year ago
  • 0.2.0                                ...           a year ago
  • 0.1.0                                ...           a year ago
Maintainers (1)
Downloads
Today 6
This Week 6
This Month 26
Last Day 1
Last Week 8
Last Month 108
Dependents (1)

Copyright 2014 - 2016 © taobao.org |