index.js
function(inDir, outDir, relativePath, newCache) {
    var ext = this._matchingFileExtension(relativePath);
    var moduleName = relativePath.slice(0, relativePath.length - (ext.length + 1));
    var fullInputPath = path.join(inDir, relativePath);
    var fullOutputPath = path.join(outDir, moduleName + '.' + this.targetExtension);

    var entry = this._transpileThroughCache(
      moduleName,
      fs.readFileSync(fullInputPath, 'utf-8'),
      newCache
    );

    mkdirp.sync(path.dirname(fullOutputPath));
    fs.writeFileSync(fullOutputPath, entry.output);
  }
function(inDir, outDir, relativePath, newCache) {
    var ext = this._matchingFileExtension(relativePath);
    var moduleName = relativePath.slice(0, relativePath.length - (ext.length + 1));
    var fullInputPath = path.join(inDir, relativePath);
    var fullOutputPath = path.join(outDir, moduleName + '.' + this.targetExtension);

    var entry = this._transpileThroughCache(
      moduleName,
      fs.readFileSync(fullInputPath, 'utf-8'),
      newCache
    );

    mkdirp.sync(path.dirname(fullOutputPath));
    fs.writeFileSync(fullOutputPath, entry.output);
  }
function ( inDir , outDir , relativePath , newCache ) { var ext = this . _matchingFileExtension ( relativePath ) ; var moduleName = relativePath . slice ( 0 , relativePath . length - ( ext . length + 1 ) ) ; var fullInputPath = path . join ( inDir , relativePath ) ; var fullOutputPath = path . join ( outDir , moduleName + '.' + this . targetExtension ) ; var entry = this . _transpileThroughCache ( moduleName , fs . readFileSync ( fullInputPath , 'utf-8' ) , newCache ) ; mkdirp . sync ( path . dirname ( fullOutputPath ) ) ; fs . writeFileSync ( fullOutputPath , entry . output ) ; }
Normalizes module name, input path, and output path
then calls transpileThroughCache to get a transpiled
version of the ES6 source.
Normalizes module name input path and output path then calls transpileThroughCache to get a transpiled version of the ES6 source .