GithubHelp home page GithubHelp logo

tarunc / docker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jbt/docker

0.0 3.0 0.0 1.36 MB

Documentation generator

Home Page: http://jbt.github.com/docker

JavaScript 47.57% CSS 52.43%

docker's Introduction

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

Requires Pygments

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 manni -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 exactly as in pygmentize -L styles:

  • monokai
  • manni
  • rrt
  • perldoc
  • borland
  • colorful
  • default
  • murphy
  • vs
  • trac
  • tango
  • fruity
  • autumn
  • bw
  • emacs
  • vim
  • pastie
  • friendly
  • native

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.

docker's People

Contributors

alexindigo avatar alinex avatar brynbellomy avatar erisds avatar hhelwich avatar jbt avatar justan avatar mikkel avatar qgustavor avatar tarunc avatar tjbaron avatar webpro avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.