Skip to content

Latest commit

 

History

History
75 lines (46 loc) · 1.54 KB

index.md

File metadata and controls

75 lines (46 loc) · 1.54 KB

Table of Contents

Quick CLI Example

  • run sample
$ ./node_modules/.bin/docway -h 
Usage: docway
    --config [config js file]


Options:
  --version   Show version number                                      [boolean]
  -h, --help  Show help                                                [boolean]


const packageCollector = require('docway/collectors/node/package');
const simpleDocTemplate = require('docway/templates/simple/docTemplate.js');
const path = require('path');

module.exports = {
    template: simpleDocTemplate,

    target: path.join(__dirname, './README.md'),

    content: {
        topic: 'Quick start test project.',
        features: [
            'This is feature 1',
            'This is feature 2'
        ],

        licensePath: './LICENSE'
    },

    collectors: [{
        name: 'module',
        collector: packageCollector,
        data: path.join(__dirname, './package.json')
    }],

    subDocuments: []
};
  • run sample
$ ./node_modules/.bin/docway --config ./doc.js 
[success] finished to build documents.