File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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+ ```
Original file line number Diff line number Diff line change 1+ module . exports = function ( ) {
2+ return {
3+ visitor : {
4+ ModuleDeclaration ( path ) {
5+ path . remove ( ) ;
6+ }
7+ }
8+ } ;
9+ }
Original file line number Diff line number Diff line change 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+ 12+ },
13+ "license" : " MIT" ,
14+ "author" : {
15+ "name" : " Bardi Harborow" ,
16+ 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+ }
You can’t perform that action at this time.
0 commit comments