docker

2019-09-11 admin

docker是什么

什么是docker,Static documentation generator based on docco

docker使用教程帮助文档

Docker

A documentation generator built on the foundations of Docco and Docco-Husky.

The support available in Docco and Docco-Husky for larger projects consisting of many hundreds of script files was somewhat lacking, so I decided to create my own.

Take a look at this project’s public page for an example of what it can do.

Installation

Simple: npm install -g docker

Usage

$ docker [options] [files ...]

Available options are:

  • -i or --input_dir: Path to input source directory. Defaults to current directory.
  • -o or --output_dir: Path to output doc directory. Defaults to ./doc.
  • -u or --updated_files: If present, only process files that hav been changed.
  • -c or --colour_scheme (yes, I’m British): Colour scheme to use. Colour schemes are as below.
  • -I or --ignore_hidden: Ignore files and directories whose names begin with . or _.
  • -w or --watch: Keep the process running, watch for changes on the directory, and process updated files.
  • -s or --sidebar: Whether or not the sidebar should be opened by default in the output (defaults to yes, can be yes, no, true, false). Value disable will disable the sidebar entirely in the output.
  • -x or --exclude: Comma-separated list of paths to exclude. Supports basic * wildcards too.
  • -n or --line-number: Include line numbers in the output (default is off)
  • -m or --multi_line_only: Whether to process only multi-line comments. (Defaults to false)
  • --js: Specify a comma-separated list of extra javascript files (relative to the current dir) to include
  • --css: Same as for --js but for CSS files
  • --extras: Comma-separated list of optional extras to activate (see below)

If no file list is given, docker will run recursively on every file in the current directory

Any of the files given can also be directories, in which case it will recurse into them.

Folder structure inside the input directory is preserved into the output directory and file names are simply appended .html for the doc file

Examples

If you haven’t installed with -g specified, replace docker with something like $(npm root)/docker/docker in all of the examples below.

Process every file in the current directory into “doc”

$ docker

Process files in “src” to “documents”

$ docker -i src -o documents

or:

$ docker -o documents src

or:

$ docker -o documents src/*

Note that in the first example, the contents of src will be mapped directly into documents whereas in the second and third examples, the files will be created inside documents/src

Generate Docker docs

This is the command I use to generate this project’s documentation.

  • Output to a directory on the gh-pages branch of this repo
  • Use the “manni” colour scheme
  • Show the sidebar by default
  • Ignore files starting with _ or .
  • Only process updated files
  • Exclude the node_modules directory
  • Watch the directory for further changes as the code is updated.
  • Include the File Search extra
$ docker -o ../docker_gh-pages -c atelier-cave.light -s yes -I -u -x node_modules -w --extras fileSearch

Extras

The output of Docker is designed to be fairly lightweight, so doesn’t include much other than the bare minimum to power the basic features. Optional extras like file searching and line jumping are therefore contained in there own files and can be turned on by a specific flag.

If you’re viewing this on GitHub, take a look here; if you’re looking at the Docker output, look here, for further explanation.

Colour Schemes

These are the styles available in highlight.js. See the highight.js demo for all available options. You should use the name of the CSS file for this option.

Important note

All files must be inside the input directory (specified by -i) or one of its descendant subdirectories. If they’re not then various file paths in the output won’t work properly and the file will probably get generated in the wrong place. Still, it’s better than what it used to do, which was to get stuck in an infinite loop.

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处。

转载请注明:文章转载自 JavaScript中文网 [https://www.javascriptcn.com]

本文地址:https://www.javascriptcn.com/read-74872.html

文章标题:docker

相关文章
使用Docker部署Spring-Boot+Vue博客系统
在今年年初的时候,完成了自己的个Fame博客系统的实现,当时也做了一篇博文Spring-boot+Vue = Fame 写blog的一次小结作为记录和介绍。从完成实现到现在,也断断续续的根据实际的使用情况进行更新。 只不过每次上线部署的时候...
2018-09-29
docker部署项目
1.切换项目路径,更新项目,打包 cd '项目路径’ git pull npm run build 2.切换到deploy文件下,删除之前的dist文件夹,把新打包的dist文件夹移动到deploy文件夹里面 rm -rf dist mv ...
2018-07-10
is-docker
is-docker是什么 什么是is-docker,Check if the process is running inside a Docker container is-docker官网:官网 is-docker源码仓库:源码仓库 i...
2019-02-02
dockerfile-ast
dockerfile-ast是什么 什么是dockerfile-ast,Parse a Dockerfile into an array of instructions and comments. dockerfile-ast官网:官网 ...
2018-12-20
strong-docker-build
strong-docker-build是什么 什么是strong-docker-build,Build a Docker image of an app run under strong-supervisor strong-docker-...
2019-02-11
docker-modem
docker-modem是什么 什么是docker-modem,Docker remote API network layer module. docker-modem官网:官网 docker-modem源码仓库:源码仓库 docker-...
2018-12-10
docker-preprocessor
docker-preprocessor是什么 什么是docker-preprocessor,A general-purpose module for preprocessing using Docker. docker-preproces...
2018-12-10
将你的前端应用打包成docker镜像并部署到服务器?仅需一个脚本搞定
1.前言 前段时间,自己搞了个阿里云的服务器。想自己在上面折腾,但是不想因为自己瞎折腾而污染了现有的环境。毕竟,现在的阿里云已经没有免费的快照服务了。要想还原的话,最简单的办法就是重新装系统。而一旦重装,之前的搭建的所有环境就都白搭了。 再...
2019-04-23
snyk-docker-plugin
snyk-docker-plugin是什么 什么是snyk-docker-plugin,Snyk CLI docker plugin snyk-docker-plugin官网:官网 snyk-docker-plugin源码仓库:源码仓库 ...
2018-12-20
microservices-with-docker-flask-and-react 简介
在第一部分, 你学到如何使用 Docker 来创建一个基于python, postgres, 和 flask web 框架的 RESTful API 可重用开发环境. 在 app 启动本地运行后, 学习如何在 Amazon EC2 实例上部...
2019-04-09
回到顶部