Skip to content

Commit 9d09437

Browse files
committed
Add v0.1.0.
1 parent fe12037 commit 9d09437

3 files changed

Lines changed: 77 additions & 1 deletion

File tree

README.md

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,44 @@
1-
# babel-plugin-transform-es2015-modules-strip
1+
# babel-plugin-transform-es2015-modules-strip
2+
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)
5+
[![Gratipay](https://img.shields.io/gratipay/user/BardiHarborow.svg?maxAge=2592000&style=flat-square)](https://gratipay.com/~BardiHarborow/)
6+
7+
> A Babel plugin that strips import and export declarations.
8+
9+
## Installation
10+
11+
```sh
12+
$ npm install babel-plugin-transform-es2015-modules-strip
13+
```
14+
15+
## Usage
16+
17+
### Via `.babelrc` (Recommended)
18+
19+
**.babelrc**
20+
21+
```js
22+
{
23+
"presets": [
24+
["es2015", {
25+
"modules": false
26+
}]
27+
],
28+
"plugins": ["transform-es2015-modules-strip"]
29+
}
30+
31+
```
32+
33+
### Via Node API
34+
35+
```javascript
36+
require("babel-core").transform("code", {
37+
presets: [
38+
["es2015", {
39+
modules: false
40+
}]
41+
],
42+
plugins: ["transform-es2015-modules-strip"]
43+
});
44+
```

lib/index.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module.exports = function() {
2+
return {
3+
visitor: {
4+
ModuleDeclaration(path) {
5+
path.remove();
6+
}
7+
}
8+
};
9+
}

package.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"name": "babel-plugin-transform-es2015-modules-strip",
3+
"version": "0.1.0",
4+
"description": "A Babel plugin that strips import and export declarations.",
5+
"keywords": [
6+
"babel-plugin"
7+
],
8+
"homepage": "https://github.com/bardiharborow/babel-plugin-transform-es2015-modules-strip",
9+
"bugs": {
10+
"url": "https://github.com/bardiharborow/babel-plugin-transform-es2015-modules-strip/issues",
11+
"email": "[email protected]"
12+
},
13+
"license": "MIT",
14+
"author": {
15+
"name": "Bardi Harborow",
16+
"email": "[email protected]",
17+
"url": "https://bardiharborow.com/"
18+
},
19+
"main": "lib/index.js",
20+
"repository": {
21+
"type": "git",
22+
"url": "https://github.com/bardiharborow/babel-plugin-transform-es2015-modules-strip.git"
23+
}
24+
}

0 commit comments

Comments
 (0)