Skip to content

Commit d2c5468

Browse files
authored
feat(deps): update to NativeScript 2.5.0 (#156)
1 parent 98872bb commit d2c5468

File tree

2 files changed

+117
-112
lines changed

2 files changed

+117
-112
lines changed

package.json

+106-106
Original file line numberDiff line numberDiff line change
@@ -1,109 +1,109 @@
11
{
2-
"name": "nativescript-sdk-examples-ng",
3-
"description": "NativeScript & Angular 2 SDK Examples",
4-
"author": "Telerik <[email protected]>",
5-
"version": "0.1.0",
6-
"homepage": "https://github.com/NativeScript/nativescript-sdk-examples-ng",
7-
"repository": {
8-
"type": "git",
9-
"url": "https://github.com/NativeScript/nativescript-sdk-examples-ng"
2+
"name": "nativescript-sdk-examples-ng",
3+
"description": "NativeScript & Angular 2 SDK Examples",
4+
"author": "Telerik <[email protected]>",
5+
"version": "0.1.0",
6+
"homepage": "https://github.com/NativeScript/nativescript-sdk-examples-ng",
7+
"repository": {
8+
"type": "git",
9+
"url": "https://github.com/NativeScript/nativescript-sdk-examples-ng"
10+
},
11+
"bugs": {
12+
"url": "https://github.com/NativeScript/nativescript-sdk-examples-ng/issues"
13+
},
14+
"keywords": [
15+
"NativeScript",
16+
"Angular",
17+
"SDK",
18+
"example",
19+
"documentation"
20+
],
21+
"license": "Apache-2.0",
22+
"nativescript": {
23+
"id": "org.nativescript.nativescriptsdkexamplesng",
24+
"tns-ios": {
25+
"version": "2.5.0"
1026
},
11-
"bugs": {
12-
"url": "https://github.com/NativeScript/nativescript-sdk-examples-ng/issues"
13-
},
14-
"keywords": [
15-
"NativeScript",
16-
"Angular",
17-
"SDK",
18-
"example",
19-
"documentation"
20-
],
21-
"license": "Apache-2.0",
22-
"nativescript": {
23-
"id": "org.nativescript.nativescriptsdkexamplesng",
24-
"tns-ios": {
25-
"version": "2.4.0"
26-
},
27-
"tns-android": {
28-
"version": "2.4.1"
29-
}
30-
},
31-
"dependencies": {
32-
"@angular/common": "2.4.3",
33-
"@angular/compiler": "2.4.3",
34-
"@angular/core": "2.4.3",
35-
"@angular/forms": "2.4.3",
36-
"@angular/http": "2.4.3",
37-
"@angular/platform-browser": "2.4.3",
38-
"@angular/platform-browser-dynamic": "2.4.3",
39-
"@angular/router": "3.4.3",
40-
"nativescript-angular": "next",
41-
"nativescript-camera": "0.0.7",
42-
"nativescript-geolocation": "0.0.14",
43-
"nativescript-googlemaps": "0.0.6",
44-
"nativescript-intl": "~0.0.6",
45-
"nativescript-theme-core": "^1.0.0",
46-
"reflect-metadata": "~0.1.8",
47-
"rxjs": "~5.0.1",
48-
"tns-core-modules": "2.4.4"
49-
},
50-
"devDependencies": {
51-
"@angular/compiler-cli": "2.4.3",
52-
"@ngtools/webpack": "1.2.1",
53-
"babel-traverse": "6.11.4",
54-
"babel-types": "6.11.1",
55-
"babylon": "6.8.4",
56-
"codelyzer": "~2.0.0-beta.3",
57-
"copy-webpack-plugin": "~3.0.1",
58-
"css-loader": "~0.26.0",
59-
"extract-text-webpack-plugin": "2.0.0-beta.5",
60-
"fs-extra": "^0.30.0",
61-
"glob": "^7.0.5",
62-
"lazy": "1.0.11",
63-
"markdown-snippet-injector": "^0.2.0",
64-
"nativescript-dev-typescript": "https://github.com/NativeScript/nativescript-dev-typescript.git#master",
65-
"nativescript-dev-webpack": "^0.3.0",
66-
"opener": "^1.4.1",
67-
"raw-loader": "~0.5.1",
68-
"resolve-url-loader": "~1.6.0",
69-
"rimraf": "^2.5.3",
70-
"tar.gz": "^1.0.5",
71-
"tns-platform-declarations": "^2.4.0",
72-
"tslint": "~4.0.2",
73-
"typescript": "~2.1.0",
74-
"webpack": "~2.1.0-beta.27",
75-
"webpack-sources": "~0.1.3",
76-
"zone.js": "~0.7.2",
77-
"nativescript-css-loader": "~0.26.0",
78-
"htmlparser2": "^3.9.2"
79-
},
80-
"scripts": {
81-
"pretsc": "npm install",
82-
"tsc": "tsc",
83-
"pretslint": "npm run tsc",
84-
"tslint": "tslint -C tsconfig.json --project tslint.json",
85-
"prebuild": "npm run tslint",
86-
"build": "node scripts/build.js",
87-
"postbuild": "npm run inject && npm run archive",
88-
"inject": "mdinject --root=app --docsroot=dist/sdk-examples --sourceext=\".ts|.css|.html\" --snippettitles=\"TypeScript|CSS|HTML\"",
89-
"archive": "node scripts/archive.js",
90-
"prepush-to-github": "npm run build",
91-
"push-to-github": "(cd dist/sdk-examples && rimraf .git && git init && git add -A && git commit -m \"nativescript-sdk-examples build preview\" && git remote add origin [email protected]:NativeScript/nativescript-sdk-examples-preview.git && git push -u --force origin master)",
92-
"preshow-preview": "npm run push-to-github",
93-
"show-preview": "opener https://github.com/NativeScript/nativescript-sdk-examples-preview",
94-
"clean-android": "tns clean-app android",
95-
"clean-ios": "tns clean-app ios",
96-
"prewebpack-android": "npm run clean-android",
97-
"prewebpack-ios": "npm run clean-ios",
98-
"webpack-android": "webpack --config=webpack.android.js --progress",
99-
"webpack-ios": "webpack --config=webpack.ios.js --progress",
100-
"prestart-android-bundle": "npm run webpack-android",
101-
"prestart-ios-bundle": "npm run webpack-ios",
102-
"start-android-bundle": "tns run android --bundle --disable-npm-install",
103-
"start-ios-bundle": "tns run ios --bundle --disable-npm-install",
104-
"prebuild-android-bundle": "npm run webpack-android",
105-
"prebuild-ios-bundle": "npm run webpack-ios",
106-
"build-android-bundle": "tns build android --bundle --disable-npm-install",
107-
"build-ios-bundle": "tns build ios --bundle --disable-npm-install"
27+
"tns-android": {
28+
"version": "2.5.0"
10829
}
109-
}
30+
},
31+
"dependencies": {
32+
"@angular/common": "2.4.5",
33+
"@angular/compiler": "2.4.5",
34+
"@angular/core": "2.4.5",
35+
"@angular/forms": "2.4.5",
36+
"@angular/http": "2.4.5",
37+
"@angular/platform-browser": "2.4.5",
38+
"@angular/platform-browser-dynamic": "2.4.5",
39+
"@angular/router": "3.4.5",
40+
"nativescript-angular": "1.4.0",
41+
"nativescript-camera": "0.0.7",
42+
"nativescript-geolocation": "0.0.14",
43+
"nativescript-googlemaps": "0.0.6",
44+
"nativescript-intl": "~0.0.6",
45+
"nativescript-theme-core": "^1.0.0",
46+
"reflect-metadata": "~0.1.8",
47+
"rxjs": "~5.0.1",
48+
"tns-core-modules": "2.5.0"
49+
},
50+
"devDependencies": {
51+
"@angular/compiler-cli": "2.4.5",
52+
"@ngtools/webpack": "1.2.4",
53+
"babel-traverse": "6.11.4",
54+
"babel-types": "6.11.1",
55+
"babylon": "6.8.4",
56+
"codelyzer": "~2.0.0-beta.3",
57+
"copy-webpack-plugin": "~3.0.1",
58+
"css-loader": "~0.26.0",
59+
"extract-text-webpack-plugin": "~2.0.0-beta.5",
60+
"fs-extra": "^0.30.0",
61+
"glob": "^7.0.5",
62+
"lazy": "1.0.11",
63+
"markdown-snippet-injector": "^0.2.0",
64+
"nativescript-dev-typescript": "^0.3.2",
65+
"nativescript-dev-webpack": "^0.3.0",
66+
"opener": "^1.4.1",
67+
"raw-loader": "~0.5.1",
68+
"resolve-url-loader": "~1.6.0",
69+
"rimraf": "^2.5.3",
70+
"tar.gz": "^1.0.5",
71+
"tns-platform-declarations": "^2.4.0",
72+
"tslint": "~4.0.2",
73+
"typescript": "~2.1.0",
74+
"webpack": "2.2.0",
75+
"webpack-sources": "~0.1.3",
76+
"zone.js": "~0.7.2",
77+
"nativescript-css-loader": "~0.26.0",
78+
"htmlparser2": "^3.9.2"
79+
},
80+
"scripts": {
81+
"pretsc": "npm install",
82+
"tsc": "tsc",
83+
"pretslint": "npm run tsc",
84+
"tslint": "tslint -C tsconfig.json --project tslint.json",
85+
"prebuild": "npm run tslint",
86+
"build": "node scripts/build.js",
87+
"postbuild": "npm run inject && npm run archive",
88+
"inject": "mdinject --root=app --docsroot=dist/sdk-examples --sourceext=\".ts|.css|.html\" --snippettitles=\"TypeScript|CSS|HTML\"",
89+
"archive": "node scripts/archive.js",
90+
"prepush-to-github": "npm run build",
91+
"push-to-github": "(cd dist/sdk-examples && rimraf .git && git init && git add -A && git commit -m \"nativescript-sdk-examples build preview\" && git remote add origin [email protected]:NativeScript/nativescript-sdk-examples-preview.git && git push -u --force origin master)",
92+
"preshow-preview": "npm run push-to-github",
93+
"show-preview": "opener https://github.com/NativeScript/nativescript-sdk-examples-preview",
94+
"clean-android": "tns clean-app android",
95+
"clean-ios": "tns clean-app ios",
96+
"prewebpack-android": "npm run clean-android",
97+
"prewebpack-ios": "npm run clean-ios",
98+
"webpack-android": "webpack --config=webpack.android.js --progress",
99+
"webpack-ios": "webpack --config=webpack.ios.js --progress",
100+
"prestart-android-bundle": "npm run webpack-android",
101+
"prestart-ios-bundle": "npm run webpack-ios",
102+
"start-android-bundle": "tns run android --bundle --disable-npm-install",
103+
"start-ios-bundle": "tns run ios --bundle --disable-npm-install",
104+
"prebuild-android-bundle": "npm run webpack-android",
105+
"prebuild-ios-bundle": "npm run webpack-ios",
106+
"build-android-bundle": "tns build android --bundle --disable-npm-install",
107+
"build-ios-bundle": "tns build ios --bundle --disable-npm-install"
108+
}
109+
}

webpack.common.js

+11-6
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ module.exports = function (platform, destinationApp) {
2727
}),
2828
//Define useful constants like TNS_WEBPACK
2929
new webpack.DefinePlugin({
30-
global: "global",
31-
__dirname: "__dirname",
3230
"global.TNS_WEBPACK": "true",
3331
}),
3432
//Copy assets to out dir. Add your own globs as needed.
@@ -45,26 +43,32 @@ module.exports = function (platform, destinationApp) {
4543
"./vendor",
4644
"./bundle",
4745
]),
46+
4847
// Exclude explicitly required but never declared in XML elements.
49-
// Loader nativescript-dev-webpack/tns-xml-loader should be added for *.xml/html files.
48+
// Loader nativescript-dev-webpack/tns-xml-loader should be added for *.xml/html and *.ts files.
5049
new nsWebpack.ExcludeUnusedElementsPlugin(),
50+
5151
//Angular AOT compiler
5252
new AotPlugin({
5353
tsConfigPath: "tsconfig.aot.json",
5454
entryModule: path.resolve(__dirname, "app/app.module#AppModule"),
5555
typeChecking: false
5656
}),
57+
new nsWebpack.StyleUrlResolvePlugin({platform}),
5758
];
5859

5960
if (process.env.npm_config_uglify) {
61+
plugins.push(new webpack.LoaderOptionsPlugin({
62+
minimize: true
63+
}));
64+
6065
//Work around an Android issue by setting compress = false
6166
var compress = platform !== "android";
6267
plugins.push(new webpack.optimize.UglifyJsPlugin({
6368
mangle: {
6469
except: nsWebpack.uglifyMangleExcludes,
6570
},
6671
compress: compress,
67-
comments: false
6872
}));
6973
}
7074

@@ -107,15 +111,15 @@ module.exports = function (platform, destinationApp) {
107111
test: /\.html$|\.xml$/,
108112
loaders: [
109113
"raw-loader",
110-
'nativescript-dev-webpack/tns-xml-loader'
114+
"nativescript-dev-webpack/tns-xml-loader",
111115
]
112116
},
113117
// Root app.css file gets extracted with bundled dependencies
114118
{
115119
test: /app\.css$/,
116120
loader: ExtractTextPlugin.extract([
117121
"resolve-url-loader",
118-
"css-loader",
122+
"nativescript-css-loader",
119123
"nativescript-dev-webpack/platform-css-loader",
120124
]),
121125
},
@@ -131,6 +135,7 @@ module.exports = function (platform, destinationApp) {
131135
{
132136
test: /\.ts$/,
133137
loaders: [
138+
"nativescript-dev-webpack/tns-xml-loader",
134139
"nativescript-dev-webpack/tns-aot-loader",
135140
"@ngtools/webpack",
136141
]

0 commit comments

Comments
 (0)