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.

index.js 1000B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = void 0;
  6. var _helperPluginUtils = require("@babel/helper-plugin-utils");
  7. function removePlugin(plugins, name) {
  8. const indices = [];
  9. plugins.forEach((plugin, i) => {
  10. const n = Array.isArray(plugin) ? plugin[0] : plugin;
  11. if (n === name) {
  12. indices.unshift(i);
  13. }
  14. });
  15. for (const i of indices) {
  16. plugins.splice(i, 1);
  17. }
  18. }
  19. var _default = (0, _helperPluginUtils.declare)((api, {
  20. isTSX
  21. }) => {
  22. api.assertVersion(7);
  23. return {
  24. name: "syntax-typescript",
  25. manipulateOptions(opts, parserOpts) {
  26. const {
  27. plugins
  28. } = parserOpts;
  29. removePlugin(plugins, "flow");
  30. removePlugin(plugins, "jsx");
  31. parserOpts.plugins.push("typescript", "classProperties");
  32. {
  33. parserOpts.plugins.push("objectRestSpread");
  34. }
  35. if (isTSX) {
  36. parserOpts.plugins.push("jsx");
  37. }
  38. }
  39. };
  40. });
  41. exports.default = _default;