How to use the canonical-path.extname function in canonical-path

To help you get started, we’ve selected a few canonical-path 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 angular / dgeni-packages / base / processors / read-files.js View on Github external
function createFileInfo(file, content, sourceInfo, fileReader, basePath) {
  return {
    fileReader: fileReader.name,
    filePath: file,
    baseName: path.basename(file, path.extname(file)),
    extension: path.extname(file).replace(/^\./, ''),
    basePath: sourceInfo.basePath,
    relativePath: path.relative(sourceInfo.basePath, file),
    projectRelativePath: path.relative(basePath, file),
    content: content
  };
}
github angular / dgeni-packages / ngdoc / file-readers / ngdoc.spec.js View on Github external
var createFileInfo = function(file, content, basePath) {
    return {
      fileReader: fileReader.name,
      filePath: file,
      baseName: path.basename(file, path.extname(file)),
      extension: path.extname(file).replace(/^\./, ''),
      basePath: basePath,
      relativePath: path.relative(basePath, file),
      content: content
    };
  };
github angular / dgeni-packages / base / processors / read-files.js View on Github external
function createFileInfo(file, content, sourceInfo, fileReader) {
  return {
    fileReader: fileReader.name,
    filePath: file,
    baseName: path.basename(file, path.extname(file)),
    extension: path.extname(file).replace(/^\./, ''),
    basePath: sourceInfo.basePath,
    relativePath: path.relative(sourceInfo.basePath, file),
    content: content
  };
}
github angular / angular / docs / docs-package / readers / ngdoc.spec.js View on Github external
var createFileInfo = function(file, content, basePath) {
    return {
      fileReader: fileReader.name,
      filePath: file,
      baseName: path.basename(file, path.extname(file)),
      extension: path.extname(file).replace(/^\./, ''),
      basePath: basePath,
      relativePath: path.relative(basePath, file),
      content: content
    };
  };
github angular / dgeni-packages / base / processors / read-files.js View on Github external
function createFileInfo(file, content, sourceInfo, fileReader) {
  return {
    fileReader: fileReader.name,
    filePath: file,
    baseName: path.basename(file, path.extname(file)),
    extension: path.extname(file).replace(/^\./, ''),
    basePath: sourceInfo.basePath,
    relativePath: path.relative(sourceInfo.basePath, file),
    content: content
  };
}
github Quramy / generator-ngdoc / app / templates / docs / lib / bowerCommonFiles.js View on Github external
}).map(function (file) {
    return {
      ext: path.extname(file),
      path: options.base + '/' + file
    };
  }).forEach(function (file) {
    if (file.ext === '.js') {
github angular / angular / aio / tools / transforms / content-package / readers / content.spec.js View on Github external
var createFileInfo = function(file, content, basePath) {
    return {
      fileReader: fileReader.name,
      filePath: file,
      baseName: path.basename(file, path.extname(file)),
      extension: path.extname(file).replace(/^\./, ''),
      basePath: basePath,
      relativePath: path.relative(basePath, file),
      content: content
    };
  };
github angular / dgeni-packages / jsdoc / file-readers / jsdoc.spec.js View on Github external
var createFileInfo = function(file, content, basePath) {
    return {
      fileReader: fileReader.name,
      filePath: file,
      baseName: path.basename(file, path.extname(file)),
      extension: path.extname(file).replace(/^\./, ''),
      basePath: basePath,
      relativePath: path.relative(basePath, file),
      content: content
    };
  };
github angular / angular / tools / docs / content-package / readers / content.spec.js View on Github external
var createFileInfo = function(file, content, basePath) {
    return {
      fileReader: fileReader.name,
      filePath: file,
      baseName: path.basename(file, path.extname(file)),
      extension: path.extname(file).replace(/^\./, ''),
      basePath: basePath,
      relativePath: path.relative(basePath, file),
      content: content
    };
  };
github angular / dgeni-packages / typescript / src / services / TsParser / getFileInfo.ts View on Github external
export function getFileInfo(symbol: Symbol, basePath: string) {
  const fileName = symbol.declarations![0].getSourceFile().fileName;
  const file = path.resolve(basePath, fileName);
  return {
    filePath: file,
    baseName: path.basename(file, path.extname(file)),
    extension: path.extname(file).replace(/^\./, ''),
    basePath: basePath,
    relativePath: fileName,
    projectRelativePath: path.relative(basePath, file)
  };
}

canonical-path

paths that always use forward slashes

MIT
Latest version published 6 years ago

Package Health Score

50 / 100
Full package analysis