Skip to content
This repository was archived by the owner on Dec 19, 2021. It is now read-only.

Commit e3790f5

Browse files
committed
2 parents 3162ddb + e1efe39 commit e3790f5

15 files changed

+342
-294
lines changed

.github/workflows/build.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build CI
2+
3+
# Trigger the workflow on push or pull request
4+
on: [push]
5+
6+
jobs:
7+
build:
8+
name: Build
9+
10+
runs-on: macos-latest
11+
steps:
12+
- uses: actions/checkout@v1
13+
14+
- name: Set Node.js 10.x
15+
uses: actions/setup-node@v1
16+
with:
17+
node-version: "10.x"
18+
19+
- name: Build Plugin Source
20+
run: cd src && npm i && npm i -g typescript && tsc
21+
22+
- name: Lint
23+
run: cd src && npm run tslint
24+
25+
- name: Setup JDK 1.8
26+
uses: actions/setup-java@v1
27+
with:
28+
java-version: 1.8
29+
30+
- name: Install PIP
31+
run: |
32+
sudo pip install --upgrade pip
33+
sudo pip install six
34+
35+
- name: Setup NativeScript CLI
36+
run: |
37+
echo no | npm i -g nativescript
38+
tns usage-reporting disable
39+
tns error-reporting disable
40+
41+
- name: Build Android Demo App
42+
run: |
43+
cd demo
44+
tns build android --env.uglify
45+
- name: Build iOS Demo App
46+
run: |
47+
cd demo
48+
tns build ios --env.uglify

.travis.yml

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

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ NativeScript-Loading-Indicator is a plugin for NativeScript which overlays a loa
66
</h4>
77

88
<p align="center">
9+
<a href="https://www.npmjs.com/package/@nstudio/nativescript-loading-indicator">
10+
<img src="https://github.com/nstudio/nativescript-loading-indicator/workflows/Build%20CI/badge.svg" alt="Action Build">
11+
</a>
912
<a href="https://www.npmjs.com/package/@nstudio/nativescript-loading-indicator">
1013
<img src="https://img.shields.io/npm/v/@nstudio/nativescript-loading-indicator.svg" alt="npm">
1114
</a>
@@ -26,6 +29,7 @@ NativeScript-Loading-Indicator is a plugin for NativeScript which overlays a loa
2629
</a>
2730
<h5 align="center">Do you need assistance on your project or plugin? Contact the nStudio team anytime at <a href="mailto:[email protected]">[email protected]</a> to get up to speed with the best practices in mobile and web app development.
2831
</h5>
32+
2933
</p>
3034

3135
---

blank.yml

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

demo/app/app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
import * as app from 'tns-core-modules/application';
1+
import * as app from '@nativescript/core/application';
22
app.run({ moduleName: 'app-root' });

demo/app/main-view-model.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { LoadingIndicator, Mode } from 'nativescript-loading-indicator';
2-
import { Observable } from 'tns-core-modules/data/observable';
3-
import { confirm } from 'tns-core-modules/ui/dialogs';
4-
import { Page } from 'tns-core-modules/ui/page';
5-
import { openUrl } from 'tns-core-modules/utils/utils';
1+
import { Observable } from '@nativescript/core/data/observable';
2+
import { confirm } from '@nativescript/core/ui/dialogs';
3+
import { Page } from '@nativescript/core/ui/page';
4+
import { openUrl } from '@nativescript/core/utils/utils';
5+
import { LoadingIndicator, Mode } from '@nstudio/nativescript-loading-indicator';
66

77
export class LoadingTest extends Observable {
88
private indicator: LoadingIndicator;

demo/app/package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
{
2-
"name": "tns-template-hello-world-ts",
2+
"android": {
3+
"v8Flags": "--expose_gc",
4+
"markingMode": "none"
5+
},
36
"main": "app.js",
4-
"version": "1.6.0"
7+
"name": "tns-template-hello-world",
8+
"version": "3.2.0"
59
}

demo/karma.conf.js

Lines changed: 32 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,70 @@
1-
module.exports = function(config) {
1+
module.exports = function (config) {
22
const options = {
3+
34
// base path that will be used to resolve all patterns (eg. files, exclude)
4-
basePath: "",
5+
basePath: '',
6+
57

68
// frameworks to use
79
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
810
frameworks: ["jasmine"],
911

12+
1013
// list of files / patterns to load in the browser
11-
files: ["app/tests/**/*.*"],
14+
files: ['app/tests/**/*.*'],
15+
1216

1317
// list of files to exclude
14-
exclude: [],
18+
exclude: [
19+
],
20+
1521

1622
// preprocess matching files before serving them to the browser
1723
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
18-
preprocessors: {},
24+
preprocessors: {
25+
},
26+
1927

2028
// test results reporter to use
2129
// possible values: 'dots', 'progress'
2230
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
23-
reporters: ["progress"],
31+
reporters: ['progress'],
32+
2433

2534
// web server port
2635
port: 9876,
2736

37+
2838
// enable / disable colors in the output (reporters and logs)
2939
colors: true,
3040

41+
3142
// level of logging
3243
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
3344
logLevel: config.LOG_INFO,
3445

46+
3547
// enable / disable watching file and executing tests whenever any file changes
3648
autoWatch: true,
3749

50+
3851
// start these browsers
3952
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
4053
browsers: [],
4154

4255
customLaunchers: {
4356
android: {
44-
base: "NS",
45-
platform: "android"
57+
base: 'NS',
58+
platform: 'android'
4659
},
4760
ios: {
48-
base: "NS",
49-
platform: "ios"
61+
base: 'NS',
62+
platform: 'ios'
5063
},
5164
ios_simulator: {
52-
base: "NS",
53-
platform: "ios",
54-
arguments: ["--emulator"]
65+
base: 'NS',
66+
platform: 'ios',
67+
arguments: ['--emulator']
5568
}
5669
},
5770

@@ -64,7 +77,7 @@ module.exports = function(config) {
6477
setWebpack(config, options);
6578

6679
config.set(options);
67-
};
80+
}
6881

6982
function setWebpackPreprocessor(config, options) {
7083
if (config && config.bundle) {
@@ -76,7 +89,7 @@ function setWebpackPreprocessor(config, options) {
7689
if (!options.preprocessors[file]) {
7790
options.preprocessors[file] = [];
7891
}
79-
options.preprocessors[file].push("webpack");
92+
options.preprocessors[file].push('webpack');
8093
});
8194
}
8295
}
@@ -86,15 +99,11 @@ function setWebpack(config, options) {
8699
const env = {};
87100
env[config.platform] = true;
88101
env.sourceMap = config.debugBrk;
89-
options.webpack = require("./webpack.config")(env);
102+
env.appPath = config.appPath;
103+
options.webpack = require('./webpack.config')(env);
90104
delete options.webpack.entry;
91105
delete options.webpack.output.libraryTarget;
92-
const invalidPluginsForUnitTesting = [
93-
"GenerateBundleStarterPlugin",
94-
"GenerateNativeScriptEntryPointsPlugin"
95-
];
96-
options.webpack.plugins = options.webpack.plugins.filter(
97-
p => !invalidPluginsForUnitTesting.includes(p.constructor.name)
98-
);
106+
const invalidPluginsForUnitTesting = ["GenerateBundleStarterPlugin", "GenerateNativeScriptEntryPointsPlugin"];
107+
options.webpack.plugins = options.webpack.plugins.filter(p => !invalidPluginsForUnitTesting.includes(p.constructor.name));
99108
}
100109
}

demo/package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
{
22
"nativescript": {
33
"id": "org.nativescript.demo",
4-
"tns-ios": {
5-
"version": "6.0.0-rc-2019-06-28-105002-01"
6-
},
74
"tns-android": {
8-
"version": "6.0.0-rc-2019-06-27-172817-03"
5+
"version": "6.3.1"
6+
},
7+
"tns-ios": {
8+
"version": "6.3.0"
99
}
1010
},
1111
"dependencies": {
1212
"nativescript-theme-core": "^1.0.4",
13-
"nativescript-unit-test-runner": "0.6.4",
14-
"nativescript-loading-indicator": "file:../src",
15-
"tns-core-modules": "6.0.0-rc-2019-07-08-111131-01"
13+
"nativescript-unit-test-runner": "0.7.0",
14+
"@nstudio/nativescript-loading-indicator": "file:../src",
15+
"tns-core-modules": "^6.3.2"
1616
},
1717
"devDependencies": {
1818
"jasmine-core": "^2.5.2",
1919
"karma": "4.1.0",
2020
"karma-jasmine": "2.0.1",
2121
"karma-nativescript-launcher": "^0.4.0",
2222
"nativescript-css-loader": "~0.26.1",
23-
"nativescript-dev-webpack": "1.0.0-rc-2019-07-08-135456-03",
24-
"tns-platform-declarations": "6.0.0-rc-2019-06-28-175837-02",
25-
"tslint": "~5.12.1",
26-
"typescript": "3.4.1",
23+
"nativescript-dev-webpack": "1.4.1",
24+
"tns-platform-declarations": "6.3.2",
25+
"tslint": "~5.20.1",
26+
"typescript": "3.7.4",
2727
"karma-webpack": "3.0.5"
2828
},
2929
"scripts": {

demo/tsconfig.tns.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"extends": "./tsconfig",
33
"compilerOptions": {
4-
"module": "es2015",
4+
"module": "esNext",
55
"moduleResolution": "node"
66
}
77
}

0 commit comments

Comments
 (0)