Extend 'File' with new behaviour
@param {Class} File
@param {Object} utils
@returns {Class}
179076
function define (File, utils) {
  const { debug, error, strong } = utils.cnsl;
  const { sourceMapCommentStrip } = utils.string;

  return class TYPESCRIPTFile extends File {
    /**
     * Compile file contents
     * @param {Object} buildOptions
     *  - {Boolean} batch
     *  - {Boolean} bootstrap
     *  - {Boolean} boilerplate
     *  - {Boolean} browser
     *  - {Boolean} bundle
     *  - {Boolean} compress
     *  - {Array} ignoredFiles
     *  - {Boolean} helpers
     *  - {Boolean} watchOnly
     * @param {Function} fn(err)
     * @returns {null}
     */
    compile (buildOptions, fn) {
      try {
        const compilerOptions = Object.assign(
          this.hasMaps ? { sourceMap: true, inlineSourceMap: false } : {},
          DEFAULT_COMPILER_OPTIONS,
          (this.options.pluginOptions.typescript && this.options.pluginOptions.typescript.compilerOptions) || {}
        );
        const options = {
          fileName: this.relpath,
          compilerOptions
        };
        const result = ts.transpileModule(this.content, options);

        this.setContent(sourceMapCommentStrip(result.outputText));
        if (result.sourceMapText) this.setMap(result.sourceMapText);
        debug(`compile: ${strong(this.relpath)}`, 4);
      } catch (err) {
        if (!this.options.runtimeOptions.watch) return fn(err);
        error(err, 4, false);
      }
      fn();
    }
  };
}
1134537
function resolveFile(file) {
  const files = [file];
  const fileDir = path.dirname(require.resolve(file));
  const fileData = fs.readFileSync(file).toString();
  const regexp = /require\(['|"](.*)['|"]\)/g;

  while (regexp.exec(fileData) !== null) {
    const moduleFile = RegExp.$1;
    if (!isNativeModule(moduleFile)) {
      const modulePath = path.join(fileDir, moduleFile);
      files.push(require.resolve(modulePath));
    }
  }

  return files;
}
1364070
function hasFileWithHigherPriorityExtension(file, literalFiles, wildcardFiles, extensions, keyMapper) {
        var extensionPriority = ts.getExtensionPriority(file, extensions);
        var adjustedExtensionPriority = ts.adjustExtensionPriority(extensionPriority);
        for (var i = 0 /* Highest */; i < adjustedExtensionPriority; i++) {
            var higherPriorityExtension = extensions[i];
            var higherPriorityPath = keyMapper(ts.changeExtension(file, higherPriorityExtension));
            if (higherPriorityPath in literalFiles || higherPriorityPath in wildcardFiles) {
                return true;
            }
        }
        return false;
    }
1076968
function(file) {
        var self = this;

        return new Promise(function(resolve) {
            fs.readFileAsync(file, 'utf-8')
                .then(function(content) {
                    return self._parseFile(file, content);
                })
                .then(function(ast) {
                    return self._getConfig(file, ast);
                })
                .then(function(config) {
                    self._modules = self._modules.concat(config);

                    resolve(config);
                });
        });
    }
596981
function File(file, options) {
  file = file || {};
  this.file = file;
  this.options = file.options || options || {};
  this.type = this.file.type;
  this.origPath = file.origPath;

  // Record path change
  var history = file.path ? [file.path] : file.history;
  this.history = history || [];

  this.cwd = file.cwd || process.cwd();
  this.base = file.base || this.cwd;

  // Stat = files stats object
  this.stat = file.stat || null;
  this._isFile = true;
}
1105438
function define(File, utils) {
  return class JSFile extends File {
    /**
     * Constructor
     * @param {String} id
     * @param {String} filepath
     * @param {Object} options
     *  - {Boolean} browser
     *  - {Function} buildFactory
     *  - {FileCache} fileCache
     *  - {Object} fileExtensions
     *  - {Function} fileFactory
     *  - {Number} level
     *  - {Array} npmModulepaths
     *  - {Object} pluginOptions
     *  - {ResolverCache} resolverCache
     *  - {Object} runtimeOptions
     *  - {String} webroot
     */
    constructor(id, filepath, options) {
      super(id, filepath, 'js', options);

      /* set via super call:
      this.isBuddyBuilt = false;
      this.isBuilt = false;
      */
      this.workflows.standard = WORKFLOW_STANDARD;
      this.workflows.inlineable = WORKFLOW_INLINEABLE;
      this.workflows.writeable = WORKFLOW_WRITEABLE;

      this.depth = 0;
      this.dynamicDependencyReferences = [];
      this.isCircularDependency = false;
      this.isNpmModule = this.options.npmModulepaths
        ? this.options.npmModulepaths.some(modulepath => this.filepath.includes(modulepath))
        : false;
      // Transpile all non-npm modules unless module looks like es6
      RE_TRANSPILE.lastIndex = 0;
      this.shouldTranspile = this.isNpmModule ? RE_TRANSPILE.test(this.content) : true;
      this.transpiledContent = '';
      this.transpiledFingerprint = '';
      this.transpiledMap = null;
    }

    /**
     * Retrieve flattened dependency tree
     * @returns {Array}
     */
    getAllDependencies() {
      if (!this.allDependencies) {
        this.allDependencies = sort(this);
      }

      const filteredDependencies = this.getAllDependencyReferences()
        .filter(reference => {
          return (
            !reference.isIgnored &&
            reference.file &&
            !reference.file.isLocked &&
            reference.file.type != 'json' &&
            this.allDependencies.includes(reference.file)
          );
        })
        .map(reference => reference.file);

      return this.allDependencies.filter(dependency => filteredDependencies.includes(dependency));
    }

    /**
     * Add dynamic 'dependencies'
     * @param {Array} dependencies
     */
    addDynamicDependencies(dependencies) {
      const { fileFactory } = this.options;
      const resolveOptions = {
        browser: this.options.browser,
        cache: this.options.resolverCache,
        fileExtensions: this.options.fileExtensions
      };

      dependencies.forEach(dependency => {
        const filepath = resolve(this.filepath, dependency.id, resolveOptions);

        // Unable to resolve filepath or create instance
        if (filepath === '') {
          warn(`dynamic import ${strong(dependency.id)} for ${strong(this.relpath)} not found`, this.options.level);
          return;
        }

        const file = (dependency.file = fileFactory(filepath, this.options));

        this.dynamicDependencyReferences.push(dependency);
        if (this.options.buildFactory) this.options.buildFactory(filepath, `${file.idSafe}-%hash%.${file.extension}`);
      });
    }

    /**
     * Read file content
     * @returns {String|Buffer}
     */
    readFileContent() {
      let content = super.readFileContent();

      this.isBuddyBuilt = RE_BUDDY_BUILT.test(content);
      this.isBuilt = RE_UMD_BUILT.test(content);

      if (this.isBuilt) content = flattenUMD(content, `$m['${this.id}']`);
      if (this.isBuddyBuilt) content = concat.unwrap(content, this.id);

      return content;
    }

    /**
     * Hash 'content'
     * @param {Boolean} forWrite
     * @returns {String}
     */
    hashContent(forWrite = false) {
      return forWrite
        ? md5(
            // TODO: add header
            [this, ...this.getAllDependencies()]
              .reduce((contents, file) => {
                contents.push(file.content);
                // Include hashes of dynamic builds which are not yet inlined
                if (file.dynamicDependencyReferences.length > 0) {
                  contents.push(...file.dynamicDependencyReferences.map(ref => ref.file.writeHash));
                }
                return contents;
              }, [])
              .join('')
          )
        : md5(this.content || this.fileContent);
    }

    /**
     * Read and store file contents
     * @param {Object} buildOptions
     *  - {Boolean} batch
     *  - {Boolean} bootstrap
     *  - {Boolean} boilerplate
     *  - {Boolean} browser
     *  - {Boolean} bundle
     *  - {Boolean} compress
     *  - {Boolean} helpers
     *  - {Array} ignoredFiles
     *  - {Boolean} import
     *  - {Boolean} watchOnly
     * @param {Function} fn(err)
     */
    load(buildOptions, fn) {
      super.load(buildOptions, err => {
        if (err) return fn && fn();

        RE_STRICT.lastIndex = 0;
        if (buildOptions && buildOptions.bundle && RE_STRICT.test(this.content)) {
          this.setContent(this.content.replace(RE_STRICT, ''));
        }

        if (fn) fn();
      });
    }

    /**
     * Parse file contents for dependency references
     * @param {Object} buildOptions
     *  - {Boolean} batch
     *  - {Boolean} bootstrap
     *  - {Boolean} boilerplate
     *  - {Boolean} browser
     *  - {Boolean} bundle
     *  - {Boolean} compress
     *  - {Boolean} helpers
     *  - {Array} ignoredFiles
     *  - {Boolean} import
     *  - {Boolean} watchOnly
     * @param {Function} fn(err)
     * @returns {null}
     */
    parse(buildOptions, fn) {
      if (
        this.isBuddyBuilt ||
        this.isBuilt ||
        // Don't parse input file dependencies if not bundling
        (!buildOptions.bundle && this.isDependency)
      ) {
        return fn();
      }

      const [requires, imports, dynamicImports] = this.parseDependencyReferences(this.content);

      this.addDynamicDependencies(dynamicImports);
      super.addDependencies(requires.concat(imports), buildOptions);

      debug(`parse: ${strong(this.relpath)}`, 4);
      fn();
    }

    /**
     * Parse 'content' for dependency references
     * @param {String} content
     * @returns {Array}
     */
    parseDependencyReferences(content) {
      return parse(content);
    }

    /**
     * Compile file contents [no-op]
     * @param {Object} buildOptions
     *  - {Boolean} batch
     *  - {Boolean} bootstrap
     *  - {Boolean} boilerplate
     *  - {Boolean} browser
     *  - {Boolean} bundle
     *  - {Boolean} compress
     *  - {Boolean} helpers
     *  - {Array} ignoredFiles
     *  - {Boolean} import
     *  - {Boolean} watchOnly
     * @param {Function} fn(err)
     */
    compile(buildOptions, fn) {
      debug(`compile: ${strong(this.relpath)}`, 4);
      fn();
    }

    /**
     * Replace process.env references with values
     * @param {Object} buildOptions
     *  - {Boolean} batch
     *  - {Boolean} bootstrap
     *  - {Boolean} boilerplate
     *  - {Boolean} browser
     *  - {Boolean} bundle
     *  - {Boolean} compress
     *  - {Boolean} helpers
     *  - {Array} ignoredFiles
     *  - {Boolean} import
     *  - {Boolean} watchOnly
     * @param {Function} fn(err)
     * @returns {null}
     */
    replaceEnvironment(buildOptions, fn) {
      if (this.isBuddyBuilt || this.isBuilt) return fn();
      // Force on server when compressed/deploy
      this.setContent(replaceEnvironment(this.content, buildOptions.compress ? true : buildOptions.browser));
      debug(`replace environment vars: ${strong(this.relpath)}`, 4);
      fn();
    }

    /**
     * Transpile file contents
     * @param {Object} buildOptions
     *  - {Boolean} batch
     *  - {Boolean} bootstrap
     *  - {Boolean} boilerplate
     *  - {Boolean} browser
     *  - {Boolean} bundle
     *  - {Boolean} compress
     *  - {Boolean} helpers
     *  - {Array} ignoredFiles
     *  - {Boolean} import
     *  - {Boolean} watchOnly
     * @param {Function} fn(err)
     * @returns {null}
     */
    transpile(buildOptions, fn) {
      if (this.isBuddyBuilt || this.isBuilt) {
        this.transpiledContent = this.content;
        if (this.hasMaps) this.transpiledMap = sourceMap.clone(this.map);
        return fn();
      }

      const babelOptions = this.options.pluginOptions.babel;
      const babelOptionsFingerprint = this.options.pluginOptions.babelFingerprint;
      const fingerprintableBuildOptions = Object.assign({}, buildOptions);

      delete fingerprintableBuildOptions.ignoredFiles;

      const buildOptionsFingerprint = md5(JSON.stringify(fingerprintableBuildOptions));
      const moduleString = `$m['${this.id}']`;
      let plugins = babelOptions.plugins.slice();
      let optionsFingerprint = babelOptionsFingerprint;

      if (!this.shouldTranspile) {
        plugins = [];
        optionsFingerprint = '';
      }
      // Flatten if bundling
      if (buildOptions.bundle) {
        const data = {
          // Do not replace 'module.exports' for writeable Node files
          replace: buildOptions.browser ? true : !this.isWriteable(buildOptions.batch),
          source: {
            moduleExports: moduleString,
            namespace: `${this.idSafe}__`
          }
        };

        plugins.push([babelPluginTransformFlatten, data]);
        optionsFingerprint += md5(`${data.replace}`);
      }

      const contentFingerprint = md5(JSON.stringify(this.content));
      const options = Object.assign({}, babelOptions, {
        babelrc: false,
        filename: this.relUrl,
        plugins,
        sourceMaps: this.hasMaps,
        sourceFileName: this.hasMaps ? this.relUrl : null
      });
      const transpiledFingerprint = `${contentFingerprint}:${optionsFingerprint}:${buildOptionsFingerprint}`;

      // Skip transpile if same fingerprint as previous
      if (transpiledFingerprint == this.transpiledFingerprint && this.transpiledContent) {
        this.content = this.transpiledContent;
        this.map = this.transpiledMap;
      } else {
        try {
          if (this.hasMaps) options.inputSourceMap = this.map.toJSON();
          const { code: content, map } = transpile(this.content, options);

          this.transpiledContent = content;
          this.setContent(content);
          if (map) {
            this.setMap(map);
            this.transpiledMap = sourceMap.clone(this.map);
          }
          debug(`transpile: ${strong(this.relpath)}`, 4);
        } catch (err) {
          if (this.options.runtimeOptions.watch) {
            error(err, 4, false);
          } else {
            fn(err);
          }
        }
      }

      this.transpiledFingerprint = transpiledFingerprint;

      fn();
    }

    /**
     * Inline json/disabled dependency content
     * @param {Object} buildOptions
     *  - {Boolean} batch
     *  - {Boolean} bootstrap
     *  - {Boolean} boilerplate
     *  - {Boolean} browser
     *  - {Boolean} bundle
     *  - {Boolean} compress
     *  - {Boolean} helpers
     *  - {Array} ignoredFiles
     *  - {Boolean} import
     *  - {Boolean} watchOnly
     * @param {Function} fn(err)
     */
    inline(buildOptions, fn) {
      [...this.getAllDependencies(), this].forEach(file => {
        if (file.isBuddyBuilt || file.isBuilt) return;
        file.setContent(inline(file.content, file.dependencyReferences, buildOptions.browser));
        debug(`inline: ${strong(file.relpath)}`, 4);
      });
      fn();
    }

    /**
     * Reparse transpiled file contents to account for possibly removed dependencies
     * @param {Object} buildOptions
     *  - {Boolean} batch
     *  - {Boolean} bootstrap
     *  - {Boolean} boilerplate
     *  - {Boolean} browser
     *  - {Boolean} bundle
     *  - {Boolean} compress
     *  - {Boolean} helpers
     *  - {Array} ignoredFiles
     *  - {Boolean} import
     *  - {Boolean} watchOnly
     * @param {Function} fn(err)
     * @returns {null}
     */
    reparse(buildOptions, fn) {
      if (this.isDummy) return fn();

      [this, ...this.getAllDependencies()].forEach(file => {
        if (file.isBuddyBuilt || file.isBuilt) return;

        const [requires, imports, dynamicImports] = this.parseDependencyReferences(file.content);
        const referencesById = file.dependencyReferences.reduce((referencesById, dependency) => {
          referencesById[dependency.id] = dependency;
          return referencesById;
        }, {});
        const dynamicReferencesById = file.dynamicDependencyReferences.reduce((dynamicReferencesById, dependency) => {
          dynamicReferencesById[dependency.id] = dependency;
          return dynamicReferencesById;
        }, {});

        file.allDependencies = null;
        file.allDependencyReferences = null;
        file.dependencies = [];
        file.dependencyReferences = [];
        file.dynamicDependencyReferences = [];

        requires.concat(imports).forEach(dependency => {
          const originalReference = referencesById[dependency.id];

          // Can only have fewer not more references, so compare to original collection and reuse props
          if (originalReference) {
            dependency.isDisabled = originalReference.isDisabled;
            dependency.isIgnored = originalReference.isIgnored;
            file.dependencyReferences.push(dependency);
            if (originalReference.file) {
              dependency.file = originalReference.file;
              dependency.file.depth = 0;
              dependency.file.isCircularDependency = false;
              file.dependencies.push(dependency.file);
            }
          }
        });
        dynamicImports.forEach(dependency => {
          const originalReference = dynamicReferencesById[dependency.id];

          if (originalReference) {
            dependency.file = originalReference.file;
            file.dynamicDependencyReferences.push(dependency);
          }
        });

        debug(`reparse: ${strong(file.relpath)}`, 4);
      });
      fn();
    }

    /**
     * Replace relative dependency references with fully resolved
     * @param {Object} buildOptions
     *  - {Boolean} batch
     *  - {Boolean} bootstrap
     *  - {Boolean} boilerplate
     *  - {Boolean} browser
     *  - {Boolean} bundle
     *  - {Boolean} compress
     *  - {Boolean} helpers
     *  - {Array} ignoredFiles
     *  - {Boolean} import
     *  - {Boolean} watchOnly
     * @param {Function} fn(err)
     */
    rewriteDirnameFilename(buildOptions, fn) {
      [...this.getAllDependencies(), this].forEach(file => {
        if (file.isBuddyBuilt) return;
        file.setContent(rewriteDirnameFilename(file.content, path.dirname(this.writepath), file.filepath));
        debug(`replace __dirname/__filename references: ${strong(file.relpath)}`, 4);
      });
      fn();
    }

    /**
     * Replace relative dependency references with fully resolved
     * @param {Object} buildOptions
     *  - {Boolean} batch
     *  - {Boolean} bootstrap
     *  - {Boolean} boilerplate
     *  - {Boolean} browser
     *  - {Boolean} bundle
     *  - {Boolean} compress
     *  - {Boolean} helpers
     *  - {Array} ignoredFiles
     *  - {Boolean} import
     *  - {Boolean} watchOnly
     * @param {Function} fn(err)
     */
    replaceReferences(buildOptions, fn) {
      [...this.getAllDependencies(), this].forEach(file => {
        if (file.isBuddyBuilt || file.isBuilt) return;
        file.setContent(replaceReferences(file.content, file.dependencyReferences));
        debug(`replace dependency references: ${strong(file.relpath)}`, 4);
      });
      fn();
    }

    /**
     * Replace dynamic dependency references with fully resolved
     * @param {Object} buildOptions
     *  - {Boolean} batch
     *  - {Boolean} bootstrap
     *  - {Boolean} boilerplate
     *  - {Boolean} browser
     *  - {Boolean} bundle
     *  - {Boolean} compress
     *  - {Boolean} helpers
     *  - {Array} ignoredFiles
     *  - {Boolean} import
     *  - {Boolean} watchOnly
     * @param {Function} fn(err)
     */
    replaceDynamicReferences(buildOptions, fn) {
      [this, ...this.getAllDependencies()].forEach(file => {
        if (file.isBuilt) return;
        file.setContent(replaceDynamicReferences(file.content, buildOptions.browser, file.dynamicDependencyReferences));
        debug(`replace dynamic dependency references: ${strong(file.relpath)}`, 4);
      });
      fn();
    }

    /**
     * Concatenate file contents
     * @param {Object} buildOptions
     *  - {Boolean} batch
     *  - {Boolean} bootstrap
     *  - {Boolean} boilerplate
     *  - {Boolean} browser
     *  - {Boolean} bundle
     *  - {Boolean} compress
     *  - {Boolean} helpers
     *  - {Array} ignoredFiles
     *  - {Boolean} import
     *  - {Boolean} watchOnly
     * @param {Function} fn(err)
     */
    concat(buildOptions, fn) {
      concat(this, HEADER, buildOptions);
      debug(`concat: ${strong(this.relpath)}`, 4);
      fn();
    }

    /**
     * Rollback to transpiled state
     */
    rollback() {
      this.content = this.transpiledContent;
      this.map = this.transpiledMap;
    }

    /**
     * Reset content
     * @param {Boolean} hard
     */
    reset(hard) {
      super.reset(hard);
      this.depth = 0;
      this.dynamicDependencyReferences = [];
      this.isCircularDependency = false;
      if (hard) {
        this.transpiledContent = '';
        this.transpiledFingerprint = '';
        this.transpiledMap = null;
      }
    }
  };
}
1372115
function processFile(extension) {
  return (file, callback) => {
    let filePath;
    if (file.meta !== undefined && file.meta.filePath !== undefined) {
      const ext = extension === null
        ? file.meta.filePath.ext
        : extension;
      filePath = path.format(Object.assign({}, file.meta.filePath, { ext }));
    } else {
      filePath = extension === undefined
        ? file.path
        : `${trimExtension(file.path)}${extension}`;
    }

    async.nextTick(callback, null, Object.assign({}, file, { path: filePath }));
  };
}
1318945
public void addFile(File file) {
        if (file != null && file.exists()) {
            try {
                classPath.add(file.toURI().toURL());
            } catch (MalformedURLException e) {
                throw new AssertionError("converting an existing file to an url should have never thrown an exception!");
            }
        }
    }
645391
function makeDir(file) {
  return new Promise((resolve, reject) => {
    mkdirp(path.extname(file) ? path.dirname(file) : file, (err) => {
      if (err) reject(err);
      resolve();
    });
  });
}
45318
function (file) {
                var _this = this;
                return new Promise(function (resolve, reject) {
                    return __awaiter(_this, void 0, void 0, function () {
                        var imageSrc, err_3, img;
                        var _this = this;
                        return __generator(this, function (_a) {
                            switch (_a.label) {
                                case 0:
                                    _a.trys.push([0, 2, , 3]);
                                    return [4 /*yield*/, readFile()];
                                case 1:
                                    imageSrc = _a.sent();
                                    return [3 /*break*/, 3];
                                case 2:
                                    err_3 = _a.sent();
                                    reject(err_3);
                                    return [3 /*break*/, 3];
                                case 3:
                                    img = new Image();
                                    img.onload = function () {
                                        return __awaiter(_this, void 0, void 0, function () {
                                            var ctx, width, _a;
                                            return __generator(this, function (_b) {
                                                switch (_b.label) {
                                                    case 0:
                                                        // set edited image canvas and dimensions
                                                        this.editedImage = ( /** @type {?} */(document.createElement('canvas')));
                                                        this.editedImage.width = img.width;
                                                        this.editedImage.height = img.height;
                                                        ctx = this.editedImage.getContext('2d');
                                                        ctx.drawImage(img, 0, 0);
                                                        // resize image if larger than max image size
                                                        width = img.width > img.height ? img.height : img.width;
                                                        if (!(width > this.options.maxImageDimensions.width))
                                                            return [3 /*break*/, 2];
                                                        _a = this;
                                                        return [4 /*yield*/, this.resize(this.editedImage)];
                                                    case 1:
                                                        _a.editedImage = _b.sent();
                                                        _b.label = 2;
                                                    case 2:
                                                        this.imageDimensions.width = this.editedImage.width;
                                                        this.imageDimensions.height = this.editedImage.height;
                                                        this.setPreviewPaneDimensions(this.editedImage);
                                                        resolve();
                                                        return [2 /*return*/];
                                                }
                                            });
                                        });
                                    };
                                    img.src = imageSrc;
                                    return [2 /*return*/];
                            }
                        });
                    });
                });
                /**
                 * read file from input field
                 * @return {?}
                 */
                function readFile() {
                    return new Promise(function (resolve, reject) {
                        /** @type {?} */
                        var reader = new FileReader();
                        reader.onload = function (event) {
                            resolve(reader.result);
                        };
                        reader.onerror = function (err) {
                            reject(err);
                        };
                        reader.readAsDataURL(file);
                    });
                }
            }
851693
function createFile(file) {
    fs.ensureFileSync(file.name);
    fs.writeFileSync(file.name, file.source);
    return;
}
835954
function parseFile(fs, file, type) {
    var filepath = file.getPath();
    var parser = file.getParser();

    if (!parser) {
        return Promise.reject(
            error.FileNotParsableError({
                filename: filepath
            })
        );
    }

    return fs.readAsString(filepath)
    .then(function(content) {
        if (type === 'readme') {
            return parser.parseReadme(content);
        } else if (type === 'glossary') {
            return parser.parseGlossary(content);
        } else if (type === 'summary') {
            return parser.parseSummary(content);
        } else if (type === 'langs') {
            return parser.parseLanguages(content);
        } else {
            throw new Error('Parsing invalid type "' + type + '"');
        }
    })
    .then(function(result) {
        return [
            file,
            result
        ];
    });
}
515172
function writeFile (file, callback) {
  fs.outputFile(path.resolve(this._destination, path.join(file.path.dir, file.path.name + file.path.ext)), file.content, function (err) {
    if (err) callback(err);
    callback(null);
  });
}
178663
function getUrl (file) {

            if (!that.ignore(file)) {
                file = that.map(file);
                file = utils.normalize(file);
                return file;
            }
        }
159352
function jslintFile(file, extraArgs) {
    return readConf(homeDir, {})
        .then(function (homeConf) {
            if (Array.isArray(file)) {
                return file.reduce(function (prom, file) {
                    return prom.then(function (oldReport) {
                        return jslintFile(file, extraArgs)
                            .then(function (newReport) {
                                return oldReport.concat(newReport);
                            });
                    });
                }, Promise.resolve([]));
            }
            return readFile(file, "utf8")
                .then(function (data) {
                    const opts = (
                        typeof extraArgs === "object" && extraArgs !== null
                    )
                        ? extraArgs
                        : {};
                    const projectDir = opts.projectDir || process.cwd();
                    return readConf(projectDir, path.dirname(file), homeConf)
                        .then(function (conf) {
                            const newConf = Object.assign(
                                {},
                                conf,
                                opts.options
                            );
                            const lines = Array.isArray(data)
                                ? data
                                : data.split(/\n|\r\n?/);
                            const sb = opts.shaBang
                                ? lines[0].startsWith("#!")
                                    ? [""].concat(lines.slice(1))
                                    : lines
                                : lines;
                            const report = {
                                pathname: file,
                                report: jslint(sb, newConf, opts.globals)
                            };

                            return typeof opts.callback === "function"
                                ? opts.callback(report)
                                : report;
                        });
                });
        });
}
261734
function define(File, utils) {
  return class JSONFile extends File {
    /**
     * Constructor
     * @param {String} id
     * @param {String} filepath
     * @param {Object} options
     *  - {Function} buildFactory
     *  - {Object} fileCache
     *  - {Object} fileExtensions
     *  - {Function} fileFactory
     *  - {Array} npmModulepaths
     *  - {Object} pluginOptions
     *  - {Object} runtimeOptions
     *  - {String} webroot
     */
    constructor(id, filepath, options) {
      super(id, filepath, 'json', options);

      this.hasMaps = false;
      this.map = null;
      this.workflows.standard = WORKFLOW_STANDARD;
      // No processing required
      this.workflows.inlineable = [];
    }

    /**
     * Parse file contents for dependency references [no-op]
     * @param {Object} buildOptions
     *  - {Boolean} batch
     *  - {Boolean} bootstrap
     *  - {Boolean} boilerplate
     *  - {Boolean} browser
     *  - {Boolean} bundle
     *  - {Boolean} compress
     *  - {Boolean} helpers
     *  - {Array} ignoredFiles
     *  - {Boolean} import
     *  - {Boolean} watchOnly
     * @param {Function} fn(err)
     */
    parse(buildOptions, fn) {
      debug(`parse: ${strong(this.relpath)}`, 4);
      fn();
    }
  };
}
1333831
function requireJSPath(file, extension) {
	return path.join(path.dirname(file), path.basename(file, extension)).replace(/\\/g, '/');
}