fix(gen-docs): require files without touching PATH

So that it works on latest revision of node...
New version of Node (v0.5.x) does not support require.paths.push().
This commit is contained in:
Vojta Jina
2011-10-17 15:26:10 -07:00
committed by Igor Minar
parent 833eb3c844
commit 8978e066b5
10 changed files with 17 additions and 23 deletions

View File

@@ -1,10 +1,8 @@
require.paths.push(__dirname);
require.paths.push('lib');
var reader = require('reader.js'),
ngdoc = require('ngdoc.js'),
writer = require('writer.js'),
SiteMap = require('SiteMap.js').SiteMap,
appCache = require('appCache.js').appCache,
var reader = require('./reader.js'),
ngdoc = require('./ngdoc.js'),
writer = require('./writer.js'),
SiteMap = require('./SiteMap.js').SiteMap,
appCache = require('./appCache.js').appCache,
Q = require('qq');
process.on('uncaughtException', function(err) {

View File

@@ -2,9 +2,9 @@
* All parsing/transformation code goes here. All code here should be sync to ease testing.
*/
var Showdown = require('showdown').Showdown;
var DOM = require('dom.js').DOM;
var htmlEscape = require('dom.js').htmlEscape;
var Showdown = require('../../lib/showdown').Showdown;
var DOM = require('./dom.js').DOM;
var htmlEscape = require('./dom.js').htmlEscape;
var NEW_LINE = /\n\r?/;
exports.trim = trim;

View File

@@ -5,8 +5,7 @@
exports.collect = collect;
require.paths.push(__dirname);
var ngdoc = require('ngdoc.js'),
var ngdoc = require('./ngdoc.js'),
Q = require('qq'),
qfs = require('q-fs');

View File

@@ -2,7 +2,6 @@
* All writing related code here. This is so that we can separate the async code from sync code
* for testability
*/
require.paths.push(__dirname);
var qfs = require('q-fs');
var Q = require('qq');
var OUTPUT_DIR = "build/docs/";