Skip to content
This repository was archived by the owner on Feb 10, 2023. It is now read-only.

Commit 841c991

Browse files
committed
feat(demo-app): Adding demo app for E2E
Provide simple app which uses the app to verify integration (see #11)
1 parent d810a40 commit 841c991

File tree

86 files changed

+943
-70
lines changed

Some content is hidden

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

86 files changed

+943
-70
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,8 @@ src/platforms
6868
src/hooks
6969
src/node_modules
7070
target/
71+
72+
# sample app
73+
sampleApp/hooks/
74+
sampleApp/node_modules/
75+
sampleApp/platforms/

.npmignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
.idea
2-
.vscode
1+
.idea/
2+
.vscode/
33
.babelrc
44
build.xcconfig
55
app/
66
demo/
77
hooks/
88
node_modules
9+
*.yml
10+
Jenkinsfile
911
*.gif
1012
*.jpg
1113
*.png
@@ -14,3 +16,4 @@ node_modules
1416
!*.d.ts
1517
spec/
1618
target/
19+
sampleApp/

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ script:
1717
- export PATH=$PATH:/usr/local/opt/android-sdk/tools:/usr/local/opt/android-sdk/platform-tools
1818
- npm run build
1919
- npm run test
20+
- npm run e2e
2021
before_install:
2122
- export ANDROID_HOME=/usr/local/opt/android-sdk
2223
- export PATH=$PATH:/usr/local/opt/android-sdk/tools:/usr/local/opt/android-sdk/platform-tools

Jenkinsfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ node('nativescript') {
3030
junit 'target/junit-report/junitresults-*.xml'
3131
}
3232

33+
stage('End2End Test') {
34+
sh "npm run e2e"
35+
}
36+
3337
stage('Publish NPM snapshot') {
3438
def currentVersion = sh(returnStdout: true, script: "npm version | grep \"{\" | tr -s ':' | cut -d \"'\" -f 4").trim()
3539
def newVersion = "${currentVersion}-${branchName}-${buildNumber}"

package.json

Lines changed: 72 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,73 @@
11
{
2-
"name": "nativescript-urlhandler",
3-
"version": "0.2.0",
4-
"description": "Register custom URLs for your NativeScript app",
5-
"scripts": {
6-
"preclean": "npm i rimraf",
7-
"clean": "rimraf node_modules lib hooks platforms target '*.js' '*.js.map' 'app/**/*.js' 'app/**/*.js.map' && npm i",
8-
"postclean": "npm i",
9-
"prebuild": "npm run tslint",
10-
"build": "npm run tsc",
11-
"tsc": "tsc",
12-
"tslint": "tslint \"*.ts\"",
13-
"test": "npm run tslint && npm run jasmine",
14-
"jasmine": "babel-node spec/run.js",
15-
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
16-
"changelog:add": "git add CHANGELOG.md && git commit -m 'updated CHANGELOG.md'",
17-
"release:pre": "npm run clean && npm run build && npm run test",
18-
"release:post": "npm run changelog && npm run changelog:add",
19-
"release:major": "npm run release:pre && npm version major && npm run release:post && git push origin && git push origin --tags && npm publish",
20-
"release:minor": "npm run release:pre && npm version minor && npm run release:post && git push origin && git push origin --tags && npm publish",
21-
"release:patch": "npm run release:pre && npm version patch && npm run release:post && git push origin && git push origin --tags && npm publish"
22-
},
23-
"main": "urlhandler",
24-
"typings": "urlhandler.d.ts",
25-
"nativescript": {
26-
"platforms": {
27-
"android": "2.3.0",
28-
"ios": "2.3.0"
29-
}
30-
},
31-
"dependencies": {},
32-
"peerDependencies": {
33-
"tns-core-modules": "^2.3.1"
34-
},
35-
"devDependencies": {
36-
"@types/jasmine": "2.5.46",
37-
"babel-cli": "6.24.0",
38-
"babel-core": "6.24.0",
39-
"babel-preset-es2015": "6.24.0",
40-
"babel-traverse": "6.18.0",
41-
"babel-types": "6.18.0",
42-
"conventional-changelog-cli": "1.3.1",
43-
"jasmine": "2.5.3",
44-
"jasmine-core": "2.5.2",
45-
"jasmine-reporters": "2.2.1",
46-
"mockery": "2.0.0",
47-
"nativescript-dev-typescript": "0.3.7",
48-
"rimraf": "2.6.1",
49-
"tns-core-modules": "2.5.1",
50-
"tns-platform-declarations": "2.5.0",
51-
"tslint": "4.5.1",
52-
"tslint-eslint-rules": "3.5.0",
53-
"typescript": "2.2.1"
54-
},
55-
"repository": {
56-
"type": "git",
57-
"url": "git+https://github.com/hypery2k/nativescript-urlhandler.git"
58-
},
59-
"keywords": [
60-
"NativeScript",
61-
"URL-Handler"
62-
],
63-
"author": "Martin Reinhardt",
64-
"license": "MIT",
65-
"bugs": {
66-
"url": "https://github.com/hypery2k/nativescript-urlhandler/issues"
67-
},
68-
"homepage": "https://github.com/hypery2k/nativescript-urlhandler"
69-
}
2+
"name": "nativescript-urlhandler",
3+
"version": "0.2.0",
4+
"description": "Register custom URLs for your NativeScript app",
5+
"scripts": {
6+
"preclean": "npm i rimraf",
7+
"clean": "rimraf node_modules hooks platforms target '*.js' '*.js.map' 'sampleApp/**/*.js' 'sampleApp/**/*.js.map' sampleApp/platforms sampleApp/node_modules sampleApp/hooks",
8+
"postclean": "npm i && cd sampleApp && npm i",
9+
"prebuild": "npm run tslint",
10+
"build": "npm run tsc",
11+
"tsc": "tsc",
12+
"tslint": "tslint \"*.ts\"",
13+
"test": "npm run tslint && npm run jasmine",
14+
"e2e": "npm run preparedemo && cd sampleApp && tns build ios && tns build android",
15+
"jasmine": "babel-node spec/run.js",
16+
"demo.ios": "npm run preparedemo && cd sampleApp && tns run ios --emulator",
17+
"demo.android": "npm run preparedemo && cd sampleApp && tns run android --emulator",
18+
"preparedemo": "npm run build && cd sampleApp && tns plugin remove nativescript-urlhandler && tns plugin add .. && tns install",
19+
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
20+
"changelog:add": "git add CHANGELOG.md && git commit -m 'updated CHANGELOG.md'",
21+
"release:pre": "npm run clean && npm run build && npm run test",
22+
"release:post": "npm run changelog && npm run changelog:add",
23+
"release:major": "npm run release:pre && npm version major && npm run release:post && git push origin && git push origin --tags && npm publish",
24+
"release:minor": "npm run release:pre && npm version minor && npm run release:post && git push origin && git push origin --tags && npm publish",
25+
"release:patch": "npm run release:pre && npm version patch && npm run release:post && git push origin && git push origin --tags && npm publish"
26+
},
27+
"main": "urlhandler",
28+
"typings": "urlhandler.d.ts",
29+
"nativescript": {
30+
"platforms": {
31+
"android": "2.3.0",
32+
"ios": "2.3.0"
33+
}
34+
},
35+
"dependencies": {},
36+
"peerDependencies": {
37+
"tns-core-modules": "^2.3.1"
38+
},
39+
"devDependencies": {
40+
"@types/jasmine": "2.5.46",
41+
"babel-cli": "6.24.0",
42+
"babel-core": "6.24.0",
43+
"babel-preset-es2015": "6.24.0",
44+
"babel-traverse": "6.18.0",
45+
"babel-types": "6.18.0",
46+
"conventional-changelog-cli": "1.3.1",
47+
"jasmine": "2.5.3",
48+
"jasmine-core": "2.5.2",
49+
"jasmine-reporters": "2.2.1",
50+
"mockery": "2.0.0",
51+
"nativescript-dev-typescript": "0.3.7",
52+
"rimraf": "2.6.1",
53+
"tns-core-modules": "2.5.1",
54+
"tns-platform-declarations": "2.5.0",
55+
"tslint": "4.5.1",
56+
"tslint-eslint-rules": "3.5.0",
57+
"typescript": "2.2.1"
58+
},
59+
"repository": {
60+
"type": "git",
61+
"url": "git+https://github.com/hypery2k/nativescript-urlhandler.git"
62+
},
63+
"keywords": [
64+
"NativeScript",
65+
"URL-Handler"
66+
],
67+
"author": "Martin Reinhardt",
68+
"license": "MIT",
69+
"bugs": {
70+
"url": "https://github.com/hypery2k/nativescript-urlhandler/issues"
71+
},
72+
"homepage": "https://github.com/hypery2k/nativescript-urlhandler"
73+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="__PACKAGE__"
4+
android:versionCode="1"
5+
android:versionName="1.0">
6+
7+
<supports-screens
8+
android:smallScreens="true"
9+
android:normalScreens="true"
10+
android:largeScreens="true"
11+
android:xlargeScreens="true"/>
12+
13+
<uses-sdk
14+
android:minSdkVersion="17"
15+
android:targetSdkVersion="__APILEVEL__"/>
16+
17+
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
18+
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
19+
<uses-permission android:name="android.permission.INTERNET"/>
20+
21+
<application
22+
android:name="com.tns.NativeScriptApplication"
23+
android:allowBackup="true"
24+
android:icon="@drawable/icon"
25+
android:label="@string/app_name"
26+
android:theme="@style/AppTheme">
27+
28+
<activity
29+
android:name="com.tns.NativeScriptActivity"
30+
android:label="@string/title_activity_kimera"
31+
android:configChanges="keyboardHidden|orientation|screenSize"
32+
android:theme="@style/LaunchScreenTheme">
33+
34+
<meta-data android:name="SET_THEME_ON_LAUNCH" android:resource="@style/AppTheme" />
35+
36+
<intent-filter>
37+
<action android:name="android.intent.action.MAIN" />
38+
<category android:name="android.intent.category.LAUNCHER" />
39+
</intent-filter>
40+
<intent-filter>
41+
<data android:scheme="sampleApp"/>
42+
<action android:name="android.intent.action.VIEW"/>
43+
<category android:name="android.intent.category.DEFAULT"/>
44+
<category android:name="android.intent.category.BROWSABLE"/>
45+
</intent-filter>
46+
</activity>
47+
<activity android:name="com.tns.ErrorReportActivity"/>
48+
</application>
49+
</manifest>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Add your native dependencies here:
2+
3+
// Uncomment to add recyclerview-v7 dependency
4+
//dependencies {
5+
// compile 'com.android.support:recyclerview-v7:+'
6+
//}
7+
8+
android {
9+
defaultConfig {
10+
generatedDensities = []
11+
applicationId = "__PACKAGE__"
12+
}
13+
aaptOptions {
14+
additionalParameters "--no-version-vectors"
15+
}
16+
}
3.42 KB
Loading
10.7 KB
Loading
32.4 KB
Loading

0 commit comments

Comments
 (0)