Skip to content

Commit db73fd3

Browse files
committed
output ES modules to better support tree-shaking, closes #326
1 parent 6f75b10 commit db73fd3

File tree

4 files changed

+19
-4
lines changed

4 files changed

+19
-4
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
*.log
22
node_modules
33
lib
4+
es6
45
dev
56
coverage
67
declaration/out/src

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
**Note**: Gaps between patch versions are faulty/broken releases. **Note**: A feature tagged as Experimental is in a
1515
high state of flux, you're at risk of it changing without notice.
1616

17+
# 1.8.6
18+
19+
output ES modules to better support tree-shaking, closes #326 (@gcanti)
20+
1721
# 1.8.5
1822

1923
- **Bug Fix**

package.json

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
{
22
"name": "io-ts",
3-
"version": "1.8.5",
3+
"version": "1.8.6",
44
"description": "TypeScript compatible runtime type system for IO validation",
55
"files": [
6-
"lib"
6+
"lib",
7+
"es6"
78
],
89
"main": "lib/index.js",
10+
"module": "es6/index.js",
911
"typings": "lib/index.d.ts",
12+
"sideEffects": false,
1013
"scripts": {
1114
"lint": "tslint -p tsconfig.json src/**/*.ts test/**/*.ts",
1215
"jest": "jest",
1316
"prettier": "prettier --no-semi --single-quote --print-width 120 --parser typescript --list-different \"{src,test}/**/*.ts\"",
1417
"fix-prettier": "prettier --no-semi --single-quote --print-width 120 --parser typescript --write \"{src,test,examples,exercises}/**/*.ts\"",
1518
"test": "npm run prettier && npm run lint && npm run dtslint && npm run declaration && npm run jest",
16-
"clean": "rimraf lib/*",
17-
"build": "npm run clean && tsc",
19+
"clean": "rimraf lib/* es6/*",
20+
"build": "npm run clean && tsc && tsc -p tsconfig.es6.json",
1821
"prepublish": "npm run build",
1922
"perf": "node perf/index",
2023
"dtslint": "dtslint dtslint",

tsconfig.es6.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"outDir": "./es6",
5+
"module": "es6"
6+
}
7+
}

0 commit comments

Comments
 (0)