Skip to content

Commit b013198

Browse files
authored
Merge pull request #12 from neogeek/1.0.0
1.0.0
2 parents 77aa000 + e9d575d commit b013198

34 files changed

+810
-1854
lines changed

.bithoundrc

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"ignore": [
3+
"**/test/**"
4+
],
5+
"test": [
6+
"**/test/**"
7+
],
8+
"dependencies": {
9+
"unused-ignores": [
10+
"chalk",
11+
"doxdox-parser-dox",
12+
"doxdox-plugin-bootstrap",
13+
"doxdox-plugin-handlebars",
14+
"doxdox-plugin-markdown",
15+
"globby",
16+
"parse-cmd-args"
17+
]
18+
}
19+
}

.eslintrc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"extends": [
3+
"@neogeek/eslint-config-standards"
4+
],
5+
"rules": {
6+
"global-require": 0,
7+
"no-catch-shadow": 0,
8+
"no-param-reassign": 0,
9+
"no-sync": 0
10+
}
11+
}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
node_modules/
2+
3+
coverage/

.npmignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1+
coverage/
12
test/
23

4+
.bithoundrc
5+
.eslintrc
6+
37
.travis.yml
48

59
Makefile

.travis.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
language: node_js
22
node_js:
3-
- "0.10"
4-
- "0.12"
5-
- "4.0"
6-
- "5.0"
3+
- "4"
4+
- "5"
5+
- "6"
6+
before_install:
7+
- if [[ `npm -v` != 3* ]]; then npm i -g npm@3; fi
8+
after_success:
9+
- bash <(curl -s https://codecov.io/bash)
710
sudo: false

CONTRIBUTING.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Contributing
2+
3+
## Reporting Issues
4+
5+
If you have found a bug in `doxdox` please consider the following when submitting an issue:
6+
7+
- **Search existing [GitHub Issues](https://github.com/neogeek/doxdox/issues)** - The bug you are experiencing might have already been reported or even fixed in an unreleased version of `doxdox` so be sure to review both [open](https://github.com/neogeek/doxdox/issues?state=open) and [closed](https://github.com/neogeek/doxdox/issues?state=closed) issues.
8+
- **Create a reproducible test case** - To make it easier for maintainers to validate the issue please include a [gist](https://gist.github.com/) containing files used to reproduce the issue.
9+
- **Include relevant information** - Include clear steps to reproduce the issue.
10+
11+
## Pull Requests
12+
13+
Before submitting a pull request, be sure that the following requirements are meet:
14+
15+
- Additional tests have been added to validate the changes.
16+
- Relevant documentation has been added.
17+
- The build passes.
18+
- There are no `eslint` errors using the included `.eslintrc` configuration.
19+
20+
## Code Style
21+
22+
- Use semicolons.
23+
- Soft indent with 4 spaces.
24+
- Always use camelCase.
25+
- Prefer `'` over `"`.
26+
- `'use strict';`
27+
- Prefer strict equals `===` unless type coercion is needed.
28+
- No trailing whitespace.
29+
- Maintain newline at EOF.
30+
31+
## License
32+
33+
By contributing to `doxdox` you agree that your contributions fall under the same license, [The MIT License (MIT)](LICENSE).

DOCUMENTATION.md

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
# [doxdox](https://github.com/neogeek/doxdox) *1.0.0*
2+
3+
> JSDoc to Bootstrap and Markdown documentation generator.
4+
5+
6+
### lib/doxdox.js
7+
8+
9+
#### parseInput(input, config)
10+
11+
Parse an input file with parser.
12+
13+
parseInput('src/main.js', {'parser': 'dox'}).then(files => {});
14+
15+
16+
17+
18+
##### Parameters
19+
20+
- **input** `String` File to parse.
21+
- **config** `Object` Configuration object.
22+
- **config.parser** `String` String representing the parser to be used.
23+
24+
25+
26+
27+
##### Returns
28+
29+
30+
- `Object` Promise
31+
32+
33+
34+
#### parseInputs(inputs, config)
35+
36+
Parse array of directory globs and/or files, and then render the parsed data through the defined layout plugin.
37+
38+
parseInputs(['src/main.js'], {'parser': 'dox', 'layout': 'markdown'}).then(content => {});
39+
40+
41+
42+
43+
##### Parameters
44+
45+
- **inputs** `Array` Array of directory globs and/or files.
46+
- **config** `Object` Configuration object.
47+
- **config.parser** `String` String representing the parser to be used.
48+
- **config.layout** `String` String representing the layout plugin to be used.
49+
50+
51+
52+
53+
##### Returns
54+
55+
56+
- `Object` Promise
57+
58+
59+
60+
61+
### lib/loaders.js
62+
63+
64+
#### loadParser(config) *private method*
65+
66+
Load parser based on user defined choice.
67+
68+
loadParser({'parser': 'dox'}).then(parser => {});
69+
70+
71+
72+
73+
##### Parameters
74+
75+
- **config** `Object` Configuration object.
76+
- **config.parser** `String` String representing the parser to be loaded.
77+
78+
79+
80+
81+
##### Returns
82+
83+
84+
- `Object` Promise
85+
86+
87+
88+
#### loadPlugin(config) *private method*
89+
90+
Load layout plugin based on user defined choice.
91+
92+
loadPlugin({'layout': 'markdown'}).then(plugin => {});
93+
loadPlugin({'layout': 'templates/README.hbs'}).then(plugin => {});
94+
95+
96+
97+
98+
##### Parameters
99+
100+
- **config** `Object` Configuration object.
101+
- **config.layout** `String` String representing the layout plugin to be loaded.
102+
103+
104+
105+
106+
##### Returns
107+
108+
109+
- `Object` Promise
110+
111+
112+
113+
114+
### lib/utils.js
115+
116+
117+
#### findPackageFileInPath([input])
118+
119+
Finds package.json file from either the directory the script was called from or a supplied path.
120+
121+
console.log(findPackageFileInPath());
122+
console.log(findPackageFileInPath('./package.json'));
123+
console.log(findPackageFileInPath('~/git/github/doxdox/'));
124+
125+
126+
127+
128+
##### Parameters
129+
130+
- **input** `String` *Optional* Directory or file.
131+
132+
133+
134+
135+
##### Returns
136+
137+
138+
- `String` Path to package.json file.
139+
140+
141+
142+
143+
*Documentation generated with [doxdox](https://github.com/neogeek/doxdox).*

Makefile

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,22 @@
1+
BIN=node_modules/.bin
2+
13
test:
2-
./node_modules/.bin/mocha
4+
make lint
5+
$(BIN)/mocha test/specs/
6+
7+
lint:
8+
$(BIN)/eslint bin/doxdox
9+
$(BIN)/eslint lib/
10+
$(BIN)/eslint index.js
11+
$(BIN)/eslint 'test/specs/**/*.js'
12+
13+
coverage:
14+
$(BIN)/istanbul cover $(BIN)/_mocha test/specs && $(BIN)/codecov
15+
16+
fixtures:
17+
bin/doxdox lib/doxdox.js --output test/fixtures/doxdox.md --package lib/
18+
19+
docs:
20+
bin/doxdox 'lib/**/*.js' -p package.json -l markdown -o DOCUMENTATION.md
321

4-
.PHONY: test
22+
.PHONY: test coverage

0 commit comments

Comments
 (0)