Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nuke underscore #34

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions lib/markdox.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var dox = require('dox')
, fs = require('fs')
, util = require('util')
, ejs = require('ejs')
, u = require('underscore')
, ul = require('ul')
, path = require('path');

/*!
Expand Down Expand Up @@ -62,7 +62,7 @@ exports.process = function (files, options, callback) {
callback = callback || function() {};
options = options || {};

options = u.defaults(options, {
options = ul.merge(options, {
output: false
, encoding: 'utf-8'
, formatter: formatter
Expand Down Expand Up @@ -136,12 +136,12 @@ exports.parse = function(filepath, options, callback) {
callback = callback || function() {};
options = options || {};

options = u.defaults(options, {
options = ul.merge(options, {
encoding: 'utf-8'
, compiler: compiler
});

options.dox = u.defaults(options.dox || {}, {
options.dox = ul.merge(options.dox, {
raw: true
});

Expand Down Expand Up @@ -171,7 +171,7 @@ exports.generate = function(docfiles, options, callback) {
callback = callback || function() {};
options = options || {};

options = u.defaults(options, {
options = ul.merge(options, {
template: exports.defaultTemplate
, encoding: 'utf-8'
});
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
, "commander": ">= 0.6.0"
, "async": ">= 0.1.18"
, "ejs": ">= 0.7.2 <2.0.0"
, "underscore": ">= 1.3.3"
, "coffee-script": ">= 1.3.3"
, "ul": "5.0.0"
, "iced-coffee-script": ">= 1.3.3d"
}
, "devDependencies": {
Expand All @@ -21,12 +21,12 @@
, "bin": { "markdox": "./bin/markdox" }
, "keywords": ["documentation", "dox", "markdown"]
, "repository": {
"type": "git",
"type": "git",
"url": "https://[email protected]/cbou/markdox.git"
}
, "main": "index"
, "license": "MIT"
, "scripts": {
, "scripts": {
"documentation": "bin/markdox -o doc/api.md lib/markdox.js"
, "test": "./node_modules/mocha/bin/mocha test/*-test.js"
, "examples": "node examples/example.js"
Expand Down
8 changes: 3 additions & 5 deletions test/random-order-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,22 @@ var assert = require('assert');
var should = require('should');
var markdox = require('../index');
var async = require('async');
var _ = require('underscore');

describe('Markdox', function(){
it('always render the documentation in the same order', function(done){
var file = __dirname + '/fixtures/random-order.coffee';
var result;

async.eachSeries(_.range(50), function(item, callback) {
async.eachSeries(new Array(50).join(".").split(".").map(function (c, i) { return i; }), function(item, callback) {
markdox.process(file, function(err, output){
if (!result) {
result = output;
}

result.should.equal(output);
callback();
});
}, function() {
done();
});
})
})
})