Sha256: 61515dc73f17acc91267dee73917220a954b94f893d4843f5e393453194b5dbe

Contents?: true

Size: 2 KB

Versions: 4

Compression:

Stored size: 2 KB

Contents

"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.transformFileAsync = exports.transformFileSync = exports.transformFile = void 0;

var _config = _interopRequireDefault(require("./config"));

var _transformation = require("./transformation");

var fs = _interopRequireWildcard(require("./gensync-utils/fs"));

function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

const gensync = require("gensync");

({});
const transformFileRunner = gensync(function* (filename, opts) {
  const options = Object.assign({}, opts, {
    filename
  });
  const config = yield* (0, _config.default)(options);
  if (config === null) return null;
  const code = yield* fs.readFile(filename, "utf8");
  return yield* (0, _transformation.run)(config, code);
});
const transformFile = transformFileRunner.errback;
exports.transformFile = transformFile;
const transformFileSync = transformFileRunner.sync;
exports.transformFileSync = transformFileSync;
const transformFileAsync = transformFileRunner.async;
exports.transformFileAsync = transformFileAsync;

Version data entries

4 entries across 3 versions & 2 rubygems

Version Path
groonga-client-model-6.0.0 test/apps/rails6.0.3.5/node_modules/@babel/core/lib/transform-file.js
groonga-client-model-6.0.0 test/apps/rails6.1.3/node_modules/@babel/core/lib/transform-file.js
ruby2js-4.0.4 lib/tasks/testrails/node_modules/@babel/core/lib/transform-file.js
ruby2js-4.0.3 lib/tasks/testrails/node_modules/@babel/core/lib/transform-file.js