source: trip-planner-front/node_modules/@babel/core/lib/transform-file.js

Last change on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.0 KB
Line 
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.transformFileAsync = exports.transformFileSync = exports.transformFile = void 0;
7
8function _gensync() {
9 const data = require("gensync");
10
11 _gensync = function () {
12 return data;
13 };
14
15 return data;
16}
17
18var _config = require("./config");
19
20var _transformation = require("./transformation");
21
22var fs = require("./gensync-utils/fs");
23
24({});
25
26const transformFileRunner = _gensync()(function* (filename, opts) {
27 const options = Object.assign({}, opts, {
28 filename
29 });
30 const config = yield* (0, _config.default)(options);
31 if (config === null) return null;
32 const code = yield* fs.readFile(filename, "utf8");
33 return yield* (0, _transformation.run)(config, code);
34});
35
36const transformFile = transformFileRunner.errback;
37exports.transformFile = transformFile;
38const transformFileSync = transformFileRunner.sync;
39exports.transformFileSync = transformFileSync;
40const transformFileAsync = transformFileRunner.async;
41exports.transformFileAsync = transformFileAsync;
Note: See TracBrowser for help on using the repository browser.