Skip to content

Commit b43c7d5

Browse files
Dimitar TachevDimitar Tachev
authored andcommitted
fix: fix demo bundling with symlink
1 parent 71c15ad commit b43c7d5

File tree

13 files changed

+24
-32
lines changed

13 files changed

+24
-32
lines changed

demo/app/app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ purpose of the file is to pass control to the app’s first module.
55
*/
66

77
import "./bundle-config";
8-
import * as app from "application";
8+
import * as app from "tns-core-modules/application";
99
app.run({ moduleName: "app-root" });
1010

1111
/*

demo/app/bundle-config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
if (global.TNS_WEBPACK) {
22
// Register tns-core-modules UI framework modules
3-
require("bundle-entry-points");
3+
require("tns-core-modules/bundle-entry-points");
44

55
// Register application modules
66
// This will register each `root`, `page`, `fragment` postfixed xml, css, js, ts, scss file in the app/ folder

demo/app/home/home-page.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ a code-behind file. The code-behind is a great place to place your view
44
logic, and to set up your page’s data binding.
55
*/
66

7-
import { NavigatedData, Page } from "ui/page";
7+
import { NavigatedData, Page } from "tns-core-modules/ui/page";
88

99
import { HomeViewModel } from "./home-view-model";
1010

demo/app/home/home-view-model.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import * as bghttp from "nativescript-background-http";
2-
import { isIOS } from "platform";
3-
import { Observable } from 'data/observable';
4-
import { ObservableArray } from "data/observable-array";
5-
import * as app from "application";
6-
import * as fs from "file-system";
2+
import { isIOS } from "tns-core-modules/platform";
3+
import { Observable } from 'tns-core-modules/data/observable';
4+
import { ObservableArray } from "tns-core-modules/data/observable-array";
5+
import * as app from "tns-core-modules/application";
6+
import * as fs from "tns-core-modules/file-system";
77

88
export class HomeViewModel extends Observable {
99
tasks: ObservableArray<bghttp.Task>;
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
require("application");
1+
require("tns-core-modules/application");
22
if (!global["__snapshot"]) {
33
// In case snapshot generation is enabled these modules will get into the bundle
44
// but will not be required/evaluated.
55
// The snapshot webpack plugin will add them to the tns-java-classes.js bundle file.
66
// This way, they will be evaluated on app start as early as possible.
7-
require("ui/frame");
8-
require("ui/frame/activity");
7+
require("tns-core-modules/ui/frame");
8+
require("tns-core-modules/ui/frame/activity");
99
}

demo/app/vendor.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
// Snapshot the ~/app.css and the theme
2-
const application = require("application");
3-
require("ui/styling/style-scope");
2+
require("tns-core-modules/globals");
3+
const application = require("tns-core-modules/application");
4+
require("tns-core-modules/ui/styling/style-scope");
45
const appCssContext = require.context("~/", false, /^\.\/app\.(css|scss|less|sass)$/);
56
global.registerWebpackModules(appCssContext);
67
application.loadAppCss();
78

89
require("./vendor-platform");
910

10-
require("bundle-entry-points");
11+
require("tns-core-modules/bundle-entry-points");
1112
require("nativescript-background-http");

demo/tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
"app/*"
1717
],
1818
"*": [
19-
"./node_modules/tns-core-modules/*",
2019
"./node_modules/*"
2120
]
2221
}

demo/webpack.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ module.exports = env => {
6565
extensions: [".ts", ".js", ".scss", ".css"],
6666
// Resolve {N} system modules from tns-core-modules
6767
modules: [
68+
resolve(__dirname, "node_modules"),
69+
resolve(__dirname, "node_modules/tns-core-modules"),
6870
"node_modules/tns-core-modules",
6971
"node_modules",
7072
],

src/background-http.android.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import * as application from "application";
2-
import { Observable } from "data/observable";
3-
import * as fileSystemModule from "file-system";
1+
import * as application from "tns-core-modules/application";
2+
import { Observable } from "tns-core-modules/data/observable";
3+
import * as fileSystemModule from "tns-core-modules/file-system";
44
import * as common from "./index";
55

66
type Context = android.content.Context;

src/background-http.ios.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { Observable } from "data/observable";
1+
import { Observable } from "tns-core-modules/data/observable";
22
import * as common from "./index";
3-
import * as fileSystemModule from "file-system";
4-
import * as utils from "utils/utils";
3+
import * as fileSystemModule from "tns-core-modules/file-system";
4+
import * as utils from "tns-core-modules/utils/utils";
55

66
const main_queue = dispatch_get_current_queue();
77
let zonedOnProgress = null;

0 commit comments

Comments
 (0)