How to use the jsdoc/path.join function in jsdoc

To help you get started, we’ve selected a few jsdoc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github OpenGeoscience / geojs / jsdoc / template / publish.js View on Github external
function generate(title, docs, filename, resolveLinks) {
    resolveLinks = resolveLinks === false ? false : true;

    var docData = {
        filename: filename,
        title: title,
        docs: docs
    };

    var outpath = path.join(outdir, filename),
        html = view.render('container.tmpl', docData);

    if (resolveLinks) {
        html = helper.resolveLinks(html); // turn {@link foo} into <a href="foodoc.html">foo</a>

        // Add a link target for external links @davidshimjs
        html = html.toString().replace(/]*href\s*=\s*['"]*[^\s'"]*:\/\/)/ig, '
github Aymkdn / SharepointPlus / jsdoc_template / publish.js View on Github external
if (doclet.meta) {
      sourcePath = getPathFromDoclet(doclet);
      sourceFiles[sourcePath] = {
        resolved: sourcePath,
        shortened: null
      };
      if (sourceFilePaths.indexOf(sourcePath) === -1) {
        sourceFilePaths.push(sourcePath);
      }
    }
  });

  // update outdir if necessary, then create outdir
  var packageInfo = ( find({kind: 'package'}) || [] ) [0];
  if (packageInfo && packageInfo.name) {
    outdir = path.join( outdir, packageInfo.name, (packageInfo.version || '') );
  }
  fs.mkPath(outdir);

  // copy the template's static files to outdir
  var fromDir = path.join(templatePath, 'static');
  var staticFiles = fs.ls(fromDir, 3);

  staticFiles.forEach(function(fileName) {
    var toDir = fs.toDir( fileName.replace(fromDir, outdir) );
    fs.mkPath(toDir);
    fs.copyFileSync(fileName, toDir);
  });

  // copy user-specified static files to outdir
  var staticFilePaths;
  var staticFileFilter;
github Sjeiti / TinySort / _oldrem / jsdoc / template / publish.js View on Github external
function generate( docType, title, docs, filename, resolveLinks ) {
	resolveLinks = resolveLinks === false ? false : true;

	var docData = {
		title   : title,
		docs    : docs,
		docType : docType
	};

	var outpath = path.join( outdir, filename ),
		html = view.render( 'container.tmpl', docData );//+JSON.stringify(docData);

	if ( resolveLinks ) {
		html = helper.resolveLinks( html ); // turn {@link foo} into <a href="foodoc.html">foo</a>
	}

	fs.writeFileSync( outpath, html, 'utf8' );
}
github lowlighter / astar / docs / .spotlight / src / publish.js View on Github external
function getPathFromDoclet(doclet) {
    if (!doclet.meta) {
        return null;
    }

    return doclet.meta.path && doclet.meta.path !== 'null' ?
        path.join(doclet.meta.path, doclet.meta.filename) :
        doclet.meta.filename;
}
github SAP / openui5-fhir / lib / jsdoc / plugin / publish.js View on Github external
function getPathFromDoclet(doclet) {
  if (!doclet.meta) {
    return null
  }

  return doclet.meta.path && doclet.meta.path !== "null"
    ? path.join(doclet.meta.path, doclet.meta.filename)
    : doclet.meta.filename
}
github googlearchive / npm-publish-scripts / src / themes / jsdoc / publish.js View on Github external
function getPathFromDoclet(doclet) {
    if (!doclet.meta) {
        return null;
    }

    return doclet.meta.path && doclet.meta.path !== 'null' ?
        path.join(doclet.meta.path, doclet.meta.filename) :
        doclet.meta.filename;
}
github SAP / openui5 / lib / jsdoc / ui5 / template / publish.js View on Github external
files.forEach(function(localFileName) {
			var file = path.join(templateConf.apiJsonFolder, localFileName);
			try {
				var sJSON = fs.readFileSync(file, 'UTF-8');
				var data = JSON.parse(sJSON);
				if ( !Array.isArray(data.symbols) ) {
					throw new TypeError("api.json does not contain a 'symbols' array");
				}
				data.symbols.forEach(function(symbol) {
					debug("  adding external symbol " + symbol.name);
					externalSymbols[symbol.name] = symbol;
				});
			} catch (e) {
				error("failed to load symbols from  " + file + ": " + (e.message || e));
			}
		});
	}
github jsdoc / jsdoc / templates / default / publish.js View on Github external
function getPathFromDoclet(doclet) {
    if (!doclet.meta) {
        return;
    }

    return doclet.meta.path && doclet.meta.path !== 'null' ?
        path.join(doclet.meta.path, doclet.meta.filename) :
        doclet.meta.filename;
}
github pentaho / pentaho-platform-plugin-common-ui / impl / client / src / doc / javascript / template / vizApi / publish.js View on Github external
function getPathFromDoclet(doclet) {
    if (!doclet.meta) {
        return null;
    }

    return doclet.meta.path && doclet.meta.path !== 'null' ?
        path.join(doclet.meta.path, doclet.meta.filename) :
        doclet.meta.filename;
}
github jidesoft / jidejs / jsdoc / jidejs / publish.js View on Github external
function getPathFromDoclet(doclet) {
    if (!doclet.meta) {
        return;
    }

    return doclet.meta.path && doclet.meta.path !== 'null' ?
        path.join(doclet.meta.path, doclet.meta.filename) :
        doclet.meta.filename;
}