mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-23 11:37:38 +08:00
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:
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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');
|
||||
|
||||
|
||||
@@ -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/";
|
||||
|
||||
Reference in New Issue
Block a user