├── .editorconfig ├── .eslintignore ├── .eslintrc ├── .github └── workflows │ └── docsify-cli.yml ├── .gitignore ├── .gitpod.yml ├── .npmignore ├── .nvmrc ├── CHANGELOG.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── ava.config.js ├── docs ├── .nojekyll ├── CNAME ├── README.md └── index.html ├── e2e ├── cli.test.js ├── cli.test.js.md ├── cli.test.js.snap ├── commands │ ├── generate.test.js │ └── init.test.js └── helpers │ └── test-utils.js ├── lib ├── cli.js ├── commands │ ├── generate.js │ ├── init.js │ ├── serve.js │ └── start.js ├── index.js ├── template │ ├── .nojekyll │ ├── README.md │ ├── index.html │ └── index.local.html └── util │ ├── index.js │ └── logger.js ├── media ├── icon.svg └── screencast.gif ├── package-lock.json ├── package.json ├── rollup.config.js └── tools └── locales ├── de.json ├── en.json ├── index.js └── zh.json /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | .git/ 2 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "xo-space", 3 | "rules": { 4 | "semi": [2, "never"], 5 | "no-return-assign": "off", 6 | "no-unused-expressions": "off", 7 | "no-new-func": "off", 8 | "no-multi-assign": "off", 9 | "no-mixed-operators": "off", 10 | "max-params": "off", 11 | "no-script-url": "off", 12 | "camelcase": "off", 13 | "no-warning-comments": "off" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /.github/workflows/docsify-cli.yml: -------------------------------------------------------------------------------- 1 | name: docsify-cli 2 | 3 | on: 4 | push: 5 | pull_request: 6 | branches: 7 | - master 8 | workflow_dispatch: 9 | 10 | jobs: 11 | build: 12 | runs-on: "${{ matrix.os }}" 13 | strategy: 14 | matrix: 15 | os: [ macos-latest, ubuntu-latest, windows-latest ] 16 | node-version: [ 'lts/*' ] 17 | fail-fast: false 18 | 19 | steps: 20 | - uses: actions/checkout@v4 21 | - name: Use Node.js ${{ matrix.node-version }} 22 | uses: actions/setup-node@v4 23 | with: 24 | node-version: ${{ matrix.node-version }} 25 | 26 | - name: Install dependencies 27 | run: npm ci 28 | 29 | - name: Build docsify-cli 30 | run: npm run build 31 | 32 | - name: Run e2e tests 33 | run: npm run test 34 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.log 2 | .DS_Store 3 | .vscode/ 4 | node_modules/ 5 | yarn.lock 6 | bin/ 7 | test_docs/ 8 | .idea 9 | -------------------------------------------------------------------------------- /.gitpod.yml: -------------------------------------------------------------------------------- 1 | tasks: 2 | - init: npm install && npm run build 3 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | .eslintignore 2 | .eslintrc 3 | .gitignore 4 | .travis.yml 5 | tools/gulp-tasks/ 6 | gulpfile.babel.js 7 | -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | stable 2 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. 4 | 5 | ### [4.4.4](https://github.com/docsifyjs/docsify-cli/compare/v4.4.3...v4.4.4) (2022-03-12) 6 | 7 | 8 | ### Features 9 | 10 | * support docsify init --plugins ([#99](https://github.com/docsifyjs/docsify-cli/issues/99)) ([8bb295c](https://github.com/docsifyjs/docsify-cli/commit/8bb295c54e92b11f61f38ac261c5dabd7da23b51)), closes [/github.com/docsifyjs/docsify-cli/pull/99#discussion_r621952975](https://github.com/docsifyjs//github.com/docsifyjs/docsify-cli/pull/99/issues/discussion_r621952975) 11 | 12 | 13 | ### Bug Fixes 14 | 15 | * package.json & package-lock.json to reduce vulnerabilities ([#161](https://github.com/docsifyjs/docsify-cli/issues/161)) ([e9ea2c1](https://github.com/docsifyjs/docsify-cli/commit/e9ea2c12ee7d27fb8d83299a8ea86b95935615db)) 16 | * Repeat generation and hump naming ([#164](https://github.com/docsifyjs/docsify-cli/issues/164)) ([238326e](https://github.com/docsifyjs/docsify-cli/commit/238326e79a8f5dfbaba86e4e197c05655f5945e1)) 17 | * Support refresh and livereload in serve when using routerMode history ([#166](https://github.com/docsifyjs/docsify-cli/issues/166)) ([625c9f2](https://github.com/docsifyjs/docsify-cli/commit/625c9f201e6dedb62947530c094b1b911b7a18e4)) 18 | 19 | ### [4.4.3](https://github.com/docsifyjs/docsify-cli/compare/v4.4.2...v4.4.3) (2021-03-09) 20 | 21 | 22 | ### Features 23 | 24 | * auto generate sidebar ([#130](https://github.com/docsifyjs/docsify-cli/issues/130)) ([e83bfcb](https://github.com/docsifyjs/docsify-cli/commit/e83bfcbd88b43fa8f13d7db13b801da98cca4aea)) 25 | 26 | ### [4.4.2](https://github.com/docsifyjs/docsify-cli/compare/v4.4.1...v4.4.2) (2020-11-17) 27 | 28 | 29 | ### Features 30 | 31 | * Added asking whether to rewrite files ([#117](https://github.com/docsifyjs/docsify-cli/issues/117)) ([f811906](https://github.com/docsifyjs/docsify-cli/commit/f8119064c54d3ad1817f31be058d25d3384e85c6)) 32 | * Included docsify version in url for the template ([#107](https://github.com/docsifyjs/docsify-cli/issues/107)) ([d92d030](https://github.com/docsifyjs/docsify-cli/commit/d92d03005e4f0188671a212f1eb0abc59f46a0b1)) 33 | 34 | 35 | ### Bug Fixes 36 | 37 | * alias not working ([#125](https://github.com/docsifyjs/docsify-cli/issues/125)) ([f3af553](https://github.com/docsifyjs/docsify-cli/commit/f3af553912b962a132743b03ba56ab292bd1b4b9)) 38 | 39 | ### [4.4.1](https://github.com/QingWei-Li/docsify-cli/compare/v4.4.0...v4.4.1) (2020-06-05) 40 | 41 | 42 | ### Bug Fixes 43 | 44 | * Allow config flag to take a parameter ([9b35260](https://github.com/QingWei-Li/docsify-cli/commit/9b352607d78bf2bbe07fd358ada3ce3c56d3fc29)) 45 | * generate snapshot for default behavior ([3ebfd82](https://github.com/QingWei-Li/docsify-cli/commit/3ebfd82d1e678cc38e3e2f412704e1c0600f8f35)) 46 | * lint ([10c29c9](https://github.com/QingWei-Li/docsify-cli/commit/10c29c9d18a135ed39de2a3fb0524bd81a664f87)) 47 | * lint codebase ([518b3ef](https://github.com/QingWei-Li/docsify-cli/commit/518b3efc897409fbb65bb4dbe2dcab0342eba6ff)) 48 | * lint-staged config ([fa1c125](https://github.com/QingWei-Li/docsify-cli/commit/fa1c1255a167f599bfc2e6f99aec599761966c1f)) 49 | * remove redundant snapshot files ([4f69e30](https://github.com/QingWei-Li/docsify-cli/commit/4f69e30a8b896214fde96eebfa924832ce27cf10)) 50 | * tweak ([959741d](https://github.com/QingWei-Li/docsify-cli/commit/959741d7769431ab3c62aa9be4332289e3a60ee3)) 51 | * tweak ([463f642](https://github.com/QingWei-Li/docsify-cli/commit/463f64275814ff679272a2254e29d43fe1371dd4)) 52 | * typo ([94c60be](https://github.com/QingWei-Li/docsify-cli/commit/94c60be91ed5480576c9573b82dff16b21f1bde0)) 53 | 54 | ## [4.4.0](https://github.com/QingWei-Li/docsify-cli/compare/v4.3.0...v4.4.0) (2019-11-20) 55 | 56 | 57 | ### Features 58 | 59 | * **chore:** show up help if no args were passed ([#72](https://github.com/QingWei-Li/docsify-cli/issues/72)) ([2226057](https://github.com/QingWei-Li/docsify-cli/commit/22260576ef67ab6069873219080afad5257916bd)), closes [#71](https://github.com/QingWei-Li/docsify-cli/issues/71) 60 | * **serve:** add --index-name to rewrite default index name ([#48](https://github.com/QingWei-Li/docsify-cli/issues/48)) ([dc8e993](https://github.com/QingWei-Li/docsify-cli/commit/dc8e9930133f05726712b7392f22cba67e9f5c4f)) 61 | 62 | 63 | ### Bug Fixes 64 | 65 | * **chore:** warn on unknown commands and command recommendation ([#74](https://github.com/QingWei-Li/docsify-cli/issues/74)) ([b46a707](https://github.com/QingWei-Li/docsify-cli/commit/b46a707c528555531bf7cb4ec448f670c20c2210)) 66 | * npm audit issues ([ac1bcc3](https://github.com/QingWei-Li/docsify-cli/commit/ac1bcc36616f295a51843ddd0eebca158a7b6b6a)) 67 | * remove gulp-connect ([032817b](https://github.com/QingWei-Li/docsify-cli/commit/032817b4f6fa512d8d55ba02e18626386a891900)) 68 | 69 | 70 | ## [4.1.9](https://github.com/QingWei-Li/docsify-cli/compare/v4.1.8...v4.1.9) (2017-07-12) 71 | 72 | 73 | ### Performance Improvements 74 | 75 | * **serve:** exclude node_modules from livereload ([#17](https://github.com/QingWei-Li/docsify-cli/issues/17)) ([3f488d0](https://github.com/QingWei-Li/docsify-cli/commit/3f488d0)) 76 | 77 | 78 | 79 | 80 | ## [4.1.8](https://github.com/QingWei-Li/docsify-cli/compare/v4.1.7...v4.1.8) (2017-05-31) 81 | 82 | 83 | 84 | 85 | ## [4.1.7](https://github.com/QingWei-Li/docsify-cli/compare/v4.1.6...v4.1.7) (2017-05-30) 86 | 87 | 88 | ### Bug Fixes 89 | 90 | * **ssr:** clean files ([8e81b1a](https://github.com/QingWei-Li/docsify-cli/commit/8e81b1a)) 91 | 92 | 93 | 94 | 95 | ## [4.1.6](https://github.com/QingWei-Li/docsify-cli/compare/v4.1.5...v4.1.6) (2017-05-30) 96 | 97 | 98 | ### Bug Fixes 99 | 100 | * **ssr:** add debug ([653f24f](https://github.com/QingWei-Li/docsify-cli/commit/653f24f)) 101 | 102 | 103 | 104 | 105 | ## [4.1.5](https://github.com/QingWei-Li/docsify-cli/compare/v4.1.4...v4.1.5) (2017-05-30) 106 | 107 | 108 | ### Bug Fixes 109 | 110 | * **ssr:** missing package ([86e6511](https://github.com/QingWei-Li/docsify-cli/commit/86e6511)) 111 | 112 | 113 | 114 | 115 | ## [4.1.4](https://github.com/QingWei-Li/docsify-cli/compare/v4.1.3...v4.1.4) (2017-05-30) 116 | 117 | 118 | ### Bug Fixes 119 | 120 | * **ssr:** file path ([924a6cf](https://github.com/QingWei-Li/docsify-cli/commit/924a6cf)) 121 | 122 | 123 | 124 | 125 | ## [4.1.3](https://github.com/QingWei-Li/docsify-cli/compare/v4.1.2...v4.1.3) (2017-05-30) 126 | 127 | 128 | ### Bug Fixes 129 | 130 | * update babel config ([49dbfe6](https://github.com/QingWei-Li/docsify-cli/commit/49dbfe6)) 131 | 132 | 133 | 134 | 135 | ## [4.1.2](https://github.com/QingWei-Li/docsify-cli/compare/v4.1.1...v4.1.2) (2017-05-30) 136 | 137 | 138 | ### Bug Fixes 139 | 140 | * update babel config ([7095a0a](https://github.com/QingWei-Li/docsify-cli/commit/7095a0a)) 141 | 142 | 143 | 144 | 145 | ## [4.1.1](https://github.com/QingWei-Li/docsify-cli/compare/v4.1.0...v4.1.1) (2017-05-30) 146 | 147 | 148 | ### Bug Fixes 149 | 150 | * update docsify-server-renderer ([ce7833e](https://github.com/QingWei-Li/docsify-cli/commit/ce7833e)) 151 | 152 | 153 | 154 | 155 | # [4.1.0](https://github.com/QingWei-Li/docsify-cli/compare/v4.0.2...v4.1.0) (2017-05-30) 156 | 157 | 158 | ### Bug Fixes 159 | 160 | * update docsify-server-renderer ([7f56467](https://github.com/QingWei-Li/docsify-cli/commit/7f56467)) 161 | 162 | 163 | ### Features 164 | 165 | * test history mode ([f898a01](https://github.com/QingWei-Li/docsify-cli/commit/f898a01)) 166 | 167 | 168 | 169 | 170 | ## [4.0.2](https://github.com/QingWei-Li/docsify-cli/compare/v4.0.1...v4.0.2) (2017-05-29) 171 | 172 | 173 | ### Bug Fixes 174 | 175 | * remove context ([8b3679f](https://github.com/QingWei-Li/docsify-cli/commit/8b3679f)) 176 | 177 | 178 | 179 | 180 | ## [4.0.1](https://github.com/QingWei-Li/docsify-cli/compare/v4.0.0...v4.0.1) (2017-05-29) 181 | 182 | 183 | ### Bug Fixes 184 | 185 | * path => context ([d83fa69](https://github.com/QingWei-Li/docsify-cli/commit/d83fa69)) 186 | 187 | 188 | 189 | 190 | # [4.0.0](https://github.com/QingWei-Li/docsify-cli/compare/v3.3.2...v4.0.0) (2017-05-29) 191 | 192 | 193 | ### Features 194 | 195 | * add start command ([#14](https://github.com/QingWei-Li/docsify-cli/issues/14)) ([feefcce](https://github.com/QingWei-Li/docsify-cli/commit/feefcce)) 196 | 197 | 198 | 199 | 200 | ## [3.3.2](https://github.com/QingWei-Li/docsify-cli/compare/v3.3.1...v3.3.2) (2017-04-28) 201 | 202 | 203 | 204 | 205 | ## [3.3.1](https://github.com/QingWei-Li/docsify-cli/compare/v3.3.0...v3.3.1) (2017-03-26) 206 | 207 | 208 | 209 | 210 | # [3.3.0](https://github.com/QingWei-Li/docsify-cli/compare/v3.2.5...v3.3.0) (2017-03-24) 211 | 212 | 213 | ### Bug Fixes 214 | 215 | * pkg.engines ([3e50f07](https://github.com/QingWei-Li/docsify-cli/commit/3e50f07)) 216 | * **template:** update template ([da67d07](https://github.com/QingWei-Li/docsify-cli/commit/da67d07)) 217 | 218 | 219 | ### Features 220 | 221 | * **dev:** add gulp tasks ([76f0193](https://github.com/QingWei-Li/docsify-cli/commit/76f0193)) 222 | 223 | 224 | 225 | 226 | ## [3.2.5](https://github.com/QingWei-Li/docsify-cli/compare/v3.2.4...v3.2.5) (2017-03-23) 227 | 228 | 229 | 230 | 231 | ## [3.2.4](https://github.com/QingWei-Li/docsify-cli/compare/v3.2.3...v3.2.4) (2017-03-19) 232 | 233 | 234 | ### Bug Fixes 235 | 236 | * **grammar:** isOpen --> openInBrowser ([d823a07](https://github.com/QingWei-Li/docsify-cli/commit/d823a07)) 237 | * travis-ci ([a313412](https://github.com/QingWei-Li/docsify-cli/commit/a313412)) 238 | 239 | 240 | ### Features 241 | 242 | * **cli:** print shell completion script ([804639e](https://github.com/QingWei-Li/docsify-cli/commit/804639e)) 243 | * **cli:** support completion rules ([fb31bd5](https://github.com/QingWei-Li/docsify-cli/commit/fb31bd5)) 244 | 245 | 246 | 247 | 248 | ## [3.2.3](https://github.com/QingWei-Li/docsify-cli/compare/v3.2.2...v3.2.3) (2017-03-17) 249 | 250 | 251 | 252 | 253 | ## [3.2.2](https://github.com/QingWei-Li/docsify-cli/compare/v3.2.1...v3.2.2) (2017-03-17) 254 | 255 | 256 | 257 | 258 | ## [3.2.1](https://github.com/QingWei-Li/docsify-cli/compare/v3.2.0...v3.2.1) (2017-03-15) 259 | 260 | 261 | 262 | 263 | # [3.2.0](https://github.com/QingWei-Li/docsify-cli/compare/v3.1.1...v3.2.0) (2017-03-15) 264 | 265 | 266 | 267 | 268 | ## [3.1.1](https://github.com/QingWei-Li/docsify-cli/compare/v3.1.0...v3.1.1) (2017-03-14) 269 | 270 | 271 | ### Bug Fixes 272 | 273 | * default print help info ([54567bc](https://github.com/QingWei-Li/docsify-cli/commit/54567bc)) 274 | 275 | 276 | 277 | 278 | # [3.1.0](https://github.com/QingWei-Li/docsify-cli/compare/v3.0.2...v3.1.0) (2017-03-14) 279 | 280 | 281 | ### Features 282 | 283 | * **locale:** add zh-cn ([2c5e19f](https://github.com/QingWei-Li/docsify-cli/commit/2c5e19f)) 284 | 285 | 286 | 287 | 288 | ## [3.0.2](https://github.com/QingWei-Li/docsify-cli/compare/v3.0.1...v3.0.2) (2017-03-10) 289 | 290 | 291 | 292 | 293 | ## [3.0.1](https://github.com/QingWei-Li/docsify-cli/compare/v3.0.0...v3.0.1) (2017-02-19) 294 | 295 | 296 | 297 | 298 | # [3.0.0](https://github.com/QingWei-Li/docsify-cli/compare/v2.1.0...v3.0.0) (2017-02-19) 299 | 300 | 301 | 302 | 303 | # [2.1.0](https://github.com/QingWei-Li/docsify-cli/compare/v2.0.0...v2.1.0) (2017-02-09) 304 | 305 | 306 | ### Features 307 | 308 | * add livereload ([661cbe2](https://github.com/QingWei-Li/docsify-cli/commit/661cbe2)) 309 | 310 | 311 | 312 | 313 | # [2.0.0](https://github.com/QingWei-Li/docsify-cli/compare/v1.5.1...v2.0.0) (2017-02-05) 314 | 315 | 316 | 317 | 318 | ## [1.5.1](https://github.com/QingWei-Li/docsify-cli/compare/v1.5.0...v1.5.1) (2017-01-24) 319 | 320 | 321 | 322 | 323 | # [1.5.0](https://github.com/QingWei-Li/docsify-cli/compare/v1.4.0...v1.5.0) (2017-01-24) 324 | 325 | 326 | 327 | 328 | # [1.4.0](https://github.com/QingWei-Li/docsify-cli/compare/v1.3.0...v1.4.0) (2017-01-14) 329 | 330 | 331 | 332 | 333 | # [1.3.0](https://github.com/QingWei-Li/docsify-cli/compare/v1.2.1...v1.3.0) (2017-01-13) 334 | 335 | 336 | 337 | 338 | ## [1.2.1](https://github.com/QingWei-Li/docsify-cli/compare/v1.2.0...v1.2.1) (2016-12-24) 339 | 340 | 341 | 342 | 343 | # [1.2.0](https://github.com/QingWei-Li/docsify-cli/compare/v1.1.1...v1.2.0) (2016-12-24) 344 | 345 | 346 | 347 | 348 | ## [1.1.1](https://github.com/QingWei-Li/docsify-cli/compare/v1.1.0...v1.1.1) (2016-12-19) 349 | 350 | 351 | 352 | 353 | # [1.1.0](https://github.com/QingWei-Li/docsify-cli/compare/v1.0.0...v1.1.0) (2016-12-18) 354 | 355 | 356 | 357 | 358 | # [1.0.0](https://github.com/QingWei-Li/docsify-cli/compare/v0.2.2...v1.0.0) (2016-12-08) 359 | 360 | 361 | 362 | 363 | ## [0.2.2](https://github.com/QingWei-Li/docsify-cli/compare/v0.2.1...v0.2.2) (2016-11-28) 364 | 365 | 366 | 367 | 368 | ## [0.2.1](https://github.com/QingWei-Li/docsify-cli/compare/v0.1.0...v0.2.1) (2016-11-27) 369 | 370 | 371 | 372 | 373 | # 0.1.0 (2016-11-24) 374 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to the development of `docsify-cli` 2 | 3 | - Fork the repository on Github. 4 | - Clone the repository locally. 5 | - Make your changes to the code. 6 | - Run `npm install`. 7 | - Run `npm link` which creates a symlink and thereby `docsify` can be accessed globally. 8 | - We use [commitlint conventional naming rules](https://www.npmjs.com/package/@commitlint/config-conventional#rules) for our commits, make sure that you follow them. 9 | - Push to Github and open a pull request. 10 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 cinwell.li 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
8 | 🖌 docsify cli - A magical documentation generator. 9 |
10 | 11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
Gold Sponsor via Open Collective
24 | 25 |
26 |
27 |
28 |
29 |