plugin-features.js 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. const es2015 = {
  2. "check-es2015-constants": {
  3. features: [
  4. "const",
  5. ],
  6. },
  7. "transform-es2015-arrow-functions": {
  8. features: [
  9. "arrow functions",
  10. ],
  11. },
  12. "transform-es2015-block-scoped-functions": {
  13. features: [
  14. "block-level function declaration"
  15. ],
  16. },
  17. "transform-es2015-block-scoping": {
  18. features: [
  19. "const",
  20. "let",
  21. ],
  22. },
  23. "transform-es2015-classes": {
  24. features: [
  25. "class",
  26. "super",
  27. ],
  28. },
  29. "transform-es2015-computed-properties": {
  30. features: [
  31. "object literal extensions / computed properties",
  32. ],
  33. },
  34. "transform-es2015-destructuring": {
  35. features: [
  36. "destructuring, assignment",
  37. "destructuring, declarations",
  38. "destructuring, parameters",
  39. ],
  40. },
  41. "transform-es2015-duplicate-keys": {
  42. features: [
  43. "miscellaneous / duplicate property names in strict mode",
  44. ],
  45. },
  46. "transform-es2015-for-of": {
  47. features: [
  48. "for..of loops",
  49. ],
  50. },
  51. "transform-es2015-function-name": {
  52. features: [
  53. "function \"name\" property",
  54. ]
  55. },
  56. "transform-es2015-literals": {
  57. features: [
  58. "Unicode code point escapes",
  59. ],
  60. },
  61. "transform-es2015-object-super": {
  62. features: [
  63. "super",
  64. ],
  65. },
  66. "transform-es2015-parameters": {
  67. features: [
  68. "default function parameters",
  69. "rest parameters",
  70. ],
  71. },
  72. "transform-es2015-shorthand-properties": {
  73. features: [
  74. "object literal extensions / shorthand properties",
  75. ],
  76. },
  77. "transform-es2015-spread": {
  78. features: [
  79. "spread (...) operator",
  80. ],
  81. },
  82. "transform-es2015-sticky-regex": {
  83. features: [
  84. "RegExp \"y\" and \"u\" flags / \"y\" flag, lastIndex",
  85. "RegExp \"y\" and \"u\" flags / \"y\" flag",
  86. ],
  87. },
  88. "transform-es2015-template-literals": {
  89. features: [
  90. "template literals",
  91. ],
  92. },
  93. "transform-es2015-typeof-symbol": {
  94. features: [
  95. "Symbol / typeof support"
  96. ],
  97. },
  98. "transform-es2015-unicode-regex": {
  99. features: [
  100. "RegExp \"y\" and \"u\" flags / \"u\" flag, case folding",
  101. "RegExp \"y\" and \"u\" flags / \"u\" flag, Unicode code point escapes",
  102. "RegExp \"y\" and \"u\" flags / \"u\" flag",
  103. ],
  104. },
  105. "transform-regenerator": {
  106. features: [
  107. "generators",
  108. ],
  109. }
  110. };
  111. const es2016 = {
  112. "transform-exponentiation-operator": {
  113. features: [
  114. "exponentiation (**) operator",
  115. ],
  116. }
  117. };
  118. const es2017 = {
  119. "transform-async-to-generator": {
  120. features: [
  121. "async functions",
  122. ],
  123. },
  124. "syntax-trailing-function-commas": {
  125. features: [
  126. "trailing commas in function syntax",
  127. ],
  128. }
  129. };
  130. module.exports = Object.assign({}, es2015, es2016, es2017);