保誠-保戶業務員媒合平台
Tomas
2022-05-19 957a1f10a06fdbb76f1a0ba94fe44126c613fee3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
"use strict";
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.transformFileAsync = exports.transformFileSync = exports.transformFile = void 0;
 
function _gensync() {
  const data = require("gensync");
 
  _gensync = function () {
    return data;
  };
 
  return data;
}
 
var _config = require("./config");
 
var _transformation = require("./transformation");
 
var fs = require("./gensync-utils/fs");
 
({});
 
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;