├── docs └── index.html ├── .npmignore ├── scripts ├── genDoc └── changelog ├── .travis.yml ├── index.html ├── .gitignore ├── .jshintrc ├── LICENSE.md ├── lib ├── dir.js ├── option.js ├── parser.js ├── compiler.js ├── theme.js ├── symbol.js └── mr-doc.js ├── package.json ├── bin └── mr-doc ├── src ├── source maps │ ├── dir.js.map │ ├── option.js.map │ ├── parser.js.map │ ├── compiler.js.map │ ├── theme.js.map │ ├── symbol.js.map │ └── doxx.js.map ├── dir.js ├── option.js ├── parser.js ├── compiler.js ├── symbol.js ├── theme.js └── doxx.js ├── gulpfile.js ├── test └── symbol.test.js ├── README.md └── CHANGELOG.md /docs/index.html: -------------------------------------------------------------------------------- 1 |

Site Index Page

-------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | /node_modules/ 2 | .env 3 | scripts 4 | test 5 | docs -------------------------------------------------------------------------------- /scripts/genDoc: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | mr-doc --source lib --theme mr-doc-theme-cayman --target docs 3 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.12 4 | - 0.11 5 | - iojs 6 | - 0.10 7 | 8 | before_install: npm i -g gulp 9 | -------------------------------------------------------------------------------- /scripts/changelog: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # gem install github_changelog_generator 3 | github_changelog_generator -u mr-doc -p mr-doc 4 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | lib-cov 2 | *.seed 3 | *.log 4 | *.csv 5 | *.dat 6 | *.out 7 | *.pid 8 | *.gz 9 | /node_modules/ 10 | .publish 11 | .DS_Store 12 | pids 13 | logs 14 | results 15 | 16 | node_modules 17 | npm-debug.log 18 | .env 19 | 20 | jsconfig.json 21 | .vscode/settings.json 22 | -------------------------------------------------------------------------------- /.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "browser": false, 3 | "jquery": false, 4 | "node": true, 5 | "esnext": true, 6 | "camelcase": true, 7 | "eqeqeq": true, 8 | "indent": 2, 9 | "latedef": true, 10 | "maxlen": 80, 11 | "newcap": true, 12 | "quotmark": "single", 13 | "strict": true, 14 | "undef": true, 15 | "unused": true, 16 | "eqnull": true 17 | } -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Francois-Guillaume Ribreau 2 | 3 | Permission is hereby granted, free of charge, to any person 4 | obtaining a copy of this software and associated documentation 5 | files (the "Software"), to deal in the Software without 6 | restriction, including without limitation the rights to use, 7 | copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the 9 | Software is furnished to do so, subject to the following 10 | conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 17 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 19 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 20 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /lib/dir.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | import Path from 'path'; 4 | import walkdir from 'walkdir'; 5 | import _ from 'lodash'; 6 | import osenv from 'osenv'; 7 | import fs from 'fs'; 8 | import 'source-map-support/register'; 9 | 10 | /** 11 | * The class that manages directories. 12 | * @class Dir 13 | */ 14 | class Dir { 15 | constructor() {} 16 | 17 | /** 18 | * Create an array of all the right files in the source dir 19 | * @param {String} source source path 20 | * @param {Object} options option object 21 | * @return {Array} 22 | */ 23 | static collectFiles(source, options) { 24 | var dirtyFiles = walkdir.sync(source), // tee hee! 25 | ignore = options.ignore || [], 26 | files = []; 27 | dirtyFiles.forEach(function (file) { 28 | file = Path.relative(source, file); 29 | var doNotIgnore = _.all(ignore, function (d) { 30 | // return true if no part of the path is in the ignore/black list 31 | return (file.indexOf(d) === -1); 32 | }); 33 | 34 | if ((file.substr(-2) === 'js') && doNotIgnore) { 35 | files.push(file); 36 | } 37 | }); 38 | 39 | return files; 40 | } 41 | 42 | /** 43 | * Locates the home directory for the 44 | * current operating system. 45 | * Credits to @cliftonc 46 | * @return {String} The home directory path 47 | */ 48 | static getHomeDir() { 49 | return osenv.home() || 50 | process.env.HOME || 51 | process.env.HOMEPATH || 52 | process.env.USERPROFILE; 53 | } 54 | /** 55 | * Checks if the directory exists 56 | * @param {String} path The path to the directory 57 | * @return {Boolean} The truth value 58 | */ 59 | static exists(path) { 60 | try { 61 | fs.statSync(path); 62 | return true; 63 | } catch (err) { 64 | return !(err && err.code === 'ENOENT'); 65 | } 66 | } 67 | } 68 | 69 | 70 | export default Dir; -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mr-doc", 3 | "description": "Generic, template based, HTML output for Dox documentation generator", 4 | "version": "2.1.2", 5 | "homepage": "https://github.com/FGRibreau/mr-doc", 6 | "author": "Francois-Guillaume Ribreau (http://fgribreau.com)", 7 | "repository": { 8 | "type": "git", 9 | "url": "git://github.com/FGRibreau/mr-doc.git" 10 | }, 11 | "bugs": { 12 | "url": "https://github.com/FGRibreau/mr-doc/issues" 13 | }, 14 | "licenses": [{ 15 | "type": "MIT", 16 | "url": "https://github.com/FGRibreau/mr-doc/blob/master/LICENSE-MIT" 17 | }], 18 | "main": "lib/mr-doc.js", 19 | "bin": { 20 | "mr-doc": "./bin/mr-doc" 21 | }, 22 | "scripts": { 23 | "test": "gulp test" 24 | }, 25 | "engines": { 26 | "node": ">= 0.10.0" 27 | }, 28 | "dependencies": { 29 | "commander": "~2.8.1", 30 | "dox": "^0.8.0", 31 | "mr-doc-theme-default": "^1.0.0", 32 | "elegant-spinner": "^1.0.0", 33 | "fs-extra": "^0.24.0", 34 | "jade": "~1.11.x", 35 | "jshint-stylish": "^2.0.1", 36 | "lodash": "^3.10.1", 37 | "log-update": "^1.0.0", 38 | "markdown-it": "^4.4.0", 39 | "mkdirp": "~0.5.0", 40 | "osenv": "^0.1.3", 41 | "rimraf": "^2.4.3", 42 | "source-map-support": "^0.3.2", 43 | "update-notifier": "^0.5.0", 44 | "walkdir": "~0.0.7", 45 | "when": "^3.7.3" 46 | }, 47 | "devDependencies": { 48 | "chai": "^3.2.0", 49 | "gulp": "^3.9.0", 50 | "gulp-babel": "^5.2.1", 51 | "gulp-gh-pages": "^0.5.2", 52 | "gulp-jsbeautify": "^0.1.1", 53 | "gulp-jshint": "^1.11.2", 54 | "gulp-mocha": "^2.1.3", 55 | "gulp-shell": "^0.4.3", 56 | "gulp-sourcemaps": "^1.5.2", 57 | "mocha": "^2.3.0" 58 | }, 59 | "keywords": [ 60 | "dox", 61 | "jsdox", 62 | "documentor", 63 | "documentation", 64 | "docs", 65 | "dox" 66 | ], 67 | "optionalDependencies": {} 68 | } 69 | -------------------------------------------------------------------------------- /bin/mr-doc: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | "use strict"; 4 | 5 | var program = require('commander'), 6 | version = require('../package').version, 7 | mrDoc = require('../src/mr-doc'), 8 | option = require('../src/option'), 9 | _ = require('lodash'), 10 | updateNotifier = require('update-notifier'), 11 | pkg = require('../package.json'), 12 | File = require('fs-extra'), 13 | Path = require('path'), 14 | osenv = require('osenv'); 15 | 16 | // Checks for available update and returns an instance 17 | var notifier = updateNotifier({ 18 | pkg: pkg 19 | }); 20 | 21 | // Notify using the built-in convenience method 22 | notifier.notify(); 23 | 24 | // Show the update if it exists 25 | if (notifier.update) console.log(notifier.update); 26 | 27 | /** 28 | * Options & Defaults 29 | */ 30 | var defaults = option().getDefaults(); 31 | /** 32 | * Variables 33 | */ 34 | var isCmd = false; 35 | 36 | program 37 | .version(version) 38 | .option('-d, --debug', 'Output parsed comments for debugging') 39 | .option('-t, --title ', 'The title for the page produced') 40 | .option('-s, --source ', 'The folder which should get parsed') 41 | .option('-i, --ignore ', 'The comma seperated list of directories to ignore. Default: ' + defaults.blacklist.toString()) 42 | .option('-T, --target ', 'The folder which will contain the results. Default: /docs') 43 | .option('-e, --extension ', 'The target files extension. Default: ' + defaults.extension) 44 | .option('-j, --template