mirror of
https://github.com/S2-/minifyfromhtml.git
synced 2025-08-03 12:20:04 +02:00
add some packages
This commit is contained in:
47
node_modules/babel-plugin-minify-infinity/README.md
generated
vendored
Normal file
47
node_modules/babel-plugin-minify-infinity/README.md
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
# babel-plugin-minify-infinity
|
||||
|
||||
## Example
|
||||
|
||||
**In**
|
||||
|
||||
```javascript
|
||||
Infinity;
|
||||
```
|
||||
|
||||
**Out**
|
||||
|
||||
```javascript
|
||||
1 / 0;
|
||||
```
|
||||
|
||||
## Installation
|
||||
|
||||
```sh
|
||||
npm install babel-plugin-minify-infinity
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### Via `.babelrc` (Recommended)
|
||||
|
||||
**.babelrc**
|
||||
|
||||
```json
|
||||
{
|
||||
"plugins": ["minify-infinity"]
|
||||
}
|
||||
```
|
||||
|
||||
### Via CLI
|
||||
|
||||
```sh
|
||||
babel --plugins minify-infinity script.js
|
||||
```
|
||||
|
||||
### Via Node API
|
||||
|
||||
```javascript
|
||||
require("@babel/core").transform("code", {
|
||||
plugins: ["minify-infinity"]
|
||||
});
|
||||
```
|
Reference in New Issue
Block a user