Skip to content

Commit 5693bd2

Browse files
committed
Updated readme
1 parent 2f0ce3e commit 5693bd2

File tree

3 files changed

+19
-6
lines changed

3 files changed

+19
-6
lines changed

.npmignore

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

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,23 @@
33
Node 6 supports almost whole ES 6 specification but there is not support for ES6 imports :/
44

55
This plugin transforms your ES6 imports to commonjs counterparts.
6-
No sourcemapping is needed.
6+
**NO BABEL, No sourcemapping is needed**.
77

88
**The output is in ES6**.
99

1010
As a result, you can use it with Node 6 for server implementations.
1111

12+
EXAMPLE:
13+
14+
```js
15+
import Foo, { Foo1 } from 'Bar';
16+
17+
to
18+
19+
const Foo = require('Bar').default;
20+
const { Foo1 } = require('Bar');
21+
```
22+
1223
# How to use
1324

1425
Simply import the registration script as a first line in your server:

package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
"description": "Transforms import statements to commonjs",
55
"main": "dist/index.js",
66
"scripts": {
7-
"test": "echo \"Error: no test specified\" && exit 1"
7+
"test": "echo \"Tests are setup for Wallaby.JS\" && exit 1",
8+
"build": "tsc -p ./src"
9+
},
10+
"repository": {
11+
"url": "https://github.com/tomitrescak/transform-to-commonjs"
812
},
913
"keywords": [
1014
"NodeJs",
@@ -13,8 +17,5 @@
1317
"Javascript"
1418
],
1519
"author": "Tomi Trescak",
16-
"license": "MIT",
17-
"devDependencies": {
18-
"assert": "^1.4.1"
19-
}
20+
"license": "MIT"
2021
}

0 commit comments

Comments
 (0)