Skip to content

Commit c22b7ce

Browse files
authored
Merge pull request #110 from NativeScript/lini/update-plugin-3.2.0
Update plugin structure
2 parents bdfca8c + c2c3a56 commit c22b7ce

File tree

177 files changed

+355
-1248
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

177 files changed

+355
-1248
lines changed

.gitignore

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
1-
# Output
2-
dist
3-
4-
# Dev dependencies
5-
node_modules
6-
7-
# API reference
8-
api-ref
9-
10-
# Source, written in TypeScript so JavaScript is not necessary
11-
/nativescript-background-http/**/*.js
12-
/examples/SimpleBackgroundHttp/**/*.js
13-
14-
# Example platforms
15-
/examples/SimpleBackgroundHttp/platforms/
16-
/examples/SimpleBackgroundHttp/lib/
17-
1+
/.project
2+
.vscode
3+
.idea
184
.DS_Store
5+
*.js
6+
*.js.map
7+
*.log
8+
!src/scripts/*.js
9+
!src/hooks/*.js
10+
node_modules
1911

20-
npm-debug.log
12+
demo/app/*.js
13+
demo/*.d.ts
14+
demo/hooks
15+
demo/platforms
16+
demo/node_modules
17+
demo/report

.gitmodules

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

examples/www/package.json renamed to demo-server/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
{
2+
"name": "bghttp-demo-server",
3+
"version": "1.0.0",
24
"dependencies": {
35
"stream-throttle": "*"
46
}
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
package="__PACKAGE__"
4-
android:versionCode="1"
4+
android:versionCode="10000"
55
android:versionName="1.0">
66

77
<supports-screens

examples/SimpleBackgroundHttpNG/app/App_Resources/Android/app.gradle renamed to demo/app/App_Resources/Android/app.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
android {
99
defaultConfig {
1010
generatedDensities = []
11-
applicationId = "org.nativescript.SimpleBackgroundHttpNG"
11+
applicationId = "org.nativescript.demo"
1212
}
1313
aaptOptions {
1414
additionalParameters "--no-version-vectors"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@
1919

2020
<style name="NativeScriptToolbarStyle" parent="NativeScriptToolbarStyleBase">
2121
<item name="android:elevation">4dp</item>
22-
</style>
22+
</style>
2323
</resources>
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
<item name="android:windowActionBarOverlay">true</item>
1515
<item name="android:windowTranslucentStatus">true</item>
16-
1716
</style>
1817

1918
<style name="LaunchScreenTheme" parent="LaunchScreenThemeBase">
@@ -26,7 +25,6 @@
2625
<item name="colorPrimary">@color/ns_primary</item>
2726
<item name="colorPrimaryDark">@color/ns_primaryDark</item>
2827
<item name="colorAccent">@color/ns_accent</item>
29-
3028
</style>
3129

3230
<style name="AppTheme" parent="AppThemeBase">
@@ -37,9 +35,8 @@
3735
<item name="android:background">@color/ns_primary</item>
3836
<item name="theme">@style/ThemeOverlay.AppCompat.ActionBar</item>
3937
<item name="popupTheme">@style/ThemeOverlay.AppCompat</item>
40-
4138
</style>
4239

4340
<style name="NativeScriptToolbarStyle" parent="NativeScriptToolbarStyleBase">
4441
</style>
45-
</resources>
42+
</resources>
Lines changed: 7 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,6 @@
3030
"filename" : "[email protected]",
3131
"scale" : "3x"
3232
},
33-
{
34-
"size" : "57x57",
35-
"idiom" : "iphone",
36-
"filename" : "icon-57.png",
37-
"scale" : "1x"
38-
},
39-
{
40-
"size" : "57x57",
41-
"idiom" : "iphone",
42-
"filename" : "[email protected]",
43-
"scale" : "2x"
44-
},
4533
{
4634
"size" : "60x60",
4735
"idiom" : "iphone",
@@ -78,30 +66,6 @@
7866
"filename" : "[email protected]",
7967
"scale" : "2x"
8068
},
81-
{
82-
"size" : "50x50",
83-
"idiom" : "ipad",
84-
"filename" : "icon-50.png",
85-
"scale" : "1x"
86-
},
87-
{
88-
"size" : "50x50",
89-
"idiom" : "ipad",
90-
"filename" : "[email protected]",
91-
"scale" : "2x"
92-
},
93-
{
94-
"size" : "72x72",
95-
"idiom" : "ipad",
96-
"filename" : "icon-72.png",
97-
"scale" : "1x"
98-
},
99-
{
100-
"size" : "72x72",
101-
"idiom" : "ipad",
102-
"filename" : "[email protected]",
103-
"scale" : "2x"
104-
},
10569
{
10670
"size" : "76x76",
10771
"idiom" : "ipad",
@@ -119,7 +83,13 @@
11983
"idiom" : "ipad",
12084
"filename" : "[email protected]",
12185
"scale" : "2x"
122-
}
86+
},
87+
{
88+
"size" : "1024x1024",
89+
"idiom" : "ios-marketing",
90+
"filename" : "icon-1024.png",
91+
"scale" : "1x"
92+
}
12393
],
12494
"info" : {
12595
"version" : 1,
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
{
22
"images" : [
3+
{
4+
"extent" : "full-screen",
5+
"idiom" : "iphone",
6+
"subtype" : "2436h",
7+
"filename" : "Default-1125h.png",
8+
"minimum-system-version" : "11.0",
9+
"orientation" : "portrait",
10+
"scale" : "3x"
11+
},
12+
{
13+
"orientation" : "landscape",
14+
"idiom" : "iphone",
15+
"extent" : "full-screen",
16+
"filename" : "Default-Landscape-X.png",
17+
"minimum-system-version" : "11.0",
18+
"subtype" : "2436h",
19+
"scale" : "3x"
20+
},
321
{
422
"extent" : "full-screen",
523
"idiom" : "iphone",
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10116" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
3+
<device id="retina5_9" orientation="portrait">
4+
<adaptation id="fullscreen"/>
5+
</device>
36
<dependencies>
47
<deployment identifier="iOS"/>
5-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
8+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
9+
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
610
</dependencies>
711
<scenes>
812
<!--View Controller-->
@@ -14,36 +18,36 @@
1418
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
1519
</layoutGuides>
1620
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
17-
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
21+
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
1822
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
1923
<subviews>
2024
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="LaunchScreen.AspectFill" translatesAutoresizingMaskIntoConstraints="NO" id="wtH-rr-YfP">
21-
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
25+
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
2226
</imageView>
2327
<imageView userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="LaunchScreen.Center" translatesAutoresizingMaskIntoConstraints="NO" id="s1z-aa-wYv">
24-
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
28+
<rect key="frame" x="0.0" y="150" width="375" height="512"/>
2529
</imageView>
2630
</subviews>
27-
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
31+
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
2832
<constraints>
29-
<constraint firstItem="xb3-aO-Qok" firstAttribute="top" secondItem="wtH-rr-YfP" secondAttribute="bottom" id="5FO-pR-qKb"/>
33+
<constraint firstAttribute="trailing" secondItem="s1z-aa-wYv" secondAttribute="trailing" id="4Rf-kf-vql"/>
34+
<constraint firstAttribute="bottom" secondItem="wtH-rr-YfP" secondAttribute="bottom" id="5CS-At-4ka"/>
3035
<constraint firstItem="wtH-rr-YfP" firstAttribute="top" secondItem="Ze5-6b-2t3" secondAttribute="top" id="Awn-b8-xf1"/>
31-
<constraint firstItem="s1z-aa-wYv" firstAttribute="top" secondItem="Ze5-6b-2t3" secondAttribute="top" id="CiP-yX-1sg"/>
36+
<constraint firstItem="s1z-aa-wYv" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" id="BpJ-vb-eKA"/>
37+
<constraint firstItem="s1z-aa-wYv" firstAttribute="trailing" secondItem="wtH-rr-YfP" secondAttribute="trailing" id="QIM-7J-OZz"/>
3238
<constraint firstAttribute="trailing" secondItem="wtH-rr-YfP" secondAttribute="trailing" id="RXg-rW-UK8"/>
33-
<constraint firstItem="s1z-aa-wYv" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" id="agC-wa-3bd"/>
39+
<constraint firstItem="s1z-aa-wYv" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="Rcp-LG-48z"/>
3440
<constraint firstItem="wtH-rr-YfP" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" id="cch-8E-tYu"/>
35-
<constraint firstItem="xb3-aO-Qok" firstAttribute="top" secondItem="s1z-aa-wYv" secondAttribute="bottom" id="fNc-Ro-KaG"/>
36-
<constraint firstAttribute="trailing" secondItem="s1z-aa-wYv" secondAttribute="trailing" id="qoI-OC-Zk7"/>
3741
</constraints>
3842
</view>
3943
</viewController>
4044
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
4145
</objects>
42-
<point key="canvasLocation" x="510" y="238"/>
46+
<point key="canvasLocation" x="509.60000000000002" y="237.93103448275863"/>
4347
</scene>
4448
</scenes>
4549
<resources>
4650
<image name="LaunchScreen.AspectFill" width="768" height="1024"/>
47-
<image name="LaunchScreen.Center" width="40" height="40"/>
51+
<image name="LaunchScreen.Center" width="384" height="512"/>
4852
</resources>
4953
</document>
Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
1-
/*
1+
/*
22
In NativeScript, the app.css file is where you place CSS rules that
33
you would like to apply to your entire application. Check out
44
http://docs.nativescript.org/ui/styling for a full list of the CSS
55
selectors and properties you can use to style UI components.
66
7+
/*
8+
For example, the following CSS rule changes the font size of all UI
9+
components that have the btn class name.
10+
*/
11+
.btn {
12+
font-size: 18;
13+
}
14+
715
/*
816
In many cases you may want to use the NativeScript core theme instead
917
of writing your own CSS rules. For a full list of class names in the theme
1018
refer to http://docs.nativescript.org/ui/theme.
1119
*/
12-
@import 'nativescript-theme-core/css/core.light.css';
20+
@import '~nativescript-theme-core/css/core.light.css';

examples/SimpleBackgroundHttp/app/app.ts renamed to demo/app/app.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
/*
22
In NativeScript, the app.ts file is the entry point to your application.
33
You can use this file to perform app-level initialization, but the primary
4-
purpose of the file is to pass control to the app’s first module.
4+
purpose of the file is to pass control to the app’s first module.
55
*/
66

7+
import * as app from "application";
78
import "./bundle-config";
8-
import * as application from 'application';
99

10-
application.start({ moduleName: 'main-page' });
10+
app.start({ moduleName: "home-page" });
1111

1212
/*
1313
Do not place any code after the application has been started as it will not
File renamed without changes.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
if ((<any>global).TNS_WEBPACK) {
2-
//registers tns-core-modules UI framework modules
2+
// registers tns-core-modules UI framework modules
33
require("bundle-entry-points");
4-
4+
55
// register application modules
66
// This will register each `page` postfixed xml, css, js, ts, scss etc. in the app/ folder
7-
const context = (<any>require).context("~/", true, /(page|fragment)\.(xml|css|js|ts|scss|less|sass)$/);
7+
const context = require.context("~/", true, /(page|fragment)\.(xml|css|js|ts|scss)$/);
88
global.registerWebpackModules(context);
99
}

demo/app/home-page.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { StackLayout } from "ui/layouts/stack-layout";
2+
import { NavigatedData } from "ui/page";
3+
4+
import { HomeViewModel } from "./home-view-model";
5+
6+
/* ***********************************************************
7+
* Use the "onNavigatingTo" handler to initialize the page binding context.
8+
*************************************************************/
9+
export function onNavigatingTo(args: NavigatedData) {
10+
const page = <StackLayout>args.object;
11+
page.bindingContext = new HomeViewModel();
12+
}

demo/app/home-page.xml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<Page class="page" navigatingTo="onNavigatingTo"
2+
xmlns="http://schemas.nativescript.org/tns.xsd">
3+
<ActionBar class="action-bar">
4+
<Label class="action-bar-title" text="Home"></Label>
5+
</ActionBar>
6+
<GridLayout rows="3*,10, 2*, auto" columns="*, *, *">
7+
<ListView colSpan="3" items="{{ tasks }}">
8+
<ListView.itemTemplate>
9+
<StackLayout>
10+
<Label text="{{ description }}" />
11+
<Progress value="{{ upload }}" maxValue="{{ totalUpload }}" />
12+
<Label text="{{ upload, 'Uploading: ' + upload + ' / ' + totalUpload }}" />
13+
<Label text="{{ status, 'status: ' + status }}" />
14+
</StackLayout>
15+
</ListView.itemTemplate>
16+
</ListView>
17+
<StackLayout class="hr-dark" row="1" colSpan="3"></StackLayout>
18+
<ListView row="2" colSpan="3" items="{{ events }}">
19+
<ListView.itemTemplate>
20+
<StackLayout>
21+
<Label text="{{ eventTitle }} " />
22+
<Label text="{{ eventData }}" textWrap="true" />
23+
</StackLayout>
24+
</ListView.itemTemplate>
25+
</ListView>
26+
<Button row="3" margin="2" text="Upload!" tap="{{ upload }}" />
27+
<Button row="3" col="1" margin="2" text="Erro-Up!" tap="{{ upload_error }}" />
28+
<Button row="3" col="2" margin="2" text="MultiPart-Up!" tap="{{ upload_multi }}" />
29+
</GridLayout>
30+
</Page>

0 commit comments

Comments
 (0)