diff --git a/packages/babel-preset-stage-0/README.md b/packages/babel-preset-stage-0/README.md index d4b75530bd80..a50b87e0734e 100644 --- a/packages/babel-preset-stage-0/README.md +++ b/packages/babel-preset-stage-0/README.md @@ -7,29 +7,12 @@ the TL;DR is that it's causing more harm than convenience in that the preset is always out of date, each change is usually going to require a major version bump and thus people will be behind, and it encouraged too many people to opt-in to too many proposals -that they didn't intend to. +that they didn't intend to. This is intended to be the last publish +of "@babel/preset-stage-0" --- -If you want the same configuration as before, you can use this configuration, although keep in mind that Stage 0 contains Stage 1 which is also deprecated. - -```json -{ - "presets": [ - [ - "@babel/preset-stage-1", { - "loose": false, - "useBuiltIns": false, - "decoratorsLegacy": true, - "pipelineProposal": "minimal" - } - ] - ], - "plugins": ["@babel/plugin-proposal-function-bind"] -} -``` - -And without reference to any Stage preset: +If you want the same configuration as before: ```json { @@ -61,7 +44,15 @@ And without reference to any Stage preset: } ``` -This will be the last publish of "@babel/preset-stage-0", and it won't be -in the final release. -If it's a hassle to maintain, you can certainly make your own preset to use -across projects, or there might be one in the community to use. \ No newline at end of file +We recommend that make your own presets to use across projects for +reusability. This can be as simple as exporting a function that returns your config/array of plugins. + +```js +module.exports = function() { + return { + plugins: [ + // ... + ] + }; +}; +``` diff --git a/packages/babel-preset-stage-0/src/index.js b/packages/babel-preset-stage-0/src/index.js index 84d8124134e5..653c80679a5d 100644 --- a/packages/babel-preset-stage-0/src/index.js +++ b/packages/babel-preset-stage-0/src/index.js @@ -7,29 +7,48 @@ the TL;DR is that it's causing more harm than convenience in that the preset is always out of date, each change is usually going to require a major version bump and thus people will be behind, and it encouraged too many people to opt-in to too many proposals -that they didn't intend to. +that they didn't intend to. This is intended to be the last publish +of "@babel/preset-stage-0" -If you want the same configuration as before, you can use this configuration, -although keep in mind that Stage 0 contains Stage 1 which is also deprecated. +If you want the same configuration as before: { - "presets": [ - [ - "@babel/preset-stage-1", { - "loose": false, - "useBuiltIns": false, - "decoratorsLegacy": true, - "pipelineProposal": "minimal" - } - ] - ], - "plugins": ["@babel/plugin-proposal-function-bind"] + "plugins": [ + // Stage 0 + "@babel/plugin-proposal-function-bind", + + // Stage 1 + "@babel/plugin-proposal-export-default-from", + "@babel/plugin-proposal-logical-assignment-operators", + ["@babel/plugin-proposal-optional-chaining", { "loose": false }], + ["@babel/plugin-proposal-pipeline-operator", { "proposal": "minimal" }], + ["@babel/plugin-proposal-nullish-coalescing-operator", { "loose": false }], + "@babel/plugin-proposal-do-expressions", + + // Stage 2 + ["@babel/plugin-proposal-decorators", { "legacy": true }], + "@babel/plugin-proposal-function-sent", + "@babel/plugin-proposal-export-namespace-from", + "@babel/plugin-proposal-numeric-separator", + "@babel/plugin-proposal-throw-expressions", + + // Stage 3 + "@babel/plugin-syntax-dynamic-import", + "@babel/plugin-syntax-import-meta", + ["@babel/plugin-proposal-class-properties", { "loose": false }], + "@babel/plugin-proposal-json-strings" + ] } -This will be the last publish of "@babel/preset-stage-0", and it won't be -in the final release. +We recommend that make your own presets to use across projects for +reusability. This can be as simple as exporting a function that returns your config/array of plugins. -If it's a hassle to maintain, you can certainly make your own preset to use -across projects, or there might be one in the community to use. +module.exports = function() { + return { + plugins: [ + // ... + ] + }; +}; `); } diff --git a/packages/babel-preset-stage-1/README.md b/packages/babel-preset-stage-1/README.md index b7bc79307a4e..7c5bb6870ad6 100644 --- a/packages/babel-preset-stage-1/README.md +++ b/packages/babel-preset-stage-1/README.md @@ -7,35 +7,12 @@ the TL;DR is that it's causing more harm than convenience in that the preset is always out of date, each change is usually going to require a major version bump and thus people will be behind, and it encouraged too many people to opt-in to too many proposals -that they didn't intend to. +that they didn't intend to. This is intended to be the last publish +of "@babel/preset-stage-1" --- - -If you want the same configuration as before, you can use this configuration, -although keep in mind that Stage 1 contains Stage 2 which is also deprecated. - -```json -{ - "presets": [ - ["@babel/preset-stage-2", { - "loose": false, - "useBuiltIns": false, - "decoratorsLegacy": true - }] - ], - "plugins": [ - "@babel/plugin-proposal-export-default-from", - "@babel/plugin-proposal-logical-assignment-operators", - ["@babel/plugin-proposal-optional-chaining", { "loose": false }], - ["@babel/plugin-proposal-pipeline-operator", { "proposal": "minimal" }], - ["@babel/plugin-proposal-nullish-coalescing-operator", { "loose": false }], - "@babel/plugin-proposal-do-expressions" - ] -} -``` - -And without reference to any Stage preset: +If you want the same configuration as before: ```json { @@ -64,9 +41,15 @@ And without reference to any Stage preset: } ``` -This will be the last publish of "@babel/preset-stage-1", and it won't be -in the final release. - -If it's a hassle to maintain, you can certainly make your own preset to use -across projects, or there might be one in the community to use. - +We recommend that make your own presets to use across projects for +reusability. This can be as simple as exporting a function that returns your config/array of plugins. + +```js +module.exports = function() { + return { + plugins: [ + // ... + ] + }; +}; +``` diff --git a/packages/babel-preset-stage-1/src/index.js b/packages/babel-preset-stage-1/src/index.js index f328a3574747..32dfbf6dcd02 100644 --- a/packages/babel-preset-stage-1/src/index.js +++ b/packages/babel-preset-stage-1/src/index.js @@ -7,33 +7,45 @@ the TL;DR is that it's causing more harm than convenience in that the preset is always out of date, each change is usually going to require a major version bump and thus people will be behind, and it encouraged too many people to opt-in to too many proposals -that they didn't intend to. +that they didn't intend to. This is intended to be the last publish +of "@babel/preset-stage-1" -If you want the same configuration as before, you can use this configuration, -although keep in mind that Stage 1 contains Stage 2 which is also deprecated. +If you want the same configuration as before: { - "presets": [ - ["@babel/preset-stage-2", { - "loose": false, - "useBuiltIns": false, - "decoratorsLegacy": true - }] - ], "plugins": [ + // Stage 1 "@babel/plugin-proposal-export-default-from", "@babel/plugin-proposal-logical-assignment-operators", ["@babel/plugin-proposal-optional-chaining", { "loose": false }], ["@babel/plugin-proposal-pipeline-operator", { "proposal": "minimal" }], ["@babel/plugin-proposal-nullish-coalescing-operator", { "loose": false }], - "@babel/plugin-proposal-do-expressions" + "@babel/plugin-proposal-do-expressions", + + // Stage 2 + ["@babel/plugin-proposal-decorators", { "legacy": true }], + "@babel/plugin-proposal-function-sent", + "@babel/plugin-proposal-export-namespace-from", + "@babel/plugin-proposal-numeric-separator", + "@babel/plugin-proposal-throw-expressions", + + // Stage 3 + "@babel/plugin-syntax-dynamic-import", + "@babel/plugin-syntax-import-meta", + ["@babel/plugin-proposal-class-properties", { "loose": false }], + "@babel/plugin-proposal-json-strings" ] } -This will be the last publish of "@babel/preset-stage-1", and it won't be -in the final release. +We recommend that make your own presets to use across projects for +reusability. This can be as simple as exporting a function that returns your config/array of plugins. -If it's a hassle to maintain, you can certainly make your own preset to use -across projects, or there might be one in the community to use. +module.exports = function() { + return { + plugins: [ + // ... + ] + }; +}; `); } diff --git a/packages/babel-preset-stage-2/README.md b/packages/babel-preset-stage-2/README.md index e24dedef65db..598c1c2fbae9 100644 --- a/packages/babel-preset-stage-2/README.md +++ b/packages/babel-preset-stage-2/README.md @@ -7,32 +7,12 @@ the TL;DR is that it's causing more harm than convenience in that the preset is always out of date, each change is usually going to require a major version bump and thus people will be behind, and it encouraged too many people to opt-in to too many proposals -that they didn't intend to. +that they didn't intend to. This is intended to be the last publish +of "@babel/preset-stage-2" --- -If you want the same configuration as before, you can use this configuration, -although keep in mind that Stage 1 contains Stage 2 which is also deprecated. - -```json -{ - "presets": [ - ["@babel/preset-stage-3", { - "loose": false, - "useBuiltIns": false - }] - ], - "plugins": [ - ["@babel/plugin-proposal-decorators", { "legacy": true }], - "@babel/plugin-proposal-function-sent", - "@babel/plugin-proposal-export-namespace-from", - "@babel/plugin-proposal-numeric-separator", - "@babel/plugin-proposal-throw-expressions" - ] -} -``` - -And without reference to any Stage preset: +If you want the same configuration as before: ```json { @@ -53,8 +33,15 @@ And without reference to any Stage preset: } ``` -This will be the last publish of "@babel/preset-stage-2", and it won't be -in the final release. +We recommend that make your own presets to use across projects for +reusability. This can be as simple as exporting a function that returns your config/array of plugins. + +```js +module.exports = function() { + return { + plugins: [ + // ... + ] + }; +}; -If it's a hassle to maintain, you can certainly make your own preset to use -across projects, or there might be one in the community to use. diff --git a/packages/babel-preset-stage-2/src/index.js b/packages/babel-preset-stage-2/src/index.js index dee2134adfad..91ad87cec5d2 100644 --- a/packages/babel-preset-stage-2/src/index.js +++ b/packages/babel-preset-stage-2/src/index.js @@ -7,31 +7,37 @@ the TL;DR is that it's causing more harm than convenience in that the preset is always out of date, each change is usually going to require a major version bump and thus people will be behind, and it encouraged too many people to opt-in to too many proposals -that they didn't intend to. +that they didn't intend to. This is intended to be the last publish +of "@babel/preset-stage-2" -If you want the same configuration as before, you can use this configuration, -although keep in mind that Stage 1 contains Stage 2 which is also deprecated. +If you want the same configuration as before: { - "presets": [ - ["@babel/preset-stage-3", { - "loose": false, - "useBuiltIns": false - }] - ], "plugins": [ + // Stage 2 ["@babel/plugin-proposal-decorators", { "legacy": true }], "@babel/plugin-proposal-function-sent", "@babel/plugin-proposal-export-namespace-from", "@babel/plugin-proposal-numeric-separator", - "@babel/plugin-proposal-throw-expressions" + "@babel/plugin-proposal-throw-expressions", + + // Stage 3 + "@babel/plugin-syntax-dynamic-import", + "@babel/plugin-syntax-import-meta", + ["@babel/plugin-proposal-class-properties", { "loose": false }], + "@babel/plugin-proposal-json-strings" ] } -This will be the last publish of "@babel/preset-stage-2", and it won't be -in the final release. +We recommend that make your own presets to use across projects for +reusability. This can be as simple as exporting a function that returns your config/array of plugins. -If it's a hassle to maintain, you can certainly make your own preset to use -across projects, or there might be one in the community to use. +module.exports = function() { + return { + plugins: [ + // ... + ] + }; +}; `); } diff --git a/packages/babel-preset-stage-3/README.md b/packages/babel-preset-stage-3/README.md index 643338be43f8..e13e4bfe54e3 100644 --- a/packages/babel-preset-stage-3/README.md +++ b/packages/babel-preset-stage-3/README.md @@ -7,11 +7,12 @@ the TL;DR is that it's causing more harm than convenience in that the preset is always out of date, each change is usually going to require a major version bump and thus people will be behind, and it encouraged too many people to opt-in to too many proposals -that they didn't intend to. +that they didn't intend to. This is intended to be the last publish +of "@babel/preset-stage-3" --- -If you want the same configuration as before, you can use this configuration. +If you want the same configuration as before: ```json { @@ -24,8 +25,13 @@ If you want the same configuration as before, you can use this configuration. } ``` -This will be the last publish of "@babel/preset-stage-3", and it won't be -in the final release. +We recommend that make your own presets to use across projects for +reusability. This can be as simple as exporting a function that returns your config/array of plugins. -If it's a hassle to maintain, you can certainly make your own preset to use -across projects, or there might be one in the community to use. +module.exports = function() { + return { + plugins: [ + // ... + ] + }; +}; diff --git a/packages/babel-preset-stage-3/src/index.js b/packages/babel-preset-stage-3/src/index.js index 3326d92ca84f..acc752da20cd 100644 --- a/packages/babel-preset-stage-3/src/index.js +++ b/packages/babel-preset-stage-3/src/index.js @@ -7,9 +7,10 @@ the TL;DR is that it's causing more harm than convenience in that the preset is always out of date, each change is usually going to require a major version bump and thus people will be behind, and it encouraged too many people to opt-in to too many proposals -that they didn't intend to. +that they didn't intend to. This is intended to be the last publish +of "@babel/preset-stage-3" -If you want the same configuration as before, you can use this configuration. +If you want the same configuration as before: { "plugins": [ @@ -20,10 +21,15 @@ If you want the same configuration as before, you can use this configuration. ] } -This will be the last publish of "@babel/preset-stage-3", and it won't be -in the final release. +We recommend that make your own presets to use across projects for +reusability. This can be as simple as exporting a function that returns your config/array of plugins. -If it's a hassle to maintain, you can certainly make your own preset to use -across projects, or there might be one in the community to use. +module.exports = function() { + return { + plugins: [ + // ... + ] + }; +}; `); }