Skip to content

Commit

Permalink
refactor!: upgrade demo to NativeScript v7
Browse files Browse the repository at this point in the history
  • Loading branch information
Julio Marquez committed Sep 5, 2020
1 parent 8d46ed0 commit e6d7797
Show file tree
Hide file tree
Showing 19 changed files with 2,439 additions and 2,650 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ letter.

### Please, provide the following version numbers that your issue occurs with:

- CLI: (run `tns --version` to fetch it)
- CLI: (run `ns --version` to fetch it)
- Cross-platform modules: (check the 'version' attribute in the
`node_modules/tns-core-modules/package.json` file in your project)
`node_modules/@nativescript/core/package.json` file in your project)
- Runtime(s): (look for the `"tns-android"` and `"tns-ios"` properties in the `package.json` file of your project)
- Plugin(s): (look for the version numbers in the `package.json` file of your
project and paste your dependencies and devDependencies here)
Expand Down
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@ matrix:
language: node_js
node_js: "10"
jdk: oraclejdk8
script: cd src && npm run build && cd ../demo && npm i && tns build ios --bundle --env.uglify
script: cd src && npm run build && cd ../demo && npm i && ns build ios --bundle --env.uglify
- language: android
os: linux
env:
- WebPack="Android"
jdk: oraclejdk8
before_install: nvm install 10
script: cd src && npm run build && cd ../demo && npm i && tns build android --bundle --env.uglify --env.snapshot
script: cd src && npm run build && cd ../demo && npm i && ns build android --bundle --env.uglify --env.snapshot
- language: android
env:
- BuildAndroid="28"
os: linux
jdk: oraclejdk8
before_install: nvm install 10
script:
- cd src && npm i && npm run tsc && cd ../demo && tns build android
- cd src && npm i && npm run ns && cd ../demo && ns build android
- os: osx
env:
- BuildiOS="12"
Expand All @@ -38,7 +38,7 @@ matrix:
node_js: "10"
jdk: oraclejdk8
script:
- cd src && npm i && npm run tsc && cd ../demo && tns build ios
- cd src && npm i && npm run ns && cd ../demo && ns build ios
- os: linux
language: android
dist: precise
Expand Down Expand Up @@ -73,5 +73,5 @@ before_install:

install:
- echo no | npm install -g nativescript
- tns usage-reporting disable
- tns error-reporting disable
- ns usage-reporting disable
- ns error-reporting disable
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ A vibrate NativeScript plugin for Android and iOS
Run the following command from the root of your project:

```bash
$ tns plugin add nativescript-vibrate
$ ns plugin add nativescript-vibrate
```

This command automatically installs the necessary files, as well as stores **nativescript-vibrate** as a dependency in your project's **package.json** file.
Expand Down
3 changes: 2 additions & 1 deletion demo/app/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ In many cases you may want to use the NativeScript core theme instead
of writing your own CSS rules. For a full list of class names in the theme
refer to http://docs.nativescript.org/ui/theme.
*/
@import '~nativescript-theme-core/css/core.light.css';
@import '~@nativescript/theme/css/core.css';
@import '~@nativescript/theme/css/default.css';

/*
For example, the following CSS rule changes the font size of all UI
Expand Down
4 changes: 2 additions & 2 deletions demo/app/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ You can use this file to perform app-level initialization, but the primary
purpose of the file is to pass control to the app’s first module.
*/

import * as app from "tns-core-modules/application";
import { Application } from '@nativescript/core';

app.run({ moduleName: "app-root" });
Application.run({ moduleName: "app-root" });

/*
Do not place any code after the application has been started as it will not
Expand Down
3 changes: 1 addition & 2 deletions demo/app/home/home-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ a code-behind file. The code-behind is a great place to place your view
logic, and to set up your page’s data binding.
*/

import { Vibrate } from 'nativescript-vibrate';
import { NavigatedData, Page } from "tns-core-modules/ui/page";
import { NavigatedData, Page } from "@nativescript/core/ui/page";

import { HomeViewModel } from "./home-view-model";

Expand Down
2 changes: 1 addition & 1 deletion demo/app/home/home-view-model.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Observable } from '@nativescript/core';
import { Vibrate } from 'nativescript-vibrate';
import { Observable } from "tns-core-modules/data/observable";

export class HomeViewModel extends Observable {
public hasVibrator: string;
Expand Down
7 changes: 0 additions & 7 deletions demo/app/package.json

This file was deleted.

11 changes: 11 additions & 0 deletions demo/nativescript.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { NativeScriptConfig } from '@nativescript/core'

export default {
id: 'org.nativescript.demo',
appResourcesPath: 'app/App_Resources',
android: {
v8Flags: '--expose_gc',
markingMode: 'none',
},
appPath: 'app',
} as NativeScriptConfig
Loading

0 comments on commit e6d7797

Please sign in to comment.