Skip to content

Commit

Permalink
Added main class api doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitaly Puzrin committed Dec 27, 2014
1 parent 8470c1c commit a2bc2d2
Show file tree
Hide file tree
Showing 7 changed files with 296 additions and 42 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules/
coverage/
demo/
apidoc/
*.log
25 changes: 25 additions & 0 deletions .ndocrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#
# Common nodeca config
################################################################################

--index "./README.md"
--package "./package.json"
--gh-ribbon "{package.homepage}"
--output "apidoc"
--render "html"
--link-format "{package.homepage}/blob/master/{file}#L{line}"
--broken-links "show"


#
# Paths with sources
################################################################################

lib


#
# Project specific configuration
################################################################################

--show-all
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ benchmark/
coverage/
demo/
docs/
apidoc/
support/
test/
Makefile
Expand Down
13 changes: 11 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ lint:
eslint --reset .

test: lint
NODE_ENV=test mocha -R spec
mocha -R spec
echo "CommonMark stat:\n"
./support/specsplit.js test/fixtures/commonmark/spec.txt

Expand All @@ -55,6 +55,15 @@ coverage:
test-ci: lint
istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage

apidoc:
@if test ! `which ndoc` ; then \
echo "You need 'ndoc' installed in order to generate docs." >&2 ; \
echo " $ npm install -g ndoc" >&2 ; \
exit 128 ; \
fi
rm -rf ./apidoc
ndoc --link-format "{package.homepage}/blob/${CURR_HEAD}/{file}#L{line}"

publish:
@if test 0 -ne `git status --porcelain | wc -l` ; then \
echo "Unclean working tree. Commit or stash changes first." >&2 ; \
Expand Down Expand Up @@ -87,5 +96,5 @@ todo:
grep 'TODO' -n -r ./lib 2>/dev/null || test true


.PHONY: publish lint test gh-pages todo demo coverage
.PHONY: publish lint test gh-pages todo demo coverage apidoc
.SILENT: help lint test todo
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ var md = window.markdownit();
console.log(md.render('# markdown-it rulezz!'));
```

Single lines rendering, without paragraph wrap:
Single line rendering, without paragraph wrap:

```js
var md = require('markdown-it')();
Expand All @@ -88,7 +88,7 @@ active syntax rules and options for common use cases.
all rules enabled, but still without html, typographer & autolinker.
- [default](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/default.js) -
when no preset name given.
- [zero](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/zero.js) -
- ["zero"](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/zero.js) -
all rules disabled (useful to quickly setup your config via `.enable()`).


Expand Down
1 change: 1 addition & 0 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"coverage",
"demo",
"docs",
"apidoc",
"lib",
"node_modules",
"support",
Expand Down
Loading

0 comments on commit a2bc2d2

Please sign in to comment.