Skip to content

Commit e308a2d

Browse files
authored
Merge pull request #1 from NativeScript/init
initial support
2 parents 5a1c1b0 + 26cbcd9 commit e308a2d

File tree

150 files changed

+8281
-67
lines changed

Some content is hidden

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

150 files changed

+8281
-67
lines changed

README.md

Lines changed: 8 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,11 @@
1-
**=== IMPORTANT**
2-
3-
# :rotating_light: Important - read first!
4-
5-
**Use this template on GitHub:**
6-
1. Hit the "Use this template" button
7-
2. Follow GitHub instructions (set repo name, visibility, description) & clone your new repo
8-
3. Setup workspace: `npm run setup`
9-
4. Configure your npm scope: `npm run config`
10-
11-
**Use this template outside of GitHub:**
12-
13-
1. Download a zip of this repo
14-
2. Unzip and name the folder appropriately (perhaps the name of the npm scope you intend to manage here)
15-
3. Setup workspace: `npm run setup`
16-
4. Configure your npm scope: `npm run config`
17-
18-
---
19-
20-
# @nativescript/\* plugins
21-
22-
```
23-
npm run setup
24-
npm start
25-
```
26-
27-
- @nativescript
1+
- [@nativescript/mlkit-barcode-scanning](packages/mlkit-barcode-scanning/README.md)
2+
- [@nativescript/mlkit-core](packages/mlkit-core/README.md)
3+
- [@nativescript/mlkit-digital-ink-recognition](packages/mlkit-digital-ink-recognition/README.md)
4+
- [@nativescript/mlkit-face-detection](packages/mlkit-face-detection/README.md)
5+
- [@nativescript/mlkit-image-labeling](packages/mlkit-image-labeling/README.md)
6+
- [@nativescript/mlkit-object-detection](packages/mlkit-object-detection/README.md)
7+
- [@nativescript/mlkit-pose-detection](packages/mlkit-pose-detection/README.md)
8+
- [@nativescript/mlkit-text-recognition](packages/mlkit-text-recognition/README.md)
289

2910
# How to use?
3011

apps/demo-angular/package.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
{
22
"main": "./src/main.ts",
33
"dependencies": {
4-
"@nativescript/core": "file:../../node_modules/@nativescript/core"
4+
"@nativescript/core": "file:../../node_modules/@nativescript/core",
5+
"@nativescript/mlkit-text-recognition": "file:../../dist/packages/mlkit-text-recognition",
6+
"@nativescript/mlkit-core": "file:../../dist/packages/mlkit-core",
7+
"@nativescript/mlkit-barcode-scanning": "file:../../dist/packages/mlkit-barcode-scanning",
8+
"@nativescript/mlkit-face-detection": "file:../../dist/packages/mlkit-face-detection",
9+
"@nativescript/mlkit-image-labeling": "file:../../dist/packages/mlkit-image-labeling",
10+
"@nativescript/mlkit-object-detection": "file:../../dist/packages/mlkit-object-detection",
11+
"@nativescript/mlkit-digital-ink-recognition": "file:../../dist/packages/mlkit-digital-ink-recognition",
12+
"@nativescript/mlkit-pose-detection": "file:../../dist/packages/mlkit-pose-detection"
513
},
614
"devDependencies": {
715
"@nativescript/android": "~8.1.1",

apps/demo-angular/src/app-routing.module.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,15 @@ import { HomeComponent } from './home.component';
66

77
const routes: Routes = [
88
{ path: '', redirectTo: '/home', pathMatch: 'full' },
9-
{ path: 'home', component: HomeComponent }
9+
{ path: 'home', component: HomeComponent },
10+
{ path: 'mlkit-barcode-scanning', loadChildren: () => import('./plugin-demos/mlkit-barcode-scanning.module').then(m => m.MlkitBarcodeScanningModule) },
11+
{ path: 'mlkit-core', loadChildren: () => import('./plugin-demos/mlkit-core.module').then(m => m.MlkitCoreModule) },
12+
{ path: 'mlkit-digital-ink-recognition', loadChildren: () => import('./plugin-demos/mlkit-digital-ink-recognition.module').then(m => m.MlkitDigitalInkRecognitionModule) },
13+
{ path: 'mlkit-face-detection', loadChildren: () => import('./plugin-demos/mlkit-face-detection.module').then(m => m.MlkitFaceDetectionModule) },
14+
{ path: 'mlkit-image-labeling', loadChildren: () => import('./plugin-demos/mlkit-image-labeling.module').then(m => m.MlkitImageLabelingModule) },
15+
{ path: 'mlkit-object-detection', loadChildren: () => import('./plugin-demos/mlkit-object-detection.module').then(m => m.MlkitObjectDetectionModule) },
16+
{ path: 'mlkit-pose-detection', loadChildren: () => import('./plugin-demos/mlkit-pose-detection.module').then(m => m.MlkitPoseDetectionModule) },
17+
{ path: 'mlkit-text-recognition', loadChildren: () => import('./plugin-demos/mlkit-text-recognition.module').then(m => m.MlkitTextRecognitionModule) }
1018
];
1119

1220
@NgModule({

apps/demo-angular/src/home.component.ts

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,28 @@ import { Component } from '@angular/core';
77
export class HomeComponent {
88
demos = [
99
{
10-
name: 'add a package first'
10+
name: 'mlkit-barcode-scanning'
11+
},
12+
{
13+
name: 'mlkit-core'
14+
},
15+
{
16+
name: 'mlkit-digital-ink-recognition'
17+
},
18+
{
19+
name: 'mlkit-face-detection'
20+
},
21+
{
22+
name: 'mlkit-image-labeling'
23+
},
24+
{
25+
name: 'mlkit-object-detection'
26+
},
27+
{
28+
name: 'mlkit-pose-detection'
29+
},
30+
{
31+
name: 'mlkit-text-recognition'
1132
}
1233
];
1334
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<ActionBar title="mlkit-barcode-scanning" class="action-bar"> </ActionBar>
2+
<StackLayout class="p-20">
3+
<ScrollView class="h-full">
4+
<StackLayout>
5+
<Button text="Test mlkit-barcode-scanning" (tap)="demoShared.testIt()" class="btn btn-primary"></Button>
6+
</StackLayout>
7+
</ScrollView>
8+
</StackLayout>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { Component, NgZone } from '@angular/core';
2+
import { DemoSharedMlkitBarcodeScanning } from '@demo/shared';
3+
import { } from '@nativescript/mlkit-barcode-scanning';
4+
5+
@Component({
6+
selector: 'demo-mlkit-barcode-scanning',
7+
templateUrl: 'mlkit-barcode-scanning.component.html',
8+
})
9+
export class MlkitBarcodeScanningComponent {
10+
11+
demoShared: DemoSharedMlkitBarcodeScanning;
12+
13+
constructor(private _ngZone: NgZone) {}
14+
15+
ngOnInit() {
16+
this.demoShared = new DemoSharedMlkitBarcodeScanning();
17+
}
18+
19+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core';
2+
import { NativeScriptCommonModule, NativeScriptRouterModule } from '@nativescript/angular';
3+
import { MlkitBarcodeScanningComponent } from './mlkit-barcode-scanning.component';
4+
5+
@NgModule({
6+
imports: [NativeScriptCommonModule, NativeScriptRouterModule.forChild([{ path: '', component: MlkitBarcodeScanningComponent }])],
7+
declarations: [MlkitBarcodeScanningComponent],
8+
schemas: [ NO_ERRORS_SCHEMA]
9+
})
10+
export class MlkitBarcodeScanningModule {}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<ActionBar title="mlkit-core" class="action-bar"> </ActionBar>
2+
<StackLayout class="p-20">
3+
<ScrollView class="h-full">
4+
<StackLayout>
5+
<Button text="Test mlkit-core" (tap)="demoShared.testIt()" class="btn btn-primary"></Button>
6+
</StackLayout>
7+
</ScrollView>
8+
</StackLayout>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { Component, NgZone } from '@angular/core';
2+
import { DemoSharedMlkitCore } from '@demo/shared';
3+
import { } from '@nativescript/mlkit-core';
4+
5+
@Component({
6+
selector: 'demo-mlkit-core',
7+
templateUrl: 'mlkit-core.component.html',
8+
})
9+
export class MlkitCoreComponent {
10+
11+
demoShared: DemoSharedMlkitCore;
12+
13+
constructor(private _ngZone: NgZone) {}
14+
15+
ngOnInit() {
16+
this.demoShared = new DemoSharedMlkitCore();
17+
}
18+
19+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core';
2+
import { NativeScriptCommonModule, NativeScriptRouterModule } from '@nativescript/angular';
3+
import { MlkitCoreComponent } from './mlkit-core.component';
4+
5+
@NgModule({
6+
imports: [NativeScriptCommonModule, NativeScriptRouterModule.forChild([{ path: '', component: MlkitCoreComponent }])],
7+
declarations: [MlkitCoreComponent],
8+
schemas: [ NO_ERRORS_SCHEMA]
9+
})
10+
export class MlkitCoreModule {}

0 commit comments

Comments
 (0)