mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
use Node.js shims
This commit is contained in:
parent
1c1ce62a0e
commit
81a8a81526
@ -7,6 +7,8 @@
|
||||
@license Apache License 2.0 - See file 'LICENSE.md' in this project.
|
||||
*/
|
||||
|
||||
var path = require('path');
|
||||
|
||||
/** @private */
|
||||
function setDocletKindToTitle(doclet, tag) {
|
||||
doclet.addTag( 'kind', tag.title );
|
||||
@ -33,9 +35,8 @@ function setDocletDescriptionToValue(doclet, tag) {
|
||||
|
||||
function setNameToFile(doclet, tag) {
|
||||
if (doclet.meta.filename) {
|
||||
var name = 'file:';
|
||||
if (doclet.meta.path) { name += doclet.meta.path + java.lang.System.getProperty("file.separator"); }
|
||||
doclet.addTag( 'name', name + doclet.meta.filename );
|
||||
var name = doclet.meta.path || '';
|
||||
doclet.addTag( 'name', path.join(name, doclet.meta.filename) );
|
||||
}
|
||||
}
|
||||
|
||||
@ -60,7 +61,8 @@ function applyNamespace(docletOrNs, tag) {
|
||||
}
|
||||
|
||||
function setDocletNameToFilename(doclet, tag) {
|
||||
var name = (doclet.meta.path ? (doclet.meta.path + java.lang.System.getProperty("file.separator")) : "") + doclet.meta.filename;
|
||||
var name = doclet.meta.path || '';
|
||||
name = path.join(name, doclet.meta.filename);
|
||||
name = name.replace(/\.js$/i, '');
|
||||
|
||||
for (var i = 0, len = env.opts._.length; i < len; i++) {
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
|
||||
var isWindows = java.lang.System.getProperty("os.name").toLowerCase().contains("windows");
|
||||
var fileSeparator = exports.sep = java.lang.System.getProperty("file.separator");
|
||||
var fileSeparator = exports.sep = String( java.lang.System.getProperty("file.separator") );
|
||||
|
||||
/**
|
||||
* Returns everything on a path except for the last item
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user