8000 Merge branch 'next' · rahulyhg/nativescript-vue@b0e2dfa · GitHub
[go: up one dir, main page]

Skip to content

Commit b0e2dfa

Browse files
committed
Merge branch 'next'
2 parents ae4a8d7 + d7ee9c2 commit b0e2dfa

Some content is hidden

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

42 files changed

+624
-186
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ samples/package-lock.json
88
samples/platforms
99
samples/app/nativescript-vue.js
1010
samples/app/nativescript-vue.js.map
11+
samples/hooks/
12+
samples/mochawesome-report/
13+
samples/e2e/reports/
14+
test-results.xml
1115
dist/
1216
packages/nativescript-vue-template-compiler/index.js
1317
!docs/dist/

.travis.yml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
env:
2+
global:
3+
- ANDROID_PACKAGE_VUE='nativescript-vue-tests.apk'
4+
- ANDROID_PACKAGE_FOLDER_VUE=$TRAVIS_BUILD_DIR/samples/outputs
5+
- SAUCE_STORAGE="https://saucelabs.com/rest/v1/storage/$SAUCE_USER"
6+
- IOS_PACKAGE_VUE='nativescript-vue-tests.zip'
7+
- IOS_PACKAGE_FOLDER_VUE=$TRAVIS_BUILD_DIR/samples/outputs
8+
9+
git:
10+
depth: 1
11+
12+
branches:
13+
only:
14+
- master
15+
16+
matrix:
17+
include:
18+
- stage: "Unit Tests"
19+
language: node_js
20+
os: linux
21+
node_js: "11"
22+
script: npm ci && npm run test
23+
- stage: "Build app"
24+
os: osx
25+
env:
26+
- WebpackiOS="12.0"
27+
- Type="VueJS"
28+
osx_image: xcode10.0
29+
language: node_js
30+
node_js: "11"
31+
jdk: oraclejdk8
32+
script:
33+
- npm ci && npm run dev:core && npm run dev:compiler
34+
- cd samples && npm i && tns build ios --copy-to "./outputs/nativescript-vue-tests.app"
35+
- cd $IOS_PACKAGE_FOLDER_VUE && zip -r $IOS_PACKAGE_VUE nativescript-vue-tests.app
36+
- "curl -u $SAUCE_USER:$SAUCE_KEY -X POST -H 'Content-Type: application/octet-stream' $SAUCE_STORAGE/$IOS_PACKAGE_VUE?overwrite=true --data-binary @$IOS_PACKAGE_FOLDER_VUE/$IOS_PACKAGE_VUE"
37+
- language: android
38+
os: linux
39+
env:
40+
- WebpackAndroid="28"
41+
- Type="VueJS"
42+
jdk: oraclejdk8
43+
before_install: nvm install 11
44+
script:
45+
- npm ci && npm run dev:core && npm run dev:compiler
46+
- cd samples && npm i && tns build android --copy-to "./outputs/nativescript-vue-tests.apk"
47+
- "curl -u $SAUCE_USER:$SAUCE_KEY -X POST -H 'Content-Type: application/octet-stream' $SAUCE_STORAGE/$ANDROID_PACKAGE_VUE?overwrite=true --data-binary @$ANDROID_PACKAGE_FOLDER_VUE/$ANDROID_PACKAGE_VUE"
48+
- stage: "UI Tests"
49+
env:
50+
- iOS="12.0"
51+
- Type="VueJS"
52+
language: node_js
53+
os: linux
54+
node_js: "11"
55+
script:
56+
- npm i -g appium
57+
- cd samples && npm i
58+
- travis_wait travis_retry npm run e2e -- --runType sim12iPhoneX --sauceLab --appPath $IOS_PACKAGE_VUE
59+
- os: linux
60+
env:
61+
- Android="24"
62+
- Type="VueJS"
63+
language: node_js
64+
node_js: "11"
65+
script:
66+
- npm i -g appium
67+
- cd samples && npm i
68+
- travis_wait travis_retry npm run e2e -- --runType android24.sauce --sauceLab --appPath $ANDROID_PACKAGE_VUE
69+
70+
android:
71+
components:
72+
- tools
73+
- platform-tools
74+
- build-tools-28.0.3
75+
- android-28
76+
- android-23
77+
- extra-android-m2repository
78+
79+
before_cache:
80+
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
81+
82+
cache:
83+
directories:
84+
- .nvm
85+
- $HOME/.gradle/caches/
86+
- $HOME/.gradle/wrapper/
87+
88+
before_install:
89+
- sudo pip install --upgrade pip
90+
- sudo pip install six
91+
92+
install:
93+
- echo no | npm install -g nativescript
94+
- tns usage-reporting disable
95+
- tns error-reporting disable

CHANGELOG.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,23 @@
1-
<a name="2.3.0"></a>
2-
# [2.3.0](https://github.com/nativescript-vue/nativescript-vue/compare/v2.3.0-rc.2...v2.3.0) (2019-07-10)
31

2+
<a name="2.4.0-alpha.0"></a>
3+
# [2.4.0-alpha.0](https://github.com/nativescript-vue/nativescript-vue/compare/v2.3.0-rc.2...v2.4.0-alpha.0) (2019-07-10)
44

55
### Bug Fixes
66

7+
* livesync and HMR fixes for NativeScript 6.0 ([#508](https://github.com/nativescript-vue/nativescript-vue/issues/508)) ([be95893](https://github.com/nativescript-vue/nativescript-vue/commit/be95893)), closes [#481](https://github.com/nativescript-vue/nativescript-vue/issues/481)
8+
9+
<a name="2.3.0"></a>
10+
# [2.3.0](https://github.com/nativescript-vue/nativescript-vue/compare/v2.3.0-rc.2...v2.3.0) (2019-07-10)
11+
712
* **listview:** correct items prop type check ([c770745](https://github.com/nativescript-vue/nativescript-vue/commit/c770745)), closes [#522](https://github.com/nativescript-vue/nativescript-vue/issues/522)
813
* **listview:** fix prop type check ([5780bac](https://github.com/nativescript-vue/nativescript-vue/commit/5780bac)), closes [#522](https://github.com/nativescript-vue/nativescript-vue/issues/522)
914

1015

16+
### Features
17+
18+
* **frame:** allow setting clearHistory and backstackVisible options for default pages. ([#514](https://github.com/nativescript-vue/nativescript-vue/issues/514)) ([d06a7bd](https://github.com/nativescript-vue/nativescript-vue/commit/d06a7bd))
19+
20+
1121

1222
<a name="2.3.0-rc.2"></a>
1323
# [2.3.0-rc.2](https://github.com/nativescript-vue/nativescript-vue/compare/v2.3.0-rc.1...v2.3.0-rc.2) (2019-07-03)

build/sample-runner.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ inquirer
4141
})
4242

4343
function runPlatform(platform) {
44-
tns = spawn('tns', ['debug', platform, '--syncAllFiles', '--bundle'].concat(args), {
44+
tns = spawn('tns', ['debug', platform].concat(args), {
4545
cwd: path.resolve(__dirname, '../samples')
4646
})
4747

package-lock.json

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nativescript-vue",
3-
"version": "2.3.0",
3+
"version": "2.4.0-alpha.0",
44
"description": "NativeScript and Vue integration",
55
"main": "dist/index.js",
66
"files": [
@@ -15,9 +15,9 @@
1515
"test": "jest",
1616
"tdd": "jest --watch",
1717
"samples": "node build/sample-runner.js",
18-
"dev": "npm run dev:core & npm run dev:compiler",
19-
"dev:core": "rollup -c build/config.js -w --o dist/index.js --environment TARGET:nativescript-vue",
20-
"dev:compiler": "rollup -c build/config.js -w --environment TARGET:nativescript-vue-template-compiler",
18+
"dev": "npm run dev:core -- -w & npm run dev:compiler -- -w",
19+
"dev:core": "rollup -c build/config.js --o dist/index.js --environment TARGET:nativescript-vue",
20+
"dev:compiler": "rollup -c build/config.js --environment TARGET:nativescript-vue-template-compiler",
2121
"build": "node build/build.js",
2222
"prettier": "prettier --no-semi --single-quote --write \"{{platform,__test__}/**/*.js,samples/app/*.js}\"",
2323
"release": "node build/releaser.js",
@@ -44,8 +44,8 @@
4444
"homepage": "https://github.com/rigor789/nativescript-vue#readme",
4545
"nativescript": {
4646
"platforms": {
47-
"android": "4.2.0",
48-
"ios": "4.2.0"
47+
"android": "6.0.0",
48+
"ios": "6.0.1"
4949
},
5050
"plugin": {
5151
"vue": "true",
@@ -95,7 +95,7 @@
9595
"rollup-plugin-resolve-aliases": "0.2.0",
9696
"semver": "6.0.0",
9797
"set-value": "3.0.0",
98-
"tns-core-modules": "5.4.1",
98+
"tns-core-modules": "6.0.1",
9999
"util-inspect": "0.1.8",
100100
"vue": "2.6.10"
101101
},

packages/nativescript-vue-template-compiler/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nativescript-vue-template-compiler",
3-
"version": "2.3.0",
3+
"version": "2.4.0-alpha.0",
44
"description": "template compiler for nativescript-vue",
55
"main": "index.js",
66
"repository": {

platform/nativescript/element-registry.js

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,57 @@ registerElement(
148148
}
149149
)
150150

151+
registerElement(
152+
'BottomNavigation',
153+
() => require('tns-core-modules/ui/bottom-navigation').BottomNavigation,
154+
{
155+
model: {
156+
prop: 'selectedIndex',
157+
event: 'selectedIndexChange'
158+
},
159+
component: builtInComponents.BottomNavigation
160+
}
161+
)
162+
163+
registerElement('Tabs', () => require('tns-core-modules/ui/tabs').Tabs, {
164+
model: {
165+
prop: 'selectedIndex',
166+
event: 'selectedIndexChange'
167+
},
168+
component: builtInComponents.Tabs
169+
})
170+
171+
registerElement(
172+
'TabStrip',
173+
() => require('tns-core-modules/ui/tab-navigation-base/tab-strip').TabStrip,
174+
{
175+
skipAddToDom: true,
176+
component: builtInComponents.TabStrip
177+
}
178+
)
179+
180+
registerElement(
181+
'TabStripItem',
182+
() =>
183+
require('tns-core-modules/ui/tab-navigation-base/tab-strip-item')
184+
.TabStripItem,
185+
{
186+
skipAddToDom: true,
187+
component: builtInComponents.TabStripItem
188+
}
189+
)
190+
191+
registerElement(
192+
'TabContentItem',
193+
() =>
194+
require('tns-core-modules/ui/tab-navigation-base/tab-content-item')
195+
.TabContentItem,
196+
{
197+
skipAddToDom: true,
198+
component: builtInComponents.TabContentItem
199+
}
200+
)
201+
151202
registerElement('transition', null, {
152203
component: builtInComponents.transition
153204
})
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
export default {
2+
model: {
3+
prop: 'selectedIndex',
4+
event: 'selectedIndexChange'
5+
},
6+
7+
render(h) {
8+
return h(
9+
'NativeBottomNavigation',
10+
{
11+
on: this.$listeners,
12+
attrs: this.$attrs
13+
},
14+
this.$slots.default
15+
)
16+
},
17+
18+
methods: {
19+
registerTabStrip(tabStrip) {
20+
this.$el.setAttribute('tabStrip', tabStrip)
21+
},
22+
registerTabContentItem(tabContentItem) {
23+
const items = this.$el.nativeView.items || []
24+
25+
this.$el.setAttribute('items', items.concat([tabContentItem]))
26+
}
27+
}
28+
}

0 commit comments

Comments
 (0)
0