Browse files

core unit tests completed, test task added to Cakefile, absolute opti…

…on added for parsing links
  • Loading branch information...
1 parent cc3f4a7 commit 6f72d5b35f172080aac890d4f78b47170abe71d1 @neocotic committed Dec 11, 2012
@@ -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
@@ -10,7 +10,7 @@ Follow these steps to build [][];
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
@@ -28,6 +28,7 @@ $ npm install html-md
Usage: md [options] [ -e html | file.html ] [arguments]
+ -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
@@ -80,6 +81,10 @@ The following options are recognised by this method (all of which are optional);
+ <td>absolute</td>
+ <td>All links are parsed with absolute URLs</td>
+ </tr>
+ <tr>
<td>Prepends additional debug information to the Markdown output</td>
2 bin/md
@@ -24,6 +24,7 @@ R_HIDDEN = /^\.|~$/
R_HTML_EXT = /\.s?html?$/i
# Available options/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']
@@ -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

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 6f72d5b

Please sign in to comment.