{"id":13704863,"url":"https://github.com/janryWang/doc-scripts","last_synced_at":"2025-05-05T12:32:25.577Z","repository":{"id":33904675,"uuid":"163236852","full_name":"janryWang/doc-scripts","owner":"janryWang","description":"React Document Build Tool Scripts , Like react-scripts of create react app","archived":false,"fork":false,"pushed_at":"2022-02-12T15:43:25.000Z","size":209,"stargazers_count":156,"open_issues_count":2,"forks_count":13,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-14T03:39:04.623Z","etag":null,"topics":["create-react-library","demo","documentation-tool","react","react-scripts"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/janryWang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-27T02:22:12.000Z","updated_at":"2025-01-05T13:56:48.000Z","dependencies_parsed_at":"2022-08-07T23:30:36.480Z","dependency_job_id":null,"html_url":"https://github.com/janryWang/doc-scripts","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janryWang%2Fdoc-scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janryWang%2Fdoc-scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janryWang%2Fdoc-scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janryWang%2Fdoc-scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/janryWang","download_url":"https://codeload.github.com/janryWang/doc-scripts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252497641,"owners_count":21757652,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["create-react-library","demo","documentation-tool","react","react-scripts"],"created_at":"2024-08-02T22:00:21.642Z","updated_at":"2025-05-05T12:32:25.284Z","avatar_url":"https://github.com/janryWang.png","language":"JavaScript","readme":"\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://img.alicdn.com/tfs/TB1fk0Qy3HqK1RjSZFEXXcGMXXa-1616-626.png\"\u003e\n\u003ca href=\"https://www.npmjs.com/package/doc-scripts\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/doc-scripts.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://travis-ci.com/janryWang/doc-scripts\"\u003e\u003cimg src=\"https://travis-ci.com/janryWang/doc-scripts.svg?branch=master\"\u003e\u003c/a\u003e\n\u003ca href=\"https://standardjs.com\"\u003e\u003cimg src=\"https://img.shields.io/badge/code_style-standard-brightgreen.svg\"\u003e\u003c/a\u003e\n\u003cimg  src=\"https://img.alicdn.com/tfs/TB1N2p6y4jaK1RjSZFAXXbdLFXa-4044-3097.png\"\u003e\n\u003c/p\u003e\n\n## Features 🦑\n\n- 🛠 No config\n- 😆 Based on Markdown,Merge and Show all markdown files\n- 👩‍💻 Code Highlighting And JSX Code is Runnable\n- 💯 Emoji Support\n- 🍖 React Props Table Support\n- ✨ Creates Static files (only JS is prism)\n- 🏳️‍🌈 Pretty Pages\n- 🦄 Customizable\n- 🇳🇱 [CodeSandbox](https://codesandbox.io/) and iframe Support\n\n## Install 🦅\n\n```bash\nnpm install --save doc-scripts\n```\n\n## Usage 🌈\n\n**1. Node cli**\n\n```bash\n\ndoc-scripts start --input docs\n\ndoc-script build --input docs --output doc-site\n\n```\n\n**2. Markdown Usage**\n\n[examples](./examples/README.md)\n\n**3. Javascript api**\n\n```javascript\n\nimport {execute} from 'doc-scripts'\n\nconst options = {\n  title:'xxxx',\n  header:'\u003clink rel=\"stylesheet\" href=\"//xxxxxx\"\u003e',\n  footer:'\u003cscript\u003exxxxx\u003c/script\u003e',\n  renderer:'./doc-renderer.js',\n  requires:[]\n}\n\nconst webpackConfig = {\n  module:{\n    rules:[...]\n  }\n}\n\nexecute('start',options,webpackConfig) or execute('build',options,webpackConfig)\n\n```\n\n**4. Webpack extended configuration**\n\nCreate a new file named doc-scripts.config.js in the root directory. The\nfollowing is the specific format specification.\n\n```javascript\nmodule.exports = {\n  module: {\n    rules: []\n  },\n  plugins: []\n}\n\n//or\n\nmodule.exports = function(config) {\n  return {\n    ...config,\n    module: {\n      rules: []\n    },\n    plugins: []\n  }\n}\n```\n\n**5. Demo HTML Template extended configuration**\n\nCreate a new file named doc-scripts.header.html or doc-scripts.footer.html in\nthe root directory. The following is the specific format specification.\n\n```html\n\u003c!-- this is doc-scripts.header.html --\u003e\n\u003clink rel=\"stylesheet\" href=\"//unpkg.com/@alifd/next/dist/next.min.css\" /\u003e\n```\n\n**6. Customize Doc Renderer**\n\nCreate a new file named doc-scripts.renderer.js  in\nthe root directory. The following is the specific format specification.\n\n```jsx\n\nimport DocRenderer from 'react-doc-renderer'\n\n//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.\n\nexport default ({docs = []})=\u003e(\n  \u003cdiv\u003e\n    \u003cDocRenderer docs={docs}/\u003e\n  \u003c/div\u003e\n)\n\n```\n\n\n## Contributors 💪🏻\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START  --\u003e\n\u003c!-- prettier-ignore --\u003e\n| [\u003cimg src=\"https://avatars0.githubusercontent.com/u/4060976?v=4\" width=\"100px;\" alt=\"Janry\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eJanry\u003c/b\u003e\u003c/sub\u003e](https://github.com/janryWang)\u003cbr /\u003e[📖](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, \u0026 Feedback\") |\n| :---: |\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\n### LICENSE\n\nDoc scripts is open source software licensed as [MIT.](./LICENSE)\n","funding_links":[],"categories":["脚手架"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FjanryWang%2Fdoc-scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FjanryWang%2Fdoc-scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FjanryWang%2Fdoc-scripts/lists"}