diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..42bab867 --- /dev/null +++ b/LICENSE @@ -0,0 +1,14 @@ + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + + Copyright (c) 2012 David Chambers + + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. diff --git a/README.markdown b/README.markdown index 5c76bf76..13a2b819 100644 --- a/README.markdown +++ b/README.markdown @@ -34,14 +34,18 @@ Math.product = (numbers...) -> Doctests needn't be indented, though there's no harm in being [Docco-friendly][2]. +### Running doctests + To run doctests, pass `doctest` paths to one or more "modules" to be tested. -Each path should be one of the following: +Doctests can be run from the command line or from a browser console: provide +local file system paths in the former case, URLs in the latter. Specifically, +each URL should be one of the following: - an absolute URL; e.g. "http://example.com/scripts/some-module.js" - a root-relative URL; e.g. "/scripts/some-module.js" - a path relative to doctest.js; e.g. "./some-module.js" -This can easily be done from a browser console: +For example: > doctest("../src/math-extensions.coffee") retrieving /scripts/lib/../src/math-extensions.coffee... @@ -164,6 +168,8 @@ MyApp.utils.bar = function() { ### Dependencies +The following libraries are required to run doctests from a browser console: + - [jQuery][3] - [Underscore][4] @@ -178,4 +184,4 @@ This runs doctest's test suite: first headless, then in a browser. [1]: http://docs.python.org/library/doctest.html [2]: http://bit.ly/LanyLq [3]: http://jquery.com/ -[4]: http://documentcloud.github.com/underscore/ +[4]: http://underscorejs.org/ diff --git a/lib/doctest.js b/lib/doctest.js index 3c9b5dd6..069d0071 100644 --- a/lib/doctest.js +++ b/lib/doctest.js @@ -31,7 +31,7 @@ module.exports = doctest; } - doctest.version = '0.3.0'; + doctest.version = '0.4.0'; doctest.queue = []; diff --git a/package.json b/package.json index 9f845e09..d42fcfc4 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,19 @@ { "name": "doctest", - "version": "0.3.0", + "version": "0.4.0", "description": "Quick and dirty doctests for JavaScript and CoffeeScript", + "author": "David Chambers ", + "keywords": ["doctests", "test", "browser"], "main": "./lib/doctest", "bin": "./bin/doctest", + "licenses": [{ + "type": "WTFPL", + "url": "https://raw.github.com/davidchambers/doctest/master/LICENSE" + }], + "repository": { + "type": "git", + "url": "https://github.com/davidchambers/doctest" + }, "dependencies": { "coffee-script": "1.4.x", "underscore": "1.4.x" diff --git a/src/doctest.coffee b/src/doctest.coffee index f5ea7688..b597e08b 100644 --- a/src/doctest.coffee +++ b/src/doctest.coffee @@ -20,7 +20,7 @@ else CoffeeScript = require 'coffee-script' module.exports = doctest -doctest.version = '0.3.0' +doctest.version = '0.4.0' doctest.queue = []