Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4b48060
commit a7d3b29
Showing
20 changed files
with
414 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
branches: | ||
only: | ||
- master | ||
matrix: | ||
include: | ||
- stage: "Lint" | ||
language: node_js | ||
os: linux | ||
node_js: "6" | ||
script: cd src && npm run ci.tslint && cd ../demo && npm run ci.tslint | ||
- stage: "Build and Test" | ||
env: | ||
- BuildAndroid="25" | ||
language: android | ||
os: linux | ||
jdk: oraclejdk8 | ||
before_install: nvm install stable | ||
script: | ||
- cd src && npm i && npm run tsc && cd ../demo | ||
- travis_wait travis_retry tns build android | ||
- os: osx | ||
env: | ||
- BuildiOS="10.3" | ||
- Xcode="8.3" | ||
osx_image: xcode8.3 | ||
language: node_js | ||
node_js: "6" | ||
jdk: oraclejdk8 | ||
script: | ||
- cd src && npm i && npm run tsc && cd ../demo | ||
- travis_wait travis_retry tns build ios | ||
- os: linux | ||
language: android | ||
env: | ||
- TestVersion="latest" | ||
jdk: oraclejdk8 | ||
before_install: | ||
- nvm install stable | ||
before_script: | ||
- cd seed-tests && npm i | ||
- echo no | android create avd --force -n test -t android-21 -b armeabi-v7a | ||
- emulator -avd test -no-audio -no-window & | ||
- android-wait-for-emulator | ||
script: travis_wait travis_retry npm run test.android | ||
dist: precise | ||
- os: osx | ||
env: | ||
- TestVersion="latest" | ||
language: node_js | ||
node_js: "6" | ||
jdk: oraclejdk8 | ||
osx_image: xcode8.3 | ||
before_script: | ||
- cd seed-tests && npm i | ||
script: travis_wait travis_retry npm run test.ios | ||
|
||
android: | ||
components: | ||
- tools | ||
- platform-tools | ||
- build-tools-25.0.2 | ||
- android-25 | ||
- extra-android-m2repository | ||
- sys-img-armeabi-v7a-android-21 | ||
|
||
install: | ||
- npm install -g nativescript | ||
- tns usage-reporting disable | ||
- tns error-reporting disable | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) - do whatever you want with this - just don't be a bitch about it. | ||
|
||
nativescript-floatingactionbutton | ||
Copyright (c) 2017, Brad Martin | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
this software and associated documentation files (the "Software"), to deal in | ||
the Software without restriction, including without limitation the rights to | ||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | ||
the Software, and to permit persons to whom the Software is furnished to do so, | ||
subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | ||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR | ||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import * as app from "tns-core-modules/application"; | ||
app.start({ moduleName: "main-page" }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import * as app from "tns-core-modules/application"; | ||
import * as observable from "tns-core-modules/data/observable"; | ||
import * as observableArrayModule from "tns-core-modules/data/observable-array"; | ||
import * as platformModule from "tns-core-modules/platform"; | ||
import * as frameModule from "tns-core-modules/ui/frame"; | ||
import * as color from "tns-core-modules/color"; | ||
|
||
const users = [ | ||
{ name: "Billy Bob" }, | ||
{ name: "Tweeder" }, | ||
{ name: "Mox" }, | ||
{ name: "Coach" }, | ||
{ name: "Lance" }, | ||
{ name: "Johnson" }, | ||
{ name: "William" }, | ||
{ name: "Franklin" }, | ||
{ name: "Billy Bob" }, | ||
{ name: "Tweeder" }, | ||
{ name: "Mox" }, | ||
{ name: "Coach" }, | ||
{ name: "Lance" }, | ||
{ name: "Johnson" }, | ||
{ name: "William" }, | ||
{ name: "Franklin" } | ||
]; | ||
var viewModel = observable.fromObject({ | ||
users: new observableArrayModule.ObservableArray(users) | ||
}); | ||
|
||
export function pageLoaded(args) { | ||
const page = args.object; | ||
if (platformModule.isAndroid) { | ||
// Change statusbar color on Lollipop | ||
if (platformModule.device.sdkVersion >= "21") { | ||
const window = app.android.startActivity.getWindow(); | ||
window.setStatusBarColor(new color.Color("#303F9F").android); | ||
} | ||
} | ||
page.bindingContext = viewModel; | ||
} | ||
// exports.pageLoaded = pageLoaded; | ||
|
||
export function fabTap(args) { | ||
(viewModel as any).users.unshift({ name: "Gary" }); | ||
} | ||
|
||
export function goMultiFab(args) { | ||
frameModule.topmost().navigate("multifab"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,35 @@ | ||
.fab-button { | ||
height: 50; | ||
width: 50; | ||
margin: 15; | ||
color: #FFF; | ||
background-color: #ff4081; | ||
height: 50; | ||
width: 50; | ||
margin: 15; | ||
color: #fff; | ||
background-color: #ff4081; | ||
} | ||
|
||
.top-left{ | ||
horizontal-align: left; | ||
vertical-align: top; | ||
.top-left { | ||
background-color: red; | ||
horizontal-align: left; | ||
vertical-align: top; | ||
} | ||
|
||
.top-right{ | ||
horizontal-align: right; | ||
vertical-align: top; | ||
.top-right { | ||
background-color: #336699; | ||
horizontal-align: right; | ||
vertical-align: top; | ||
} | ||
|
||
.bottom-left{ | ||
horizontal-align: left; | ||
vertical-align: bottom; | ||
.bottom-left { | ||
background-color: #fff000; | ||
horizontal-align: left; | ||
vertical-align: bottom; | ||
} | ||
|
||
.bottom-right{ | ||
horizontal-align: right; | ||
vertical-align: bottom; | ||
.bottom-right { | ||
horizontal-align: right; | ||
vertical-align: bottom; | ||
} | ||
|
||
.center{ | ||
horizontal-align: center; | ||
vertical-align: center; | ||
} | ||
.center { | ||
horizontal-align: center; | ||
vertical-align: center; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import * as app from "tns-core-modules/application"; | ||
import * as observable from "tns-core-modules/data/observable"; | ||
import * as observableArrayModule from "tns-core-modules/data/observable-array"; | ||
import * as platformModule from "tns-core-modules/platform"; | ||
import * as color from "tns-core-modules/color"; | ||
import * as frame from "tns-core-modules/ui/frame"; | ||
|
||
export function pageLoaded(args) { | ||
const page = args.object; | ||
if (platformModule.isAndroid) { | ||
// Change statusbar color on Lollipop | ||
if (platformModule.device.sdkVersion >= "21") { | ||
const window = app.android.startActivity.getWindow(); | ||
window.setStatusBarColor(new color.Color("#303F9F").android); | ||
} | ||
} | ||
} | ||
// exports.pageLoaded = pageLoaded; | ||
|
||
export function fabTap(args) { | ||
alert("tap"); | ||
frame.topmost().goBack(); | ||
} | ||
|
||
export function animate(args) { | ||
args.object.animate({ | ||
duration: 500, | ||
target: args.object, | ||
opacity: 0, | ||
translate: { x: 100, y: 200 } | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
require("application"); | ||
if (!global["__snapshot"]) { | ||
/* | ||
In case snapshot generation is enabled these modules will get into the bundle but will not be required/evaluated. | ||
The snapshot webpack plugin will add them to the tns-java-classes.js bundle file. This way, they will be evaluated on app start as early as possible. | ||
*/ | ||
require("ui/frame"); | ||
require("ui/frame/activity"); | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
require("./vendor-platform"); | ||
|
||
require("bundle-entry-points"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
module.exports = function(config) { | ||
config.set({ | ||
// base path that will be used to resolve all patterns (eg. files, exclude) | ||
basePath: "", | ||
|
||
// frameworks to use | ||
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter | ||
frameworks: ["jasmine"], | ||
|
||
// list of files / patterns to load in the browser | ||
files: ["app/**/*.js"], | ||
|
||
// list of files to exclude | ||
exclude: [], | ||
|
||
// preprocess matching files before serving them to the browser | ||
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor | ||
preprocessors: {}, | ||
|
||
// test results reporter to use | ||
// possible values: 'dots', 'progress' | ||
// available reporters: https://npmjs.org/browse/keyword/karma-reporter | ||
reporters: ["progress"], | ||
|
||
// web server port | ||
port: 9876, | ||
|
||
// enable / disable colors in the output (reporters and logs) | ||
colors: true, | ||
|
||
// level of logging | ||
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG | ||
logLevel: config.LOG_INFO, | ||
|
||
// enable / disable watching file and executing tests whenever any file changes | ||
autoWatch: true, | ||
|
||
// start these browsers | ||
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher | ||
browsers: [], | ||
|
||
customLaunchers: { | ||
android: { | ||
base: "NS", | ||
platform: "android" | ||
}, | ||
ios: { | ||
base: "NS", | ||
platform: "ios" | ||
}, | ||
ios_simulator: { | ||
base: "NS", | ||
platform: "ios", | ||
arguments: ["--emulator"] | ||
} | ||
}, | ||
|
||
// Continuous Integration mode | ||
// if true, Karma captures browsers, runs the tests and exits | ||
singleRun: true | ||
}); | ||
}; |
Oops, something went wrong.