Skip to content

Commit 091d953

Browse files
authored
Disable docusaurus versioning (#2391)
* refactor: merge options.md * merge cli.md * merge configuration.md * merge standalone.md * merge plugins.md I didn't add plugin history in plugins.md because it is only a link to specific plugins. The plugin page (and ideally package.json) should specifies that it requires `@babel/core` 7.some-version to work. * merge preset-env Note: I have briefly mentioned that `useBuiltins: "entry"` will replace `@babel/polyfill` imports before v7.4.0. It has been long deprecated and I don't expect anyone will refer to it. * merge plugin-transform-spread * merge plugin-transform-for-of * merge plugin-transform-destructuring * merge plugin-proposal-private-methods * merge generator.md * merge proposal-async-generator-functions.md * merge docs/plugin-transform-flow-strip-types.md * merge docs/plugin-transform-react-jsx-source.md * merge docs/plugin-transform-react-jsx.md * merge docs/plugin-transform-typescript.md * merge preset-flow.md * merge preset-react.md * merge docs/preset-typescript.md * merge usage.md * merge docs/config-files.md * merge node.md * merge parser.md * merge docs/plugin-minify-builtins.md * merge docs/plugin-proposal-optional-chaining.md * merge docs/plugin-proposal-partial-application.md * merge plugin-proposal-unicode-property-regex.md * merge docs/plugin-transform-runtime.md * merge docs/v7-migration.md * merge types.md * merge docs/plugin-proposal-pipeline-operator.md * merge polyfill.md * merge template.md * merge plugin-syntax-dynamic-import.md * merge docs/plugin-proposal-decorators.md * merge roadmap.md It should have not been versioned at all. * breaking: disable docusaurus versioning * revert @babel/preset-env-standalone docs for reference only * breaking: remove versioned_docs * breaking: remove versioned_sidebars * redirect next * address review comments
1 parent f388138 commit 091d953

File tree

460 files changed

+397
-61103
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

460 files changed

+397
-61103
lines changed

README.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
This is the source for the [babeljs.io](https://babeljs.io) website; feel free to suggest changes to our docs!
1010

1111
- Current: `master` branch is deployed to https://babeljs.io
12-
- Old: `old-site` branch is deployed to https://old.babeljs.io
12+
- Old: `old-site` branch is deployed to https://v6.babeljs.io
1313

1414
### Setup
1515

@@ -29,14 +29,7 @@ $ yarn && yarn bootstrap
2929

3030
To keep documentation in sync across all of Babel's packages, the docs are now directly located in this repository. The READMEs in [`babel/babel`](https://github.com/babel/babel) are [auto generated](https://github.com/babel/babel/blob/master/scripts/generators/readmes.js) and point to this documentation.
3131

32-
You might want to make yourself familiar with [docusaurus](https://docusaurus.io/docs/en/installation) to make significant changes to the website. If you only want to make content changes you just need to know about versioned docs.
33-
34-
#### Versioned docs
35-
36-
- `/docs` - the files in here are responsible for the "next" version at https://babeljs.io/docs/en/next.
37-
- `/website/versioned_docs/version-*` - these are the docs for the past versions, the latest one being the currently published version at https://babeljs.io/docs/en
38-
39-
After making your changes to the markdown files in the `/docs` folder, a git hook script will suggest files from the past versions folders that you might also need to apply your changes to.
32+
You might want to make yourself familiar with [docusaurus](https://docusaurus.io/docs/en/installation) to make significant changes to the website.
4033

4134
#### Looking for support?
4235

_redirects

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ https://babel.netlify.com/* https://babeljs.io/:splat 301!
7676

7777
/docs/en/next/tools/* /setup
7878

79+
# Blog rewrites
7980
/7.11.0 /blog/2020/07/30/7.11.0
8081
/7.10.0 /blog/2020/05/25/7.10.0
8182
/7.9.0 /blog/2020/03/16/7.9.0
@@ -90,3 +91,19 @@ https://babel.netlify.com/* https://babeljs.io/:splat 301!
9091
/7.0.0 /blog/2018/08/27/7.0.0
9192
/6.23.0 /blog/2017/02/13/6.23.0
9293
/6.23.3 /blog/2017/02/13/6.23.0
94+
95+
# Docusaurus versioning rewrites
96+
# We have disabled docusaurus versioning since 7.11, they are preserved for link compatibility
97+
98+
/docs/en/next/* /docs/en
99+
/docs/en/7.10.0/* /docs/en
100+
/docs/en/7.9.0/* /docs/en
101+
/docs/en/7.8.0/* /docs/en
102+
/docs/en/7.7.0/* /docs/en
103+
/docs/en/7.6.0/* /docs/en
104+
/docs/en/7.5.0/* /docs/en
105+
/docs/en/7.4.0/* /docs/en
106+
/docs/en/7.3.0/* /docs/en
107+
/docs/en/7.2.0/* /docs/en
108+
/docs/en/7.1.0/* /docs/en
109+
/docs/en/7.0.0/* /docs/en

docs/cli.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ After that finishes installing, your `package.json` file should include:
4646
npx babel script.js
4747
```
4848

49-
5049
### Compile Files
5150

5251
Compile the file `script.js` and **output to stdout**.
@@ -115,6 +114,14 @@ npx babel src --out-dir lib --copy-files
115114

116115
If you don't want to copy ignored JavaScript files:
117116

117+
<details>
118+
<summary>History</summary>
119+
| Version | Changes |
120+
| --- | --- |
121+
| v7.8.0 | Added `--copy-ignored` |
122+
| v7.8.4 | Change `copyeIgnored` option default to `true`, it can be disabled by `--no-copy-ignored` |
123+
</details>
124+
118125
```sh
119126
npx babel src --out-dir lib --copy-files --no-copy-ignored
120127
```
@@ -143,9 +150,9 @@ Use the `--presets` option to specify presets to use in compilation
143150
npx babel script.js --out-file script-compiled.js --presets=@babel/preset-env,@babel/flow
144151
```
145152

146-
### Ignoring .babelrc.json
153+
### Ignoring .babelrc.json or .babelrc
147154

148-
Ignore the configuration from the project's `.babelrc.json` file and use the cli options e.g. for a custom build
155+
Ignore the configuration from the project's `.babelrc` or `.babelrc.json` file and use the cli options e.g. for a custom build
149156

150157
```sh
151158
npx babel --no-babelrc script.js --out-file script-compiled.js --presets=@babel/preset-env,@babel/preset-react
@@ -159,6 +166,8 @@ npx babel --config-file /path/to/my/babel.config.json --out-dir dist ./src
159166

160167
### Set File Extensions
161168

169+
Added in: `v7.8.0`
170+
162171
By default, Babel will override the extension of the transpiled file and use `.js` instead.
163172

164173
To preserve the original file extension you can pass the `--keep-file-extension`.

0 commit comments

Comments
 (0)