Refactor move docs (#8108)

* feat: [skip] generate readme script

* docs: [skip ci] update READMEs

* docs: [skip ci] fix code block type

* chore: [skip ci] move generator script
This commit is contained in:
Sven SAULEAU
2018-06-04 16:32:39 +02:00
committed by Henry Zhu
parent b6eaaa2496
commit b445b79734
143 changed files with 1286 additions and 11238 deletions

View File

@@ -1,57 +1,19 @@
# @babel/plugin-transform-strict-mode
> This plugin places a `"use strict";` directive at the top of all files to enable [strict mode](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode).
> This plugin places a 'use strict'; directive at the top of all files to enable strict mode
This plugin may be enabled via `@babel/plugin-transform-modules-commonjs`.
If you wish to disable it you can either turn `strict` off or pass
`strictMode: false` as an option to the commonjs transform.
See our website [@babel/plugin-transform-strict-mode](https://new.babeljs.io/docs/en/next/babel-plugin-transform-strict-mode.html) for more information.
## Example
## Install
**In**
```javascript
foo();
```
**Out**
```javascript
"use strict";
foo();
```
## Installation
Using npm:
```sh
npm install --save-dev @babel/plugin-transform-strict-mode
npm install --save @babel/plugin-transform-strict-mode
```
## Usage
### Via `.babelrc` (Recommended)
**.babelrc**
```json
{
"plugins": ["@babel/plugin-transform-strict-mode"]
}
```
### Via CLI
or using yarn:
```sh
babel --plugins @babel/plugin-transform-strict-mode script.js
```
### Via Node API
```javascript
require("@babel/core").transform("code", {
plugins: ["@babel/plugin-transform-strict-mode"]
});
yarn add --save @babel/plugin-transform-strict-mode
```