Skip to content

Commit 2f75f0f

Browse files
committed
Cleanup documentation and add funding.
1 parent 9d8dff7 commit 2f75f0f

2 files changed

Lines changed: 33 additions & 14 deletions

File tree

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: bardiharborow

README.md

Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,63 @@
11
# babel-plugin-transform-es2015-modules-strip
22

3-
[![npm](https://img.shields.io/npm/v/babel-plugin-transform-es2015-modules-strip.svg?style=flat-square&maxAge=2592000)](https://www.npmjs.com/package/babel-plugin-transform-es2015-modules-strip)
4-
[![License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](https://github.com/bardiharborow/babel-plugin-transform-es2015-modules-strip/blob/master/LICENSE)
3+
[![This project has a package hosted on the NPM repository.](https://img.shields.io/npm/v/babel-plugin-transform-es2015-modules-strip)](https://www.npmjs.com/package/babel-plugin-transform-es2015-modules-strip)
4+
![](https://img.shields.io/npm/dw/babel-plugin-transform-es2015-modules-strip)
5+
[![This project is licensed under the terms of the MIT license.](https://img.shields.io/npm/l/babel-plugin-transform-es2015-modules-strip)](https://github.com/bardiharborow/babel-plugin-transform-es2015-modules-strip/blob/master/LICENSE)
56

6-
> A Babel plugin that strips import and export declarations.
7+
This plugin strips ECMAScript module import and export statements from a script.
8+
9+
## Example
10+
11+
**In**
12+
13+
```javascript
14+
import path from 'path';
15+
16+
console.log(path.sep);
17+
18+
export default 42;
19+
```
20+
21+
**Out**
22+
23+
```javascript
24+
console.log(path.sep);
25+
```
726

827
## Installation
928

1029
```sh
11-
$ npm install babel-plugin-transform-es2015-modules-strip
30+
npm install --save-dev babel-plugin-transform-es2015-modules-strip
1231
```
1332

1433
## Usage
1534

16-
### Via `.babelrc` (Recommended)
17-
18-
**.babelrc**
35+
### With a configuration file (Recommended)
1936

20-
```js
37+
```json
2138
{
2239
"presets": [
23-
["es2015", {
40+
["@babel/env", {
2441
"modules": false
2542
}]
2643
],
2744
"plugins": ["transform-es2015-modules-strip"]
2845
}
29-
3046
```
3147

3248
### Via Node API
3349

3450
```javascript
35-
require("babel-core").transform("code", {
51+
require("@babel/core").transformSync("code", {
3652
presets: [
37-
["es2015", {
38-
modules: false
53+
["@babel/env", {
54+
"modules": false
3955
}]
4056
],
4157
plugins: ["transform-es2015-modules-strip"]
4258
});
4359
```
4460

45-
Made with <3 by [Bardi Harborow](https://bardiharborow.com).
61+
## License
62+
63+
This project is licensed under the terms of [the MIT license](LICENSE).

0 commit comments

Comments
 (0)