Remove the experimental folder
This commit is contained in:
parent
d72d567d43
commit
70361f1200
@ -2,6 +2,4 @@
|
||||
packages/*/test/fixtures
|
||||
packages/*/lib
|
||||
packages/babel-standalone/babel.js
|
||||
experimental/*/test/fixtures
|
||||
experimental/*/lib
|
||||
experimental/babel-preset-env-standalone/babel-preset-env.js
|
||||
packages/babel-preset-env-standalone/babel-preset-env.js
|
||||
|
||||
@ -12,14 +12,10 @@ codemods/*/lib
|
||||
codemods/*/dist
|
||||
codemods/*/test/fixtures
|
||||
codemods/*/test/tmp
|
||||
experimental/*/lib
|
||||
experimental/*/node_modules
|
||||
experimental/*/test/fixtures
|
||||
experimental/*/test/tmp
|
||||
experimental/babel-preset-env/data
|
||||
experimental/babel-preset-env/test/debug-fixtures
|
||||
experimental/babel-preset-env-standalone/babel-preset-env.js
|
||||
experimental/babel-preset-env-standalone/babel-preset-env.min.js
|
||||
packages/babel-preset-env/data
|
||||
packages/babel-preset-env/test/debug-fixtures
|
||||
packages/babel-preset-env-standalone/babel-preset-env.js
|
||||
packages/babel-preset-env-standalone/babel-preset-env.min.js
|
||||
packages/babel-standalone/babel.js
|
||||
packages/babel-standalone/babel.min.js
|
||||
packages/babylon/build
|
||||
|
||||
@ -15,7 +15,6 @@
|
||||
{
|
||||
"files": [
|
||||
"packages/*/src/**/*.js",
|
||||
"experimental/*/src/**/*.js",
|
||||
"codemods/*/src/**/*.js"
|
||||
],
|
||||
"rules": {
|
||||
@ -25,7 +24,6 @@
|
||||
{
|
||||
"files": [
|
||||
"packages/*/test/**/*.js",
|
||||
"experimental/*/test/**/*.js",
|
||||
"codemods/*/test/**/*.js",
|
||||
"test/**/*.js"
|
||||
],
|
||||
|
||||
@ -4,14 +4,11 @@
|
||||
.*/packages/.*/test
|
||||
.*/codemods/.*/lib
|
||||
.*/codemods/.*/test
|
||||
.*/experimental/.*/lib
|
||||
.*/experimental/.*/test
|
||||
.*/node_modules/conventional-changelog-core/
|
||||
|
||||
[include]
|
||||
packages/*/src
|
||||
codemods/*/src
|
||||
experimental/*/src
|
||||
|
||||
[libs]
|
||||
lib/file.js
|
||||
|
||||
6
.gitignore
vendored
6
.gitignore
vendored
@ -34,10 +34,8 @@ package-lock.json
|
||||
/babel.sublime-workspace
|
||||
packages/babel-standalone/babel.js
|
||||
packages/babel-standalone/babel.min.js
|
||||
/experimental/*/node_modules
|
||||
/experimental/*/lib
|
||||
experimental/babel-preset-env-standalone/babel-preset-env.js
|
||||
experimental/babel-preset-env-standalone/babel-preset-env.min.js
|
||||
packages/babel-preset-env-standalone/babel-preset-env.js
|
||||
packages/babel-preset-env-standalone/babel-preset-env.min.js
|
||||
/codemods/*/lib
|
||||
/codemods/*/node_modules
|
||||
/packages/babylon/build
|
||||
|
||||
@ -2,8 +2,6 @@
|
||||
"trailingComma": "es5",
|
||||
"overrides": [{
|
||||
"files": [
|
||||
"**/experimental/*/src/**/*.js",
|
||||
"**/experimental/*/test/**/*.js",
|
||||
"**/codemods/*/src/**/*.js",
|
||||
"**/codemods/*/test/**/*.js",
|
||||
"**/packages/*/src/**/*.js",
|
||||
|
||||
@ -287,7 +287,6 @@ $ TEST_DEBUG=true TEST_GREP=ClassDeclaration make test-only
|
||||
|
||||
./scripts/test.sh
|
||||
Debugger listening on port 9229.
|
||||
Warning: This is an experimental feature and could change at any time.
|
||||
To start debugging, open the following URL in Chrome:
|
||||
chrome-devtools://devtools/remote/serve_file/@60cd6e859b9f557d2312f5bf532f6aec5f284980/inspector.html?experiments=true&v8only=true&ws=127.0.0.1:9229/3cdaebd2-be88-4e7b-a94b-432950ab72d0
|
||||
```
|
||||
|
||||
10
Gulpfile.js
10
Gulpfile.js
@ -15,7 +15,7 @@ const merge = require("merge-stream");
|
||||
const registerStandalonePackageTask = require("./scripts/gulp-tasks")
|
||||
.registerStandalonePackageTask;
|
||||
|
||||
const sources = ["codemods", "packages", "experimental"];
|
||||
const sources = ["codemods", "packages"];
|
||||
|
||||
function swapSrcWithLib(srcPath) {
|
||||
const parts = srcPath.split(path.sep);
|
||||
@ -91,7 +91,7 @@ const presetEnvWebpackPlugins = [
|
||||
require.resolve(
|
||||
path.join(
|
||||
__dirname,
|
||||
"./experimental/babel-preset-env-standalone/src/available-plugins"
|
||||
"./packages/babel-preset-env-standalone/src/available-plugins"
|
||||
)
|
||||
)
|
||||
),
|
||||
@ -100,7 +100,7 @@ const presetEnvWebpackPlugins = [
|
||||
require.resolve(
|
||||
path.join(
|
||||
__dirname,
|
||||
"./experimental/babel-preset-env-standalone/src/caniuse-lite-regions"
|
||||
"./packages/babel-preset-env-standalone/src/caniuse-lite-regions"
|
||||
)
|
||||
)
|
||||
),
|
||||
@ -110,7 +110,7 @@ registerStandalonePackageTask(
|
||||
gulp,
|
||||
"babel-preset-env",
|
||||
"babelPresetEnv",
|
||||
path.join(__dirname, "experimental"),
|
||||
require("./experimental/babel-preset-env/package.json").version,
|
||||
path.join(__dirname, "packages"),
|
||||
require("./packages/babel-preset-env/package.json").version,
|
||||
presetEnvWebpackPlugins
|
||||
);
|
||||
|
||||
2
Makefile
2
Makefile
@ -7,7 +7,7 @@ export NODE_ENV = test
|
||||
# Fix color output until TravisCI fixes https://github.com/travis-ci/travis-ci/issues/7967
|
||||
export FORCE_COLOR = true
|
||||
|
||||
SOURCES = packages codemods experimental
|
||||
SOURCES = packages codemods
|
||||
|
||||
.PHONY: build build-dist watch lint fix clean test-clean test-only test test-ci publish bootstrap
|
||||
|
||||
|
||||
@ -2,8 +2,8 @@ general:
|
||||
artifacts:
|
||||
- "packages/babel-standalone/babel.js"
|
||||
- "packages/babel-standalone/babel.min.js"
|
||||
- "experimental/babel-preset-env-standalone/babel-preset-env.js"
|
||||
- "experimental/babel-preset-env-standalone/babel-preset-env.min.js"
|
||||
- "packages/babel-preset-env-standalone/babel-preset-env.js"
|
||||
- "packages/babel-preset-env-standalone/babel-preset-env.min.js"
|
||||
|
||||
machine:
|
||||
node:
|
||||
@ -27,4 +27,4 @@ test:
|
||||
# data for a JS file that's several megabytes large is bound to fail. Here,
|
||||
# we just run the babel-standalone test separately.
|
||||
- ./node_modules/mocha/bin/_mocha packages/babel-standalone/test/ --opts test/mocha.opts
|
||||
- ./node_modules/mocha/bin/_mocha experimental/babel-preset-env-standalone/test/ --opts test/mocha.opts
|
||||
- ./node_modules/mocha/bin/_mocha packages/babel-preset-env-standalone/test/ --opts test/mocha.opts
|
||||
|
||||
@ -19,15 +19,13 @@
|
||||
"ignore": [
|
||||
"*.md",
|
||||
"test/**",
|
||||
"codemods/**",
|
||||
"experimental/**"
|
||||
"codemods/**"
|
||||
]
|
||||
}
|
||||
},
|
||||
"packages": [
|
||||
"packages/*",
|
||||
"codemods/*",
|
||||
"experimental/*"
|
||||
"codemods/*"
|
||||
],
|
||||
"npmClient": "yarn",
|
||||
"npmClientArgs": [
|
||||
|
||||
@ -72,8 +72,7 @@
|
||||
"scripts/*.js",
|
||||
"packages/*/test/**",
|
||||
"packages/babel-standalone/**",
|
||||
"codemods/*/test/**",
|
||||
"experimental/*/test/**"
|
||||
"codemods/*/test/**"
|
||||
],
|
||||
"sourceMap": false,
|
||||
"instrument": false
|
||||
|
||||
@ -93,7 +93,7 @@ require("@babel/core").transform("code", {
|
||||
|
||||
If you need to further compile ES2015 Decimal, Binary, Hex and Octal number representations to their pre-ES2015 numeric literal form, add the [`"@babel/plugin-transform-literals"`](http://babeljs.io/docs/plugins/transform-literals/) plugin:
|
||||
|
||||
> `@babel/plugin-transform-literals` is already included in [@babel/preset-env](https://github.com/babel/babel/tree/master/experimental/babel-preset-env) and @babel/preset-es2015.
|
||||
> `@babel/plugin-transform-literals` is already included in [@babel/preset-env](https://github.com/babel/babel/tree/master/packages/babel-preset-env) and @babel/preset-es2015.
|
||||
|
||||
### Via `.babelrc` (Recommended)
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ There are several ways to use @babel/preset-env-standalone. Pick whichever one y
|
||||
- Manually grab `babel-preset-env.js` and/or `babel-preset-env.min.js`:
|
||||
* Download archived source code from the [GitHub releases page](https://github.com/babel/babel/releases).
|
||||
* Unpack it.
|
||||
* Grab `babel-preset-env.js` and/or `babel-preset-env.min.js` from the `experimental/babel-preset-env-standalone`.
|
||||
* Grab `babel-preset-env.js` and/or `babel-preset-env.min.js` from `packages/babel-preset-env-standalone`.
|
||||
|
||||
Usage
|
||||
=====
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
## Adding a new plugin to support (when approved in the next ECMAScript version)
|
||||
|
||||
### Update [`plugin-features.js`](https://github.com/babel/babel/blob/master/experimental/babel-preset-env/data/plugin-features.js)
|
||||
### Update [`plugin-features.js`](https://github.com/babel/babel/blob/master/packages/babel-preset-env/data/plugin-features.js)
|
||||
|
||||
*Example:*
|
||||
|
||||
@ -27,7 +27,7 @@ And add them in this structure:
|
||||
},
|
||||
```
|
||||
|
||||
### Update [`built-in-features.js`](https://github.com/babel/babel/blob/master/experimental/babel-preset-env/data/built-in-features.js)
|
||||
### Update [`built-in-features.js`](https://github.com/babel/babel/blob/master/packages/babel-preset-env/data/built-in-features.js)
|
||||
|
||||
*Example:*
|
||||
|
||||
@ -42,7 +42,7 @@ Find the corresponding module on [core-js](https://github.com/zloirock/core-js/t
|
||||
|
||||
`es7.object.values.js`
|
||||
|
||||
Find required ES version in [`built-in-features.js`](https://github.com/babel/babel/blob/master/experimental/babel-preset-env/data/built-in-features.js) and add the new feature:
|
||||
Find required ES version in [`built-in-features.js`](https://github.com/babel/babel/blob/master/packages/babel-preset-env/data/built-in-features.js) and add the new feature:
|
||||
|
||||
```js
|
||||
const es2017 = {
|
||||
@ -51,7 +51,7 @@ const es2017 = {
|
||||
}
|
||||
```
|
||||
|
||||
### Update [`plugins.json`](https://github.com/babel/babel/blob/master/experimental/babel-preset-env/data/plugins.json)
|
||||
### Update [`plugins.json`](https://github.com/babel/babel/blob/master/packages/babel-preset-env/data/plugins.json)
|
||||
|
||||
Until `compat-table` is a standalone npm module for data we are using the git url
|
||||
|
||||
@ -73,13 +73,13 @@ Use external data such as [`compat-table`](https://github.com/kangax/compat-tabl
|
||||
|
||||

|
||||
|
||||
We can periodically run [build-data.js](https://github.com/babel/experimental/babel-preset-env/blob/master/scripts/build-data.js) which generates [plugins.json](https://github.com/babel/experimental/babel-preset-env/blob/master/data/plugins.json).
|
||||
We can periodically run [build-data.js](https://github.com/babel/packages/babel-preset-env/blob/master/scripts/build-data.js) which generates [plugins.json](https://github.com/babel/packages/babel-preset-env/blob/master/data/plugins.json).
|
||||
|
||||
Ref: [#7](https://github.com/babel/babel-preset-env/issues/7)
|
||||
|
||||
### Maintain a mapping between JavaScript features and Babel plugins
|
||||
|
||||
> Currently located at [plugin-features.js](https://github.com/babel/experimental/babel-preset-env/blob/master/data/plugin-features.js).
|
||||
> Currently located at [plugin-features.js](https://github.com/babel/packages/babel-preset-env/blob/master/data/plugin-features.js).
|
||||
|
||||
This should be straightforward to do in most cases. There might be cases where plugins should be split up more or certain plugins aren't standalone enough (or impossible to do).
|
||||
|
||||
@ -185,7 +185,7 @@ Each target environment takes a number or a string (we recommend using a string
|
||||
|
||||
Example environments: `chrome`, `opera`, `edge`, `firefox`, `safari`, `ie`, `ios`, `android`, `node`, `electron`.
|
||||
|
||||
The [data](https://github.com/babel/experimental/babel-preset-env/blob/master/data/plugins.json) for this is generated by running the [build-data script](https://github.com/babel/experimental/babel-preset-env/blob/master/scripts/build-data.js) which pulls in data from [compat-table](https://kangax.github.io/compat-table).
|
||||
The [data](https://github.com/babel/packages/babel-preset-env/blob/master/data/plugins.json) for this is generated by running the [build-data script](https://github.com/babel/packages/babel-preset-env/blob/master/scripts/build-data.js) which pulls in data from [compat-table](https://kangax.github.io/compat-table).
|
||||
|
||||
### `targets.node`
|
||||
|
||||
@ -225,7 +225,7 @@ Setting this to `false` will not transform modules.
|
||||
|
||||
`boolean`, defaults to `false`.
|
||||
|
||||
Outputs the targets/plugins used and the version specified in [plugin data version](https://github.com/babel/experimental/babel-preset-env/blob/master/data/plugins.json) to `console.log`.
|
||||
Outputs the targets/plugins used and the version specified in [plugin data version](https://github.com/babel/packages/babel-preset-env/blob/master/data/plugins.json) to `console.log`.
|
||||
|
||||
### `include`
|
||||
|
||||
@ -235,15 +235,15 @@ An array of plugins to always include.
|
||||
|
||||
Valid options include any:
|
||||
|
||||
- [Babel plugins](https://github.com/babel/experimental/babel-preset-env/blob/master/data/plugin-features.js) - both with (`@babel/plugin-transform-spread`) and without prefix (`plugin-transform-spread`) are supported.
|
||||
- [Babel plugins](https://github.com/babel/packages/babel-preset-env/blob/master/data/plugin-features.js) - both with (`@babel/plugin-transform-spread`) and without prefix (`plugin-transform-spread`) are supported.
|
||||
|
||||
- [Built-ins](https://github.com/babel/experimental/babel-preset-env/blob/master/data/built-in-features.js), such as `map`, `set`, or `object.assign`.
|
||||
- [Built-ins](https://github.com/babel/packages/babel-preset-env/blob/master/data/built-in-features.js), such as `map`, `set`, or `object.assign`.
|
||||
|
||||
This option is useful if there is a bug in a native implementation, or a combination of a non-supported feature + a supported one doesn't work.
|
||||
|
||||
For example, Node 4 supports native classes but not spread. If `super` is used with a spread argument, then the `@babel/plugin-transform-classes` transform needs to be `include`d, as it is not possible to transpile a spread with `super` otherwise.
|
||||
|
||||
> NOTE: The `include` and `exclude` options _only_ work with the [plugins included with this preset](https://github.com/babel/experimental/babel-preset-env/blob/master/data/plugin-features.js); so, for example, including `@babel/plugin-proposal-do-expressions` or excluding `@babel/plugin-proposal-function-bind` will throw errors. To use a plugin _not_ included with this preset, add them to your [config](https://babeljs.io/docs/usage/babelrc/) directly.
|
||||
> NOTE: The `include` and `exclude` options _only_ work with the [plugins included with this preset](https://github.com/babel/packages/babel-preset-env/blob/master/data/plugin-features.js); so, for example, including `@babel/plugin-proposal-do-expressions` or excluding `@babel/plugin-proposal-function-bind` will throw errors. To use a plugin _not_ included with this preset, add them to your [config](https://babeljs.io/docs/usage/babelrc/) directly.
|
||||
|
||||
### `exclude`
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
"author": "Henry Zhu <hi@henryzoo.com>",
|
||||
"homepage": "https://babeljs.io/",
|
||||
"license": "MIT",
|
||||
"repository": "https://github.com/babel/babel/tree/master/experimental/babel-preset-env",
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-preset-env",
|
||||
"main": "lib/index.js",
|
||||
"scripts": {
|
||||
"build-data": "node ./scripts/build-data.js"
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user