Skip to content

Commit

Permalink
core unit tests completed, test task added to Cakefile, absolute opti…
Browse files Browse the repository at this point in the history
…on added for parsing links
  • Loading branch information
neocotic committed Dec 11, 2012
1 parent cc3f4a7 commit 6f72d5b
Show file tree
Hide file tree
Showing 17 changed files with 444 additions and 233 deletions.
11 changes: 10 additions & 1 deletion Cakefile
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,13 @@ task 'docs', 'Create documentation', ->
console.log 'Generating documentation...'
exec "docco -o #{DOCS_DIR} #{SRC_PATH}", (err) ->
throw err if err
finish 'Documentation created!'
finish 'Documentation created!'

task 'test', 'Run test suite', ->
console.log 'Running tests...'
exec 'npm test', (err, stdout) ->
if stdout
console.log stdout
finish if err? then 'Tests failed!' else 'Tests completed!'
else if err?
throw err
2 changes: 1 addition & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Follow these steps to build [html.md][];
4. For the compiled JavaScript `cd` to the repository directory and enter `cake build`
* Outputs `md.js` to the `lib` directory
* Outputs `md.min.js` (optimised version) to the `dist` directory
5. To run the full test suite enter `npm test`
5. To run the full test suite enter `cake test`
6. To update the documentation enter `cake docs`
* Outputs documentation to the `docs` directory
* Not currently working on Windows as it uses linux shell commands
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ $ npm install html-md
Usage: md [options] [ -e html | file.html ] [arguments]
Options:
-a, --absolute always use absolute URLs for links
-d, --debug print additional debug information
-e, --eval pass a string from the command line as input
-h, --help display this help information
Expand Down Expand Up @@ -79,6 +80,10 @@ The following options are recognised by this method (all of which are optional);
<th>Property</th>
<th>Description</th>
</tr>
<tr>
<td>absolute</td>
<td>All links are parsed with absolute URLs</td>
</tr>
<tr>
<td>debug</td>
<td>Prepends additional debug information to the Markdown output</td>
Expand Down
2 changes: 2 additions & 0 deletions bin/md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ R_HIDDEN = /^\.|~$/
R_HTML_EXT = /\.s?html?$/i
# Available options/switches.
SWITCHES = [
['-a', '--absolute', 'always use absolute URLs for links']
['-d', '--debug', 'print additional debug information']
['-e', '--eval', 'pass a string from the command line as input']
['-h', '--help', 'display this help information']
Expand All @@ -41,6 +42,7 @@ extension = '.md'
# Options, including their defaults, possibly changed by flags passed in at
# runtime.
opts =
absolute: no
arguments: []
debug: no
eval: no
Expand Down
2 changes: 1 addition & 1 deletion dist/md.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 6f72d5b

Please sign in to comment.