Skip to content

Commit b168518

Browse files
committed
Add node-esm test's index.mjs, remove .gitignore rules that blocked it in the first place
1 parent dd9bc87 commit b168518

2 files changed

Lines changed: 15 additions & 7 deletions

File tree

.gitignore

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
11
.rpt2_cache
22
packages/*/dist
3-
main.js
4-
main.es.js
5-
main.mjs
6-
main.min.js
7-
index.mjs
83
*.min.js
9-
*.es5.js
104
.esm-cache
11-
package-lock.json
125
env
136
.nyc_output
147
lib-cov

test/node-esm/index.mjs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import * as turf from "@turf/turf";
2+
3+
const polygon = turf.polygon([
4+
[
5+
[125, -15],
6+
[113, -22],
7+
[154, -27],
8+
[144, -15],
9+
[125, -15],
10+
],
11+
]);
12+
13+
const area = turf.area(polygon);
14+
15+
console.log(area);

0 commit comments

Comments
 (0)