Merge pull request #4163 from tschaub/node-four
Fixes for building with Node 4.x.
This commit is contained in:
@@ -16,7 +16,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"plugins": [
|
"plugins": [
|
||||||
"node_modules/jsdoc/plugins/markdown",
|
"node_modules/jsdoc-fork/plugins/markdown",
|
||||||
"config/jsdoc/api/plugins/inheritdoc",
|
"config/jsdoc/api/plugins/inheritdoc",
|
||||||
"config/jsdoc/api/plugins/typedefs",
|
"config/jsdoc/api/plugins/typedefs",
|
||||||
"config/jsdoc/api/plugins/events",
|
"config/jsdoc/api/plugins/events",
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ exports.defineTags = function(dictionary) {
|
|||||||
doclet.stability = level;
|
doclet.stability = level;
|
||||||
} else {
|
} else {
|
||||||
var errorText = util.format('Invalid stability level (%s) in %s line %s', tag.text, doclet.meta.filename, doclet.meta.lineno);
|
var errorText = util.format('Invalid stability level (%s) in %s line %s', tag.text, doclet.meta.filename, doclet.meta.lineno);
|
||||||
require('jsdoc/util/error').handle( new Error(errorText) );
|
require('jsdoc-fork/lib/jsdoc/util/error').handle( new Error(errorText) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
/*global env: true */
|
/*global env: true */
|
||||||
var template = require('jsdoc/template'),
|
var template = require('jsdoc-fork/lib/jsdoc/template'),
|
||||||
fs = require('jsdoc/fs'),
|
fs = require('jsdoc-fork/lib/jsdoc/fs'),
|
||||||
path = require('jsdoc/path'),
|
path = require('jsdoc-fork/lib/jsdoc/path'),
|
||||||
taffy = require('taffydb').taffy,
|
taffy = require('taffydb').taffy,
|
||||||
handle = require('jsdoc/util/error').handle,
|
handle = require('jsdoc-fork/lib/jsdoc/util/error').handle,
|
||||||
helper = require('jsdoc/util/templateHelper'),
|
helper = require('jsdoc-fork/lib/jsdoc/util/templateHelper'),
|
||||||
_ = require('underscore'),
|
_ = require('underscore'),
|
||||||
htmlsafe = helper.htmlsafe,
|
htmlsafe = helper.htmlsafe,
|
||||||
linkto = helper.linkto,
|
linkto = helper.linkto,
|
||||||
@@ -350,8 +350,8 @@ exports.publish = function(taffyData, opts, tutorials) {
|
|||||||
var staticFileScanner;
|
var staticFileScanner;
|
||||||
if (conf['default'].staticFiles) {
|
if (conf['default'].staticFiles) {
|
||||||
staticFilePaths = conf['default'].staticFiles.paths || [];
|
staticFilePaths = conf['default'].staticFiles.paths || [];
|
||||||
staticFileFilter = new (require('jsdoc/src/filter')).Filter(conf['default'].staticFiles);
|
staticFileFilter = new (require('jsdoc-fork/lib/jsdoc/src/filter')).Filter(conf['default'].staticFiles);
|
||||||
staticFileScanner = new (require('jsdoc/src/scanner')).Scanner();
|
staticFileScanner = new (require('jsdoc-fork/lib/jsdoc/src/scanner')).Scanner();
|
||||||
|
|
||||||
staticFilePaths.forEach(function(filePath) {
|
staticFilePaths.forEach(function(filePath) {
|
||||||
var extraStaticFiles = staticFileScanner.scan([filePath], 10, staticFileFilter);
|
var extraStaticFiles = staticFileScanner.scan([filePath], 10, staticFileFilter);
|
||||||
|
|||||||
@@ -6,11 +6,14 @@ var assert = require('assert');
|
|||||||
var fs = require('fs');
|
var fs = require('fs');
|
||||||
var path = require('path');
|
var path = require('path');
|
||||||
|
|
||||||
|
var Promise = require('bluebird');
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Publish hook for the JSDoc template. Writes to JSON stdout.
|
* Publish hook for the JSDoc template. Writes to JSON stdout.
|
||||||
* @param {function} data The root of the Taffy DB containing doclet records.
|
* @param {function} data The root of the Taffy DB containing doclet records.
|
||||||
* @param {Object} opts Options.
|
* @param {Object} opts Options.
|
||||||
|
* @return {Promise} A promise that resolves when writing is complete.
|
||||||
*/
|
*/
|
||||||
exports.publish = function(data, opts) {
|
exports.publish = function(data, opts) {
|
||||||
|
|
||||||
@@ -168,13 +171,17 @@ exports.publish = function(data, opts) {
|
|||||||
return (symbol.name in augments || symbol.virtual);
|
return (symbol.name in augments || symbol.virtual);
|
||||||
});
|
});
|
||||||
|
|
||||||
process.stdout.write(
|
return new Promise(function(resolve, reject) {
|
||||||
JSON.stringify({
|
|
||||||
symbols: symbols,
|
process.stdout.write(
|
||||||
defines: defines,
|
JSON.stringify({
|
||||||
typedefs: typedefs,
|
symbols: symbols,
|
||||||
externs: externs,
|
defines: defines,
|
||||||
base: base
|
typedefs: typedefs,
|
||||||
}, null, 2));
|
externs: externs,
|
||||||
|
base: base
|
||||||
|
}, null, 2), resolve);
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
+16
-5
@@ -26,14 +26,15 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"async": "0.9.0",
|
"async": "0.9.0",
|
||||||
|
"bluebird": "^2.10.1",
|
||||||
"browserify": "9.0.3",
|
"browserify": "9.0.3",
|
||||||
"derequire": "2.0.2",
|
|
||||||
"closure-util": "1.8.0",
|
"closure-util": "1.8.0",
|
||||||
|
"derequire": "2.0.2",
|
||||||
"fs-extra": "0.12.0",
|
"fs-extra": "0.12.0",
|
||||||
"glob": "5.0.3",
|
"glob": "5.0.3",
|
||||||
"graceful-fs": "3.0.2",
|
"graceful-fs": "3.0.2",
|
||||||
"handlebars": "3.0.1",
|
"handlebars": "3.0.1",
|
||||||
"jsdoc": "3.3.2",
|
"jsdoc-fork": "^4.0.0-beta.1",
|
||||||
"marked": "0.3.5",
|
"marked": "0.3.5",
|
||||||
"metalsmith": "1.6.0",
|
"metalsmith": "1.6.0",
|
||||||
"metalsmith-templates": "0.7.0",
|
"metalsmith-templates": "0.7.0",
|
||||||
@@ -66,8 +67,18 @@
|
|||||||
},
|
},
|
||||||
"ext": [
|
"ext": [
|
||||||
"rbush",
|
"rbush",
|
||||||
{"module": "pbf", "browserify": true},
|
{
|
||||||
{"module": "pixelworks", "browserify": true},
|
"module": "pbf",
|
||||||
{"module": "vector-tile", "name": "vectortile", "browserify": true}
|
"browserify": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"module": "pixelworks",
|
||||||
|
"browserify": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"module": "vector-tile",
|
||||||
|
"name": "vectortile",
|
||||||
|
"browserify": true
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user