Skip to content

Commit

Permalink
feat(ES Modules): Create ES Module compatible build
Browse files Browse the repository at this point in the history
  • Loading branch information
cblanc committed Jul 29, 2020
1 parent deb348b commit 44ef920
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 59 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ dist

.DS_Store
docs

esm
57 changes: 0 additions & 57 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "UK Postcode helper methods",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"module": "esm/index.js",
"engines": {
"node": ">= 10.0.0"
},
Expand Down Expand Up @@ -46,6 +47,7 @@
},
"files": [
"dist",
"esm",
"example.js"
],
"runkitExampleFilename": "example.js",
Expand All @@ -56,6 +58,7 @@
],
"exclude": [
"dist/*",
"esm/*",
"**/*.d.ts",
"generate/index.ts"
],
Expand All @@ -78,7 +81,7 @@
"prepublishOnly": "npm run build",
"lint": "eslint lib/**/*.ts",
"docs": "typedoc --mode file --excludePrivate --hideGenerator --excludeExternals --target ES5 --out docs/ --name 'Postcode.js' --theme minimal lib/",
"build": "tsc",
"build": "tsc && tsc --outDir esm -m ESNext",
"coverage": "nyc report --reporter=text-lcov > coverage.lcov && codecov"
},
"repository": {
Expand Down

0 comments on commit 44ef920

Please sign in to comment.