Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

Commit 14145be

Browse files
author
vakrilov
committed
chore: convert hmr folder to TS
1 parent f8312de commit 14145be

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

.gitignore

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,34 @@
22
node_modules
33
*.tgz
44
package-lock.json
5+
*.js.map
56

67
plugins/NativeScriptAngularCompilerPlugin.d.ts
78
plugins/NativeScriptAngularCompilerPlugin.js
8-
plugins/NativeScriptAngularCompilerPlugin.js.map
99

1010
transformers/*.d.ts
1111
transformers/*.js
12-
transformers/*.js.map
1312

1413
utils/*.d.ts
1514
utils/*.js
16-
utils/*.js.map
15+
16+
hmr/*.d.ts
17+
hmr/*.js
1718

1819
plugins/PlatformFSPlugin.d.ts
1920
plugins/PlatformFSPlugin.js
20-
plugins/PlatformFSPlugin.js.map
2121

2222
plugins/WatchStateLoggerPlugin.d.ts
2323
plugins/WatchStateLoggerPlugin.js
24-
plugins/WatchStateLoggerPlugin.js.map
2524

2625
host/resolver.d.ts
2726
host/resolver.js
28-
host/resolver.js.map
2927

3028
jasmine-config/reporter.d.ts
3129
jasmine-config/reporter.js
32-
jasmine-config/reporter.js.map
3330

3431
bundle-config-loader.d.ts
3532
bundle-config-loader.js
36-
bundle-config-loader.js.map
3733

3834
**/*.spec.js*
3935
**/*.spec.d.ts*

hmr/hmr-update.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

hmr/hmr-update.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
import update from "../hot";
3+
import { knownFolders } from "tns-core-modules/file-system";
4+
5+
declare const __webpack_require__: any;
6+
7+
export function hmrUpdate() {
8+
const applicationFiles = knownFolders.currentApp();
9+
const latestHash = __webpack_require__["h"]();
10+
return update(latestHash, filename => applicationFiles.getFile(filename));
11+
}

hmr/index.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

hmr/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { hmrUpdate } from "./hmr-update";

0 commit comments

Comments
 (0)