Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

transform-file.js 1.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.transformFileAsync = exports.transformFileSync = exports.transformFile = void 0;
  6. function _gensync() {
  7. const data = require("gensync");
  8. _gensync = function () {
  9. return data;
  10. };
  11. return data;
  12. }
  13. var _config = require("./config");
  14. var _transformation = require("./transformation");
  15. var fs = require("./gensync-utils/fs");
  16. ({});
  17. const transformFileRunner = _gensync()(function* (filename, opts) {
  18. const options = Object.assign({}, opts, {
  19. filename
  20. });
  21. const config = yield* (0, _config.default)(options);
  22. if (config === null) return null;
  23. const code = yield* fs.readFile(filename, "utf8");
  24. return yield* (0, _transformation.run)(config, code);
  25. });
  26. const transformFile = transformFileRunner.errback;
  27. exports.transformFile = transformFile;
  28. const transformFileSync = transformFileRunner.sync;
  29. exports.transformFileSync = transformFileSync;
  30. const transformFileAsync = transformFileRunner.async;
  31. exports.transformFileAsync = transformFileAsync;