How to use the jsdoc/fs.mkPath 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 almende / vis / docs / publish.js View on Github external
if (/publish.js$/.test(fileName)) return;   // Skip self
    if (/README.md$/.test(fileName)) return;   // Skip own README
    if (/\.tmpl$/.test(fileName)) return;       // Skip .tmpl files; these are used as partials only

    if (!/\.html$/.test(fileName)) {
      // Just plain copy over non-html files
      var tmpDir = fs.toDir(outFile);
      fs.mkPath(tmpDir);
      fs.copyFileSync(fileName, tmpDir);
      return;
    }
   
    // Render html files as templates 
    //console.log(relName);
    var html = renderer.partial(relName, {});
    fs.mkPath(fs.toDir(outFile));
    fs.writeFileSync(outFile, html, 'utf8');
  });
github Vincit / objection.js / jsdocTemplate / publish.js View on Github external
sourceFiles[sourcePath] = {
				resolved  : sourcePath,
				shortened : null
			};

			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 static files to outdir
	var fromDir = path.join( templatePath, 'static' ),
		staticFiles = fs.ls( fromDir, 3 );

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

	if ( sourceFilePaths.length ) {
		var payload = navOptions.sourceRootPath;
		if ( !payload ) {
			payload = path.commonPrefix( sourceFilePaths );
		}
github archilogic-com / 3dio-js / tasks / jsdoc / template / publish.js View on Github external
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
  var staticFileScanner
  if (conf.default.staticFiles) {
github hegemonic / jsdoc-baseline / lib / publishjob.js View on Github external
createOutputDirectory(relativePath) {
        const newPath = relativePath ?
            path.resolve(this.destination, relativePath) :
            this.destination;

        /* istanbul ignore else */
        if (!this.outputDirectories[newPath]) {
            logger.debug('Creating the output directory %s', newPath);
            fs.mkPath(newPath);
            this.outputDirectories[newPath] = true;
        }

        return this;
    }
github SAP / ui5-builder / lib / processors / jsdoc / lib / ui5 / template / publish.js View on Github external
if ( templateConf.uilib ) {
		api.library = templateConf.uilib;
	}

	api.symbols = [];
	// sort only a copy(!) of the symbols, otherwise the SymbolSet lookup is broken
	symbols.slice(0).sort(sortByAlias).forEach(function(symbol) {
		if ( isFirstClassSymbol(symbol) && !symbol.synthetic ) { // dump a symbol if it as a class symbol and if it is not a synthetic symbol
			api.symbols.push(createAPIJSON4Symbol(symbol, false));
		}
	});

	postProcessAPIJSON(api);
	validateAPIJSON(api);

	fs.mkPath(path.dirname(filename));
	fs.writeFileSync(filename, JSON.stringify(api), 'utf8');
	info("  apiJson saved as " + filename);
}
github allenhwkim / angularjs-google-maps / config / jsdoc / template / publish.js View on Github external
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;
    var staticFileScanner;
    if (conf['default'].staticFiles) {
github cuthbertLab / music21j / node_modules / jsdoc / templates / default / publish.js View on Github external
staticFiles.forEach(function(fileName) {
        var toDir = fs.toDir( fileName.replace(fromDir, outdir) );
        fs.mkPath(toDir);
        fs.copyFileSync(fileName, toDir);
    });
github GooTechnologies / goojs / tools / jsdoc-template / publish.js View on Github external
staticFiles.forEach(function(fileName) {
        var toDir = fs.toDir( fileName.replace(fromDir, outdir) );
        fs.mkPath(toDir);
        fs.copyFileSync(fileName, toDir);
    });
github nhn / tui.jsdoc-template / publish.js View on Github external
staticFiles.forEach(function(fileName) {
        var toDir = fs.toDir( fileName.replace(fromDir, outdir) );
        fs.mkPath(toDir);
        fs.copyFileSync(fileName, toDir);
    });