install polyfill & runtime to dependency instead of devDependency [skip ci] (#9409)
This commit is contained in:
parent
828169e611
commit
56044c7851
@ -1,19 +1,19 @@
|
||||
# @babel/plugin-class-features
|
||||
# @babel/helper-create-class-features-plugin
|
||||
|
||||
> Compile class public and private fields, private methods and decorators to ES6
|
||||
|
||||
See our website [@babel/plugin-class-features](https://babeljs.io/docs/en/next/babel-plugin-class-features.html) for more information.
|
||||
See our website [@babel/helper-create-class-features-plugin](https://babeljs.io/docs/en/next/babel-helper-create-class-features-plugin.html) for more information.
|
||||
|
||||
## Install
|
||||
|
||||
Using npm:
|
||||
|
||||
```sh
|
||||
npm install --save-dev @babel/plugin-class-features
|
||||
npm install --save-dev @babel/helper-create-class-features-plugin
|
||||
```
|
||||
|
||||
or using yarn:
|
||||
|
||||
```sh
|
||||
yarn add @babel/plugin-class-features --dev
|
||||
yarn add @babel/helper-create-class-features-plugin --dev
|
||||
```
|
||||
|
||||
@ -9,11 +9,11 @@ See our website [@babel/polyfill](https://babeljs.io/docs/en/next/babel-polyfill
|
||||
Using npm:
|
||||
|
||||
```sh
|
||||
npm install --save-dev @babel/polyfill
|
||||
npm install --save @babel/polyfill
|
||||
```
|
||||
|
||||
or using yarn:
|
||||
|
||||
```sh
|
||||
yarn add @babel/polyfill --dev
|
||||
yarn add @babel/polyfill
|
||||
```
|
||||
|
||||
@ -9,11 +9,11 @@ See our website [@babel/runtime](https://babeljs.io/docs/en/next/babel-runtime.h
|
||||
Using npm:
|
||||
|
||||
```sh
|
||||
npm install --save-dev @babel/runtime
|
||||
npm install --save @babel/runtime
|
||||
```
|
||||
|
||||
or using yarn:
|
||||
|
||||
```sh
|
||||
yarn add @babel/runtime --dev
|
||||
yarn add @babel/runtime
|
||||
```
|
||||
|
||||
@ -13,12 +13,15 @@ const cwd = process.cwd();
|
||||
const packageDir = join(cwd, "packages");
|
||||
|
||||
const packages = readdirSync(packageDir);
|
||||
const packagesInstalledToDep = ["@babel/polyfill", "@babel/runtime"];
|
||||
const getWebsiteLink = n => `https://babeljs.io/docs/en/next/${n}.html`;
|
||||
const getPackageJson = pkg => require(join(packageDir, pkg, "package.json"));
|
||||
const getIssueLabelLink = l =>
|
||||
`https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22${encodeURIComponent(
|
||||
l
|
||||
)}%22+is%3Aopen`;
|
||||
const getNpmInstall = name => `npm install ${packagesInstalledToDep.includes(name) ? "--save" : "--save-dev"} ${name}`;
|
||||
const getYarnAdd = name => `yarn add ${name} ${packagesInstalledToDep.includes(name) ? "" : "--dev"}`;
|
||||
|
||||
const labels = {
|
||||
"babel-preset-flow": getIssueLabelLink("area: flow"),
|
||||
@ -54,13 +57,13 @@ See our website [${name}](${websiteLink}) for more information${
|
||||
Using npm:
|
||||
|
||||
\`\`\`sh
|
||||
npm install --save-dev ${name}
|
||||
${getNpmInstall(name)}
|
||||
\`\`\`
|
||||
|
||||
or using yarn:
|
||||
|
||||
\`\`\`sh
|
||||
yarn add ${name} --dev
|
||||
${getYarnAdd(name)}
|
||||
\`\`\`
|
||||
`;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user