Skip to content

Commit c6899d8

Browse files
Lars Kinn Ekrollraveclassic
authored andcommitted
fix: rewrite imports from lib to es6 in es6 output
closes #46, #49
1 parent 23a8362 commit c6899d8

File tree

4 files changed

+89
-5
lines changed

4 files changed

+89
-5
lines changed

package-lock.json

Lines changed: 84 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"prettier": "prettier --list-different \"./src/**/*.ts\"",
1414
"prettier:fix": "prettier --write \"./src/**/*.ts\"",
1515
"prepublishOnly": "npm run test && npm run build",
16+
"postbuild": "import-path-rewrite",
1617
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
1718
"version": "npm run changelog && git add CHANGELOG.md"
1819
},
@@ -22,6 +23,7 @@
2223
"@devexperts/lint": "^0.29.1",
2324
"@types/jest": "^22.2.3",
2425
"conventional-changelog-cli": "^2.0.21",
26+
"import-path-rewrite": "github:gcanti/import-path-rewrite",
2527
"jest": "^24.8.0",
2628
"jest-cli": "^24.8.0",
2729
"prettier": "^1.17.1",
@@ -34,7 +36,7 @@
3436
"dependencies": {
3537
"fp-ts": "^2.0.0",
3638
"io-ts": "^2.0.0",
37-
"io-ts-types": "^0.5.0",
39+
"io-ts-types": "^0.5.7",
3840
"tslib": "^1.9.3"
3941
},
4042
"repository": {

src/remote-data-io.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { RemoteData, RemoteFailure, RemoteInitial, RemotePending, RemoteProgress, RemoteSuccess } from './remote-data';
22
import { optionFromNullable } from 'io-ts-types/lib/optionFromNullable';
3-
import { literal, number, type, Type, union } from 'io-ts';
3+
import { literal, number, type, Type, union } from 'io-ts/lib/index';
44

55
export type JSONRemoteProgress = {
66
loaded: number;

tsconfig.es6.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"extends": "./tsconfig.build.json",
33
"compilerOptions": {
44
"outDir": "./es6",
5+
"target": "es6",
56
"module": "es6"
67
}
78
}

0 commit comments

Comments
 (0)