diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index 3856c8c..0000000 --- a/.eslintrc +++ /dev/null @@ -1,41 +0,0 @@ -{ - "root": true, - "parser": "@typescript-eslint/parser", - "parserOptions": { - "ecmaVersion": 2018, - "sourceType": "module", - "project": "./tsconfig.base.json" - }, - "ignorePatterns": ["**/*"], - "plugins": ["@typescript-eslint", "@nrwl/nx"], - "extends": [ - "eslint:recommended", - "plugin:@typescript-eslint/eslint-recommended", - "plugin:@typescript-eslint/recommended", - "prettier", - "prettier/@typescript-eslint" - ], - "rules": { - "@typescript-eslint/explicit-member-accessibility": "off", - "@typescript-eslint/explicit-function-return-type": "off", - "@typescript-eslint/no-parameter-properties": "off", - "@nrwl/nx/enforce-module-boundaries": [ - "error", - { - "enforceBuildableLibDependency": true, - "allow": [], - "depConstraints": [ - { "sourceTag": "*", "onlyDependOnLibsWithTags": ["*"] } - ] - } - ] - }, - "overrides": [ - { - "files": ["*.tsx"], - "rules": { - "@typescript-eslint/no-unused-vars": "off" - } - } - ] -} diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..155eafd --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,41 @@ +{ + "root": true, + "ignorePatterns": ["**/*"], + "plugins": ["@nrwl/nx"], + "overrides": [ + { + "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], + "rules": { + "@nrwl/nx/enforce-module-boundaries": [ + "error", + { + "enforceBuildableLibDependency": true, + "allow": [], + "depConstraints": [ + { + "sourceTag": "*", + "onlyDependOnLibsWithTags": ["*"] + } + ] + } + ] + } + }, + { + "files": ["*.ts", "*.tsx"], + "extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier", "plugin:@nrwl/nx/typescript"], + "rules": {} + }, + { + "files": ["*.js", "*.jsx"], + "extends": ["plugin:@nrwl/nx/javascript"], + "rules": {} + }, + { + "files": ["references.d.ts"], + "rules": { + "@typescript-eslint/triple-slash-reference": "off" + } + } + ] +} diff --git a/.husky/pre-commit b/.husky/pre-commit old mode 100644 new mode 100755 diff --git a/.nxignore b/.nxignore new file mode 100644 index 0000000..80a8f0e --- /dev/null +++ b/.nxignore @@ -0,0 +1 @@ +apps/**/*_off \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..cc58686 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,17 @@ +{ + "NativescriptExtend.fileAssociations": [ + { + "systemId": "c:\\Users\\sweet\\Documents\\PacktCourses_books\\NATIVESCRIPT\\contributions\\mlkit\\schema\\tns.xsd", + "pattern": "**/**/*.xml" + }, + { + "systemId": "http://www.w3.org/2001/XMLSchema.xsd", + "pattern": "c:\\Users\\sweet\\Documents\\PacktCourses_books\\NATIVESCRIPT\\contributions\\mlkit\\schema\\tns.xsd" + } + ], + "files.exclude": { + "schema": true + }, + "NativescriptExtend.format.enabled": true, + "NativescriptExtend.validation.enabled": true +} diff --git a/apps/demo-angular/.eslintrc.json b/apps/demo-angular/.eslintrc.json new file mode 100644 index 0000000..53c06c8 --- /dev/null +++ b/apps/demo-angular/.eslintrc.json @@ -0,0 +1,18 @@ +{ + "extends": ["../../.eslintrc.json"], + "ignorePatterns": ["!**/*", "node_modules/**/*"], + "overrides": [ + { + "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], + "rules": {} + }, + { + "files": ["*.ts", "*.tsx"], + "rules": {} + }, + { + "files": ["*.js", "*.jsx"], + "rules": {} + } + ] +} diff --git a/apps/demo-angular/package.json b/apps/demo-angular/package.json index 0734234..182ad2d 100644 --- a/apps/demo-angular/package.json +++ b/apps/demo-angular/package.json @@ -13,7 +13,7 @@ "@nativescript/mlkit-selfie-segmentation": "file:../../dist/packages/mlkit-selfie-segmentation" }, "devDependencies": { - "@nativescript/android": "~8.1.1", - "@nativescript/ios": "~8.1.0" + "@nativescript/android": "~8.3.0", + "@nativescript/ios": "~8.3.0" } } diff --git a/apps/demo-angular/project.json b/apps/demo-angular/project.json new file mode 100644 index 0000000..b4a1dd8 --- /dev/null +++ b/apps/demo-angular/project.json @@ -0,0 +1,60 @@ +{ + "$schema": "../../node_modules/nx/schemas/project-schema.json", + "sourceRoot": "apps/demo-angular/src", + "projectType": "application", + "prefix": "demo", + "targets": { + "build": { + "executor": "@nativescript/nx:build", + "options": { + "noHmr": true, + "production": true, + "uglify": true, + "release": true, + "forDevice": true + }, + "dependsOn": [ + { + "target": "build.all", + "projects": "dependencies" + } + ] + }, + "ios": { + "executor": "@nativescript/nx:build", + "options": { + "platform": "ios" + }, + "dependsOn": [ + { + "target": "build.all", + "projects": "dependencies" + } + ] + }, + "android": { + "executor": "@nativescript/nx:build", + "options": { + "platform": "android" + }, + "dependsOn": [ + { + "target": "build.all", + "projects": "dependencies" + } + ] + }, + "clean": { + "executor": "@nativescript/nx:build", + "options": { + "clean": true + } + }, + "lint": { + "executor": "@nrwl/linter:eslint", + "options": { + "lintFilePatterns": ["apps/demo-angular/**/*.ts"] + } + } + } +} diff --git a/apps/demo-angular/tsconfig.json b/apps/demo-angular/tsconfig.json index e3e8d80..8333ffa 100644 --- a/apps/demo-angular/tsconfig.json +++ b/apps/demo-angular/tsconfig.json @@ -1,26 +1,21 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "rootDirs": [ - ".", - "../.." - ], - "baseUrl": ".", "paths": { - "~/*": [ - "src/*" - ], - "@nativescript/*": [ - "../../dist/packages/*" - ], - "@demo/shared": [ - "../../tools/demo/index.ts" - ] + "~/*": ["src/*"], + "@demo/shared": ["tools/demo/index.ts"], + "@nativescript/mlkit-text-recognition": ["packages/mlkit-text-recognition/index.ts"], + "@nativescript/mlkit-core": ["packages/mlkit-core/index.d.ts"], + "@nativescript/mlkit-core/angular": ["packages/mlkit-core/angular/index.ts"], + "@nativescript/mlkit-barcode-scanning": ["packages/mlkit-barcode-scanning/index.ts"], + "@nativescript/mlkit-face-detection": ["packages/mlkit-face-detection/index.ts"], + "@nativescript/mlkit-image-labeling": ["packages/mlkit-image-labeling/index.ts"], + "@nativescript/mlkit-object-detection": ["packages/mlkit-object-detection/index.ts"], + "@nativescript/mlkit-digital-ink-recognition": ["packages/mlkit-digital-ink-recognition/index.ts"], + "@nativescript/mlkit-pose-detection": ["packages/mlkit-pose-detection/index.ts"], + "@nativescript/mlkit-selfie-segmentation": ["packages/mlkit-selfie-segmentation/index.ts"] } }, - "files": [ - "./references.d.ts", - "./src/main.ts", - "./src/polyfills.ts" - ] -} \ No newline at end of file + "files": ["./references.d.ts", "./src/main.ts", "./src/polyfills.ts"], + "include": ["../../packages/**/references.d.ts"] +} diff --git a/apps/demo/.eslintrc.json b/apps/demo/.eslintrc.json new file mode 100644 index 0000000..53c06c8 --- /dev/null +++ b/apps/demo/.eslintrc.json @@ -0,0 +1,18 @@ +{ + "extends": ["../../.eslintrc.json"], + "ignorePatterns": ["!**/*", "node_modules/**/*"], + "overrides": [ + { + "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], + "rules": {} + }, + { + "files": ["*.ts", "*.tsx"], + "rules": {} + }, + { + "files": ["*.js", "*.jsx"], + "rules": {} + } + ] +} diff --git a/apps/demo/package.json b/apps/demo/package.json index feac5a8..2846d2d 100644 --- a/apps/demo/package.json +++ b/apps/demo/package.json @@ -16,7 +16,7 @@ "@nativescript/mlkit-text-recognition": "file:../../packages/mlkit-text-recognition" }, "devDependencies": { - "@nativescript/android": "8.1.1", - "@nativescript/ios": "~8.1.0" + "@nativescript/android": "~8.3.0", + "@nativescript/ios": "~8.3.0" } } diff --git a/apps/demo/project.json b/apps/demo/project.json new file mode 100644 index 0000000..d1eb6d1 --- /dev/null +++ b/apps/demo/project.json @@ -0,0 +1,62 @@ +{ + "$schema": "../../node_modules/nx/schemas/project-schema.json", + "sourceRoot": "apps/demo/src", + "projectType": "application", + "prefix": "demo", + "targets": { + "build": { + "executor": "@nativescript/nx:build", + "options": { + "noHmr": true, + "production": true, + "uglify": true, + "release": true, + "forDevice": true + }, + "dependsOn": [ + { + "target": "build.all", + "projects": "dependencies" + } + ] + }, + "ios": { + "executor": "@nativescript/nx:build", + "options": { + "platform": "ios", + "noHmr": true + }, + "dependsOn": [ + { + "target": "build.all", + "projects": "dependencies" + } + ] + }, + "android": { + "executor": "@nativescript/nx:build", + "options": { + "platform": "android", + "noHmr": true + }, + "dependsOn": [ + { + "target": "build.all", + "projects": "dependencies" + } + ] + }, + "clean": { + "executor": "@nativescript/nx:build", + "options": { + "clean": true + } + }, + "lint": { + "executor": "@nrwl/linter:eslint", + "options": { + "lintFilePatterns": ["apps/demo/**/*.ts"] + } + } + } +} diff --git a/apps/demo/tsconfig.json b/apps/demo/tsconfig.json index d7667fb..27e1f92 100644 --- a/apps/demo/tsconfig.json +++ b/apps/demo/tsconfig.json @@ -1,21 +1,21 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "rootDirs": [ - ".", - "../.." - ], + "rootDirs": [".", "../.."], "baseUrl": ".", "paths": { - "~/*": [ - "src/*" - ], - "@nativescript/*": [ - "../../packages/*" - ], - "@demo/shared": [ - "../../tools/demo/index.ts" - ] + "~/*": ["src/*"], + "@demo/shared": ["../../tools/demo/index.ts"], + "@nativescript/mlkit-text-recognition": ["../../packages/mlkit-text-recognition/index.ts"], + "@nativescript/mlkit-core": ["../../packages/mlkit-core/index.d.ts"], + "@nativescript/mlkit-core/angular": ["../../packages/mlkit-core/angular/index.ts"], + "@nativescript/mlkit-barcode-scanning": ["../../packages/mlkit-barcode-scanning/index.ts"], + "@nativescript/mlkit-face-detection": ["../../packages/mlkit-face-detection/index.ts"], + "@nativescript/mlkit-image-labeling": ["../../packages/mlkit-image-labeling/index.ts"], + "@nativescript/mlkit-object-detection": ["../../packages/mlkit-object-detection/index.ts"], + "@nativescript/mlkit-digital-ink-recognition": ["../../packages/mlkit-digital-ink-recognition/index.ts"], + "@nativescript/mlkit-pose-detection": ["../../packages/mlkit-pose-detection/index.ts"], + "@nativescript/mlkit-selfie-segmentation": ["../../packages/mlkit-selfie-segmentation/index.ts"] } } -} \ No newline at end of file +} diff --git a/jest.config.js b/jest.config.js deleted file mode 100644 index 7d4f7bc..0000000 --- a/jest.config.js +++ /dev/null @@ -1,3 +0,0 @@ -const { getJestProjects } = require('@nrwl/jest'); - -module.exports = { projects: [...getJestProjects()] }; \ No newline at end of file diff --git a/jest.config.ts b/jest.config.ts new file mode 100644 index 0000000..3eeb77b --- /dev/null +++ b/jest.config.ts @@ -0,0 +1,3 @@ +const { getJestProjects } = require('@nrwl/jest'); + +export default { projects: [...getJestProjects()] }; diff --git a/migrations.json b/migrations.json new file mode 100644 index 0000000..f912559 --- /dev/null +++ b/migrations.json @@ -0,0 +1,12 @@ +{ + "migrations": [ + { + "cli": "nx", + "version": "4.1.0", + "description": "Migrate tools to 4.1.0", + "implementation": "./src/migrations/update-4-1-0/update-4-1-0", + "package": "@nativescript/plugin-tools", + "name": "update-to-4.1.0" + } + ] +} diff --git a/nx.json b/nx.json index fadd501..bbf37a9 100644 --- a/nx.json +++ b/nx.json @@ -13,46 +13,20 @@ "tslint.json": "*", "nx.json": "*" }, - "projects": { - "demo": { - "tags": [] - }, - "demo-angular": { - "tags": [] - }, - "all": { - "tags": [] - }, - "mlkit-text-recognition": { - "tags": [] - }, - "mlkit-core": { - "tags": [] - }, - "mlkit-barcode-scanning": { - "tags": [] - }, - "mlkit-face-detection": { - "tags": [] - }, - "mlkit-image-labeling": { - "tags": [] - }, - "mlkit-object-detection": { - "tags": [] - }, - "mlkit-digital-ink-recognition": { - "tags": [] - }, - "mlkit-pose-detection": { - "tags": [] - }, - "mlkit-selfie-segmentation": { - "tags": [] - } - }, "workspaceLayout": { "appsDir": "apps", "libsDir": "packages" - } + }, + "tasksRunnerOptions": { + "default": { + "runner": "nx/tasks-runners/default", + "options": { + "cacheableOperations": ["build", "build.all", "lint", "test", "e2e"], + "runtimeCacheInputs": ["node -v"], + "parallel": 1, + "useDaemonProcess": false + } + } + }, + "$schema": "./node_modules/nx/schemas/nx-schema.json" } diff --git a/package.json b/package.json index 679f3df..aaf20a7 100644 --- a/package.json +++ b/package.json @@ -16,28 +16,30 @@ }, "private": true, "devDependencies": { - "@angular/animations": "^12.0.0", - "@angular/common": "^12.0.0", - "@angular/compiler": "^12.0.0", - "@angular/compiler-cli": "^12.0.0", - "@angular/core": "^12.0.0", - "@angular/forms": "^12.0.0", - "@angular/platform-browser": "^12.0.0", - "@angular/platform-browser-dynamic": "^12.0.0", - "@angular/router": "^12.0.0", - "@nativescript/angular": "^12.0.0", - "@nativescript/core": "^8.0.0", - "@nativescript/plugin-tools": "2.3.0", - "@nativescript/types": "^8.0.0", - "@nativescript/webpack": "~5.0.0", - "@ngtools/webpack": "^12.0.0", - "husky": "^5.1.3", + "@angular/animations": "^14.2.0", + "@angular/common": "^14.2.0", + "@angular/compiler": "^14.2.0", + "@angular/compiler-cli": "^14.2.0", + "@angular/core": "^14.2.0", + "@angular/forms": "^14.2.0", + "@angular/platform-browser": "^14.2.0", + "@angular/platform-browser-dynamic": "^14.2.0", + "@angular/router": "^14.2.0", + "@nativescript/angular": "^14.2.0", + "@nativescript/core": "~8.3.0", + "@nativescript/plugin-tools": "4.1.1", + "@nativescript/types": "~8.3.0", + "@nativescript/webpack": "~5.0.5", + "@ngtools/webpack": "^14.2.0", + "husky": "^8.0.0", "nativescript-vue": "~2.9.0", "nativescript-vue-template-compiler": "~2.9.0", - "ng-packagr": "^12.0.0", - "rxjs": "~6.6.0", - "typescript": "~4.3.5", - "zone.js": "~0.11.1" + "ng-packagr": "^14.2.0", + "rxjs": "~7.5.0", + "typescript": "~4.7.3", + "zone.js": "~0.11.1", + "@angular-devkit/build-angular": "^14.2.0", + "nativescript-permissions": "1.3.11" }, "lint-staged": { "**/*.{js,ts,scss,json,html}": [ diff --git a/packages/mlkit-barcode-scanning/.eslintrc.json b/packages/mlkit-barcode-scanning/.eslintrc.json new file mode 100644 index 0000000..53c06c8 --- /dev/null +++ b/packages/mlkit-barcode-scanning/.eslintrc.json @@ -0,0 +1,18 @@ +{ + "extends": ["../../.eslintrc.json"], + "ignorePatterns": ["!**/*", "node_modules/**/*"], + "overrides": [ + { + "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], + "rules": {} + }, + { + "files": ["*.ts", "*.tsx"], + "rules": {} + }, + { + "files": ["*.js", "*.jsx"], + "rules": {} + } + ] +} diff --git a/packages/mlkit-barcode-scanning/README.md b/packages/mlkit-barcode-scanning/README.md index c0e3c0a..2fb1e56 100644 --- a/packages/mlkit-barcode-scanning/README.md +++ b/packages/mlkit-barcode-scanning/README.md @@ -1,12 +1,12 @@ # @nativescript/mlkit-barcode-scanning ```javascript -ns plugin add @nativescript/mlkit-barcode-scanning +npm install @nativescript/mlkit-barcode-scanning ``` ## Usage -// TODO +See [@nativescript/mlkit-core](/packages/mlkit-core/README.md) Usage ## License diff --git a/packages/mlkit-barcode-scanning/package.json b/packages/mlkit-barcode-scanning/package.json index d692bf2..8f64686 100644 --- a/packages/mlkit-barcode-scanning/package.json +++ b/packages/mlkit-barcode-scanning/package.json @@ -1,6 +1,6 @@ { "name": "@nativescript/mlkit-barcode-scanning", - "version": "1.0.5", + "version": "1.0.6", "description": "NativeScript MLKit Barcode Scanner module", "main": "index", "typings": "index.d.ts", diff --git a/packages/mlkit-barcode-scanning/project.json b/packages/mlkit-barcode-scanning/project.json new file mode 100644 index 0000000..ec7dbe5 --- /dev/null +++ b/packages/mlkit-barcode-scanning/project.json @@ -0,0 +1,62 @@ +{ + "$schema": "../../node_modules/nx/schemas/project-schema.json", + "projectType": "library", + "sourceRoot": "packages/mlkit-barcode-scanning", + "targets": { + "build": { + "executor": "@nrwl/js:tsc", + "options": { + "outputPath": "dist/packages/mlkit-barcode-scanning", + "tsConfig": "packages/mlkit-barcode-scanning/tsconfig.json", + "packageJson": "packages/mlkit-barcode-scanning/package.json", + "main": "packages/mlkit-barcode-scanning/index.ts", + "assets": [ + "packages/mlkit-barcode-scanning/*.md", + "LICENSE", + { + "glob": "**/*", + "input": "packages/mlkit-barcode-scanning/platforms/", + "output": "./platforms/" + } + ] + }, + "dependsOn": [ + { + "target": "build.all", + "projects": "dependencies" + } + ] + }, + "build.all": { + "executor": "@nrwl/workspace:run-commands", + "options": { + "commands": ["node tools/scripts/build-finish.ts mlkit-barcode-scanning"], + "parallel": false + }, + "outputs": ["dist/packages/mlkit-barcode-scanning"], + "dependsOn": [ + { + "target": "build.all", + "projects": "dependencies" + }, + { + "target": "build", + "projects": "self" + } + ] + }, + "focus": { + "executor": "@nrwl/workspace:run-commands", + "options": { + "commands": ["nx g @nativescript/plugin-tools:focus-packages mlkit-barcode-scanning"], + "parallel": false + } + }, + "lint": { + "executor": "@nrwl/linter:eslint", + "options": { + "lintFilePatterns": ["packages/mlkit-barcode-scanning/**/*.ts"] + } + } + } +} diff --git a/packages/mlkit-core/.eslintrc.json b/packages/mlkit-core/.eslintrc.json new file mode 100644 index 0000000..53c06c8 --- /dev/null +++ b/packages/mlkit-core/.eslintrc.json @@ -0,0 +1,18 @@ +{ + "extends": ["../../.eslintrc.json"], + "ignorePatterns": ["!**/*", "node_modules/**/*"], + "overrides": [ + { + "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], + "rules": {} + }, + { + "files": ["*.ts", "*.tsx"], + "rules": {} + }, + { + "files": ["*.js", "*.jsx"], + "rules": {} + } + ] +} diff --git a/packages/mlkit-core/README.md b/packages/mlkit-core/README.md index 900409f..b2f8445 100644 --- a/packages/mlkit-core/README.md +++ b/packages/mlkit-core/README.md @@ -1,7 +1,7 @@ # @nativescript/mlkit-core ```javascript -ns plugin add @nativescript/mlkit-core +npm install @nativescript/mlkit-core ``` ## Usage @@ -69,7 +69,7 @@ detectionType="all" # Barcode Scanning ```javascript -ns plugin add @nativescript/mlkit-barcode-scanning +npm install @nativescript/mlkit-barcode-scanning ``` ```ts @@ -85,7 +85,7 @@ onDetection(event: DetectionEvent){ # Face Detection ```javascript -ns plugin add @nativescript/mlkit-face-detection +npm install @nativescript/mlkit-face-detection ``` ```ts @@ -102,7 +102,7 @@ onDetection(event: DetectionEvent){ # Image Labeling ```javascript -ns plugin add @nativescript/mlkit-image-labeling +npm install @nativescript/mlkit-image-labeling ``` ```ts @@ -119,7 +119,7 @@ onDetection(event: DetectionEvent){ # Object Detection ```javascript -ns plugin add @nativescript/mlkit-object-detection +npm install @nativescript/mlkit-object-detection ``` ```ts @@ -135,7 +135,7 @@ onDetection(event: DetectionEvent){ # Pose Detection ```javascript -ns plugin add @nativescript/mlkit-pose-detection +npm install @nativescript/mlkit-pose-detection ``` ```ts @@ -152,7 +152,7 @@ onDetection(event: DetectionEvent){ # Text Recognition ```javascript -ns plugin add @nativescript/mlkit-text-recognition +npm install @nativescript/mlkit-text-recognition ``` ```ts diff --git a/packages/mlkit-core/angular/.eslintrc.json b/packages/mlkit-core/angular/.eslintrc.json new file mode 100644 index 0000000..b373d84 --- /dev/null +++ b/packages/mlkit-core/angular/.eslintrc.json @@ -0,0 +1,24 @@ +{ + "extends": ["../.eslintrc.json"], + "overrides": [ + { + "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], + "rules": {} + }, + { + "files": ["*.ts", "*.tsx"], + "rules": { + "@nrwl/nx/enforce-module-boundaries": [ + "error", + { + "allowCircularSelfDependency": true + } + ] + } + }, + { + "files": ["*.js", "*.jsx"], + "rules": {} + } + ] +} diff --git a/packages/mlkit-core/angular/index.ts b/packages/mlkit-core/angular/index.ts index f6042be..c72b8b8 100644 --- a/packages/mlkit-core/angular/index.ts +++ b/packages/mlkit-core/angular/index.ts @@ -2,7 +2,7 @@ import { NgModule } from '@angular/core'; import { registerElement } from '@nativescript/angular'; import { MLKitViewDirective } from './mlkit-view-directive'; - +export * from './mlkit-view-directive'; @NgModule({ declarations: [MLKitViewDirective], diff --git a/packages/mlkit-core/angular/ng-package.json b/packages/mlkit-core/angular/ng-package.json new file mode 100644 index 0000000..45ee28b --- /dev/null +++ b/packages/mlkit-core/angular/ng-package.json @@ -0,0 +1,8 @@ +{ + "$schema": "../../../node_modules/ng-packagr/ng-package.schema.json", + "lib": { + "entryFile": "index.ts" + }, + "allowedNonPeerDependencies": ["."], + "dest": "../../../dist/packages/mlkit-core/angular" +} diff --git a/packages/mlkit-core/angular/package.json b/packages/mlkit-core/angular/package.json index 3f21dcb..f030070 100644 --- a/packages/mlkit-core/angular/package.json +++ b/packages/mlkit-core/angular/package.json @@ -1,16 +1,3 @@ { - "name": "@nativescript/mlkit-core-angular", - "ngPackage": { - "lib": { - "entryFile": "index.ts", - "umdModuleIds": { - "@nativescript/core": "ns-core", - "@nativescript/angular": "ns-angular", - "@nativescript/mlkit-core": "ns-mlkit-core" - } - }, - "allowedNonPeerDependencies": [ - "." - ] - } + "name": "@nativescript/mlkit-core-angular" } diff --git a/packages/mlkit-core/angular/tsconfig.angular.json b/packages/mlkit-core/angular/tsconfig.angular.json index 930b228..14cfe4d 100644 --- a/packages/mlkit-core/angular/tsconfig.angular.json +++ b/packages/mlkit-core/angular/tsconfig.angular.json @@ -1,10 +1,13 @@ { - "extends": "../../../node_modules/ng-packagr/lib/ts/conf/tsconfig.ngc.json", - "compilerOptions": { - "types": ["node"], - "baseUrl": ".", - "paths": { - "@nativescript/mlkit-core": ["../../../dist/packages/mlkit-core"] - } - } + "extends": "../../../node_modules/ng-packagr/lib/ts/conf/tsconfig.ngc.json", + "compilerOptions": { + "types": ["node"], + "baseUrl": ".", + "paths": { + "@nativescript/mlkit-core": ["../../../dist/packages/mlkit-core"] + }, + "outDir": "../../../dist/out-tsc", + "declarationDir": "../../../dist/out-tsc" + }, + "files": ["index.ts"] } diff --git a/packages/mlkit-core/angular/tsconfig.json b/packages/mlkit-core/angular/tsconfig.json index 2d6ba44..0e3f1e6 100644 --- a/packages/mlkit-core/angular/tsconfig.json +++ b/packages/mlkit-core/angular/tsconfig.json @@ -1,7 +1,7 @@ { - "extends": "../../../tsconfig.base.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "rootDir": "." - } -} \ No newline at end of file + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "../../../dist/out-tsc", + "rootDir": "." + } +} diff --git a/packages/mlkit-core/common.ts b/packages/mlkit-core/common.ts index 857442c..f8901a3 100644 --- a/packages/mlkit-core/common.ts +++ b/packages/mlkit-core/common.ts @@ -58,6 +58,7 @@ export class MLKitViewBase extends ContainerView { processEveryNthFrame: number; readonly latestImage?: ImageSource; retrieveLatestImage: boolean; + aspectRatio: 'aspect' | 'aspectFill' | 'fill'; } export const cameraPositionProperty = new Property({ @@ -67,6 +68,13 @@ export const cameraPositionProperty = new Property({ + name: 'aspectRatio', + defaultValue: 'aspect', +}); + +aspectRatioProperty.register(MLKitViewBase); + export const detectionTypeProperty = new Property({ name: 'detectionType', defaultValue: DetectionType.None, diff --git a/packages/mlkit-core/index.d.ts b/packages/mlkit-core/index.d.ts index 048ed0d..d320328 100644 --- a/packages/mlkit-core/index.d.ts +++ b/packages/mlkit-core/index.d.ts @@ -43,6 +43,11 @@ export declare class MLKitView extends MLKitViewBase { requestCameraPermission(): Promise; hasCameraPermission(): boolean; on(event: 'detection', callback: (args: DetectionEvent) => void, thisArg?: any); + // Needed when 'on' method is overriden. + /** + * @hidden + */ + on(eventNames: string, callback: (data: EventData) => void, thisArg?: any): void; } export function detectWithStillImage(image: any, options?: StillImageDetectionOptions): Promise<{ [key: string]: any }>; diff --git a/packages/mlkit-core/index.ios.ts b/packages/mlkit-core/index.ios.ts index ec40155..b93cfe0 100644 --- a/packages/mlkit-core/index.ios.ts +++ b/packages/mlkit-core/index.ios.ts @@ -1,5 +1,5 @@ import { ImageSource, Utils } from '@nativescript/core'; -import { BarcodeFormats, barcodeFormatsProperty, CameraPosition, cameraPositionProperty, DetectionType, detectionTypeProperty, faceDetectionMinFaceSizeProperty, faceDetectionPerformanceModeProperty, faceDetectionTrackingEnabledProperty, imageLabelerConfidenceThresholdProperty, MLKitViewBase, objectDetectionClassifyProperty, objectDetectionMultipleProperty, pauseProperty, processEveryNthFrameProperty, torchOnProperty } from './common'; +import { BarcodeFormats, barcodeFormatsProperty, CameraPosition, cameraPositionProperty, DetectionType, detectionTypeProperty, faceDetectionMinFaceSizeProperty, faceDetectionPerformanceModeProperty, faceDetectionTrackingEnabledProperty, imageLabelerConfidenceThresholdProperty, MLKitViewBase, objectDetectionClassifyProperty, objectDetectionMultipleProperty, pauseProperty, processEveryNthFrameProperty, torchOnProperty, aspectRatioProperty } from './common'; import '@nativescript/core'; import lazy from '@nativescript/core/utils/lazy'; import { DetectionEvent, StillImageDetectionOptions } from '.'; @@ -17,6 +17,18 @@ export { BarcodeFormats, barcodeFormatsProperty, CameraPosition, cameraPositionP declare const TNSMLKitHelper, TNSMLKitHelperCameraPosition; +function getGravity(value) { + switch (value) { + case 'fill': + return AVLayerVideoGravityResize; + case 'aspectFill': + return AVLayerVideoGravityResizeAspectFill; + case 'aspect': + return AVLayerVideoGravityResizeAspect; + } + return null; +} + export class MLKitView extends MLKitViewBase { #device: AVCaptureDevice; #preview: AVCaptureVideoPreviewLayer; @@ -68,7 +80,7 @@ export class MLKitView extends MLKitViewBase { createNativeView() { const nativeView = UIView.new(); this.#preview = AVCaptureVideoPreviewLayer.layerWithSession(this.#mlkitHelper.session); - this.#preview.videoGravity = AVLayerVideoGravityResizeAspect; + this.#preview.videoGravity = getGravity(this.aspectRatio) ?? AVLayerVideoGravityResizeAspect; nativeView.layer.insertSublayerAtIndex(this.#preview, 0); return nativeView; } @@ -145,6 +157,18 @@ export class MLKitView extends MLKitViewBase { return this.#selfieSegmentor; } + [aspectRatioProperty.setNative](ratio) { + if (this.#preview) { + switch (ratio) { + case 'fill': + case 'aspectFill': + case 'aspect': + this.#preview.videoGravity = getGravity(ratio); + break; + } + } + } + [cameraPositionProperty.setNative](value: CameraPosition) { switch (value) { case CameraPosition.FRONT: diff --git a/packages/mlkit-core/package.json b/packages/mlkit-core/package.json index 79f57a0..c155683 100644 --- a/packages/mlkit-core/package.json +++ b/packages/mlkit-core/package.json @@ -1,6 +1,6 @@ { "name": "@nativescript/mlkit-core", - "version": "1.0.5", + "version": "1.0.6", "description": "NativeScript MLKit Core", "main": "index", "typings": "index.d.ts", diff --git a/packages/mlkit-core/project.json b/packages/mlkit-core/project.json new file mode 100644 index 0000000..ae8b94a --- /dev/null +++ b/packages/mlkit-core/project.json @@ -0,0 +1,63 @@ +{ + "$schema": "../../node_modules/nx/schemas/project-schema.json", + "projectType": "library", + "sourceRoot": "packages/mlkit-core", + "targets": { + "build": { + "executor": "@nrwl/js:tsc", + "options": { + "outputPath": "dist/packages/mlkit-core", + "tsConfig": "packages/mlkit-core/tsconfig.json", + "packageJson": "packages/mlkit-core/package.json", + "main": "packages/mlkit-core/index.d.ts", + "assets": [ + "packages/mlkit-core/*.md", + "packages/mlkit-core/index.d.ts", + "LICENSE", + { + "glob": "**/*", + "input": "packages/mlkit-core/platforms/", + "output": "./platforms/" + } + ] + }, + "dependsOn": [ + { + "target": "build.all", + "projects": "dependencies" + } + ] + }, + "build.all": { + "executor": "@nrwl/workspace:run-commands", + "options": { + "commands": ["node tools/scripts/build-finish.ts mlkit-core"], + "parallel": false + }, + "outputs": ["dist/packages/mlkit-core"], + "dependsOn": [ + { + "target": "build.all", + "projects": "dependencies" + }, + { + "target": "build", + "projects": "self" + } + ] + }, + "focus": { + "executor": "@nrwl/workspace:run-commands", + "options": { + "commands": ["nx g @nativescript/plugin-tools:focus-packages mlkit-core"], + "parallel": false + } + }, + "lint": { + "executor": "@nrwl/linter:eslint", + "options": { + "lintFilePatterns": ["packages/mlkit-core/**/*.ts"] + } + } + } +} diff --git a/packages/mlkit-digital-ink-recognition/.eslintrc.json b/packages/mlkit-digital-ink-recognition/.eslintrc.json new file mode 100644 index 0000000..53c06c8 --- /dev/null +++ b/packages/mlkit-digital-ink-recognition/.eslintrc.json @@ -0,0 +1,18 @@ +{ + "extends": ["../../.eslintrc.json"], + "ignorePatterns": ["!**/*", "node_modules/**/*"], + "overrides": [ + { + "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], + "rules": {} + }, + { + "files": ["*.ts", "*.tsx"], + "rules": {} + }, + { + "files": ["*.js", "*.jsx"], + "rules": {} + } + ] +} diff --git a/packages/mlkit-digital-ink-recognition/README.md b/packages/mlkit-digital-ink-recognition/README.md index 4806ee8..c6cbac5 100644 --- a/packages/mlkit-digital-ink-recognition/README.md +++ b/packages/mlkit-digital-ink-recognition/README.md @@ -1,13 +1,12 @@ # @nativescript/mlkit-digital-ink-recognition ```javascript -ns plugin add @nativescript/mlkit-digital-ink-recognition +npm install @nativescript/mlkit-digital-ink-recognition ``` ## Usage -// TODO - +See [@nativescript/mlkit-core](/packages/mlkit-core/README.md) Usage ## License Apache License Version 2.0 diff --git a/packages/mlkit-digital-ink-recognition/project.json b/packages/mlkit-digital-ink-recognition/project.json new file mode 100644 index 0000000..7cd36d2 --- /dev/null +++ b/packages/mlkit-digital-ink-recognition/project.json @@ -0,0 +1,62 @@ +{ + "$schema": "../../node_modules/nx/schemas/project-schema.json", + "projectType": "library", + "sourceRoot": "packages/mlkit-digital-ink-recognition", + "targets": { + "build": { + "executor": "@nrwl/js:tsc", + "options": { + "outputPath": "dist/packages/mlkit-digital-ink-recognition", + "tsConfig": "packages/mlkit-digital-ink-recognition/tsconfig.json", + "packageJson": "packages/mlkit-digital-ink-recognition/package.json", + "main": "packages/mlkit-digital-ink-recognition/index.ts", + "assets": [ + "packages/mlkit-digital-ink-recognition/*.md", + "LICENSE", + { + "glob": "**/*", + "input": "packages/mlkit-digital-ink-recognition/platforms/", + "output": "./platforms/" + } + ] + }, + "dependsOn": [ + { + "target": "build.all", + "projects": "dependencies" + } + ] + }, + "build.all": { + "executor": "@nrwl/workspace:run-commands", + "options": { + "commands": ["node tools/scripts/build-finish.ts mlkit-digital-ink-recognition"], + "parallel": false + }, + "outputs": ["dist/packages/mlkit-digital-ink-recognition"], + "dependsOn": [ + { + "target": "build.all", + "projects": "dependencies" + }, + { + "target": "build", + "projects": "self" + } + ] + }, + "focus": { + "executor": "@nrwl/workspace:run-commands", + "options": { + "commands": ["nx g @nativescript/plugin-tools:focus-packages mlkit-digital-ink-recognition"], + "parallel": false + } + }, + "lint": { + "executor": "@nrwl/linter:eslint", + "options": { + "lintFilePatterns": ["packages/mlkit-digital-ink-recognition/**/*.ts"] + } + } + } +} diff --git a/packages/mlkit-face-detection/.eslintrc.json b/packages/mlkit-face-detection/.eslintrc.json new file mode 100644 index 0000000..53c06c8 --- /dev/null +++ b/packages/mlkit-face-detection/.eslintrc.json @@ -0,0 +1,18 @@ +{ + "extends": ["../../.eslintrc.json"], + "ignorePatterns": ["!**/*", "node_modules/**/*"], + "overrides": [ + { + "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], + "rules": {} + }, + { + "files": ["*.ts", "*.tsx"], + "rules": {} + }, + { + "files": ["*.js", "*.jsx"], + "rules": {} + } + ] +} diff --git a/packages/mlkit-face-detection/README.md b/packages/mlkit-face-detection/README.md index 701d0bd..d3f6ce0 100644 --- a/packages/mlkit-face-detection/README.md +++ b/packages/mlkit-face-detection/README.md @@ -1,13 +1,12 @@ # @nativescript/mlkit-face-detection ```javascript -ns plugin add @nativescript/mlkit-face-detection +npm install @nativescript/mlkit-face-detection ``` ## Usage -// TODO - +See [@nativescript/mlkit-core](/packages/mlkit-core/README.md) Usage ## License Apache License Version 2.0 diff --git a/packages/mlkit-face-detection/package.json b/packages/mlkit-face-detection/package.json index 63620b7..2f8b5ff 100644 --- a/packages/mlkit-face-detection/package.json +++ b/packages/mlkit-face-detection/package.json @@ -1,6 +1,6 @@ { "name": "@nativescript/mlkit-face-detection", - "version": "1.0.5", + "version": "1.0.6", "description": "NativeScript MLKit Face Detection module", "main": "index", "typings": "index.d.ts", diff --git a/packages/mlkit-face-detection/project.json b/packages/mlkit-face-detection/project.json new file mode 100644 index 0000000..57db7a9 --- /dev/null +++ b/packages/mlkit-face-detection/project.json @@ -0,0 +1,62 @@ +{ + "$schema": "../../node_modules/nx/schemas/project-schema.json", + "projectType": "library", + "sourceRoot": "packages/mlkit-face-detection", + "targets": { + "build": { + "executor": "@nrwl/js:tsc", + "options": { + "outputPath": "dist/packages/mlkit-face-detection", + "tsConfig": "packages/mlkit-face-detection/tsconfig.json", + "packageJson": "packages/mlkit-face-detection/package.json", + "main": "packages/mlkit-face-detection/index.ts", + "assets": [ + "packages/mlkit-face-detection/*.md", + "LICENSE", + { + "glob": "**/*", + "input": "packages/mlkit-face-detection/platforms/", + "output": "./platforms/" + } + ] + }, + "dependsOn": [ + { + "target": "build.all", + "projects": "dependencies" + } + ] + }, + "build.all": { + "executor": "@nrwl/workspace:run-commands", + "options": { + "commands": ["node tools/scripts/build-finish.ts mlkit-face-detection"], + "parallel": false + }, + "outputs": ["dist/packages/mlkit-face-detection"], + "dependsOn": [ + { + "target": "build.all", + "projects": "dependencies" + }, + { + "target": "build", + "projects": "self" + } + ] + }, + "focus": { + "executor": "@nrwl/workspace:run-commands", + "options": { + "commands": ["nx g @nativescript/plugin-tools:focus-packages mlkit-face-detection"], + "parallel": false + } + }, + "lint": { + "executor": "@nrwl/linter:eslint", + "options": { + "lintFilePatterns": ["packages/mlkit-face-detection/**/*.ts"] + } + } + } +} diff --git a/packages/mlkit-image-labeling/.eslintrc.json b/packages/mlkit-image-labeling/.eslintrc.json new file mode 100644 index 0000000..53c06c8 --- /dev/null +++ b/packages/mlkit-image-labeling/.eslintrc.json @@ -0,0 +1,18 @@ +{ + "extends": ["../../.eslintrc.json"], + "ignorePatterns": ["!**/*", "node_modules/**/*"], + "overrides": [ + { + "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], + "rules": {} + }, + { + "files": ["*.ts", "*.tsx"], + "rules": {} + }, + { + "files": ["*.js", "*.jsx"], + "rules": {} + } + ] +} diff --git a/packages/mlkit-image-labeling/README.md b/packages/mlkit-image-labeling/README.md index 5af148d..ad6d907 100644 --- a/packages/mlkit-image-labeling/README.md +++ b/packages/mlkit-image-labeling/README.md @@ -1,13 +1,12 @@ # @nativescript/mlkit-image-labeling ```javascript -ns plugin add @nativescript/mlkit-image-labeling +npm install @nativescript/mlkit-image-labeling ``` ## Usage -// TODO - +See [@nativescript/mlkit-core](/packages/mlkit-core/README.md) Usage ## License Apache License Version 2.0 diff --git a/packages/mlkit-image-labeling/package.json b/packages/mlkit-image-labeling/package.json index 53376ae..ffad14e 100644 --- a/packages/mlkit-image-labeling/package.json +++ b/packages/mlkit-image-labeling/package.json @@ -1,6 +1,6 @@ { "name": "@nativescript/mlkit-image-labeling", - "version": "1.0.5", + "version": "1.0.6", "description": "NativeScript MLKit Image Labeling module", "main": "index", "typings": "index.d.ts", diff --git a/packages/mlkit-image-labeling/project.json b/packages/mlkit-image-labeling/project.json new file mode 100644 index 0000000..dab2462 --- /dev/null +++ b/packages/mlkit-image-labeling/project.json @@ -0,0 +1,62 @@ +{ + "$schema": "../../node_modules/nx/schemas/project-schema.json", + "projectType": "library", + "sourceRoot": "packages/mlkit-image-labeling", + "targets": { + "build": { + "executor": "@nrwl/js:tsc", + "options": { + "outputPath": "dist/packages/mlkit-image-labeling", + "tsConfig": "packages/mlkit-image-labeling/tsconfig.json", + "packageJson": "packages/mlkit-image-labeling/package.json", + "main": "packages/mlkit-image-labeling/index.ts", + "assets": [ + "packages/mlkit-image-labeling/*.md", + "LICENSE", + { + "glob": "**/*", + "input": "packages/mlkit-image-labeling/platforms/", + "output": "./platforms/" + } + ] + }, + "dependsOn": [ + { + "target": "build.all", + "projects": "dependencies" + } + ] + }, + "build.all": { + "executor": "@nrwl/workspace:run-commands", + "options": { + "commands": ["node tools/scripts/build-finish.ts mlkit-image-labeling"], + "parallel": false + }, + "outputs": ["dist/packages/mlkit-image-labeling"], + "dependsOn": [ + { + "target": "build.all", + "projects": "dependencies" + }, + { + "target": "build", + "projects": "self" + } + ] + }, + "focus": { + "executor": "@nrwl/workspace:run-commands", + "options": { + "commands": ["nx g @nativescript/plugin-tools:focus-packages mlkit-image-labeling"], + "parallel": false + } + }, + "lint": { + "executor": "@nrwl/linter:eslint", + "options": { + "lintFilePatterns": ["packages/mlkit-image-labeling/**/*.ts"] + } + } + } +} diff --git a/packages/mlkit-object-detection/.eslintrc.json b/packages/mlkit-object-detection/.eslintrc.json new file mode 100644 index 0000000..53c06c8 --- /dev/null +++ b/packages/mlkit-object-detection/.eslintrc.json @@ -0,0 +1,18 @@ +{ + "extends": ["../../.eslintrc.json"], + "ignorePatterns": ["!**/*", "node_modules/**/*"], + "overrides": [ + { + "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], + "rules": {} + }, + { + "files": ["*.ts", "*.tsx"], + "rules": {} + }, + { + "files": ["*.js", "*.jsx"], + "rules": {} + } + ] +} diff --git a/packages/mlkit-object-detection/README.md b/packages/mlkit-object-detection/README.md index 742ee79..578b1a9 100644 --- a/packages/mlkit-object-detection/README.md +++ b/packages/mlkit-object-detection/README.md @@ -1,13 +1,12 @@ # @nativescript/mlkit-object-detection ```javascript -ns plugin add @nativescript/mlkit-object-detection +npm install @nativescript/mlkit-object-detection ``` ## Usage -// TODO - +See [@nativescript/mlkit-core](/packages/mlkit-core/README.md) Usage ## License Apache License Version 2.0 diff --git a/packages/mlkit-object-detection/package.json b/packages/mlkit-object-detection/package.json index fca8770..8d3da92 100644 --- a/packages/mlkit-object-detection/package.json +++ b/packages/mlkit-object-detection/package.json @@ -1,6 +1,6 @@ { "name": "@nativescript/mlkit-object-detection", - "version": "1.0.5", + "version": "1.0.6", "description": "NativeScript MLKit Object Detection module", "main": "index", "typings": "index.d.ts", diff --git a/packages/mlkit-object-detection/project.json b/packages/mlkit-object-detection/project.json new file mode 100644 index 0000000..6bd1f0b --- /dev/null +++ b/packages/mlkit-object-detection/project.json @@ -0,0 +1,62 @@ +{ + "$schema": "../../node_modules/nx/schemas/project-schema.json", + "projectType": "library", + "sourceRoot": "packages/mlkit-object-detection", + "targets": { + "build": { + "executor": "@nrwl/js:tsc", + "options": { + "outputPath": "dist/packages/mlkit-object-detection", + "tsConfig": "packages/mlkit-object-detection/tsconfig.json", + "packageJson": "packages/mlkit-object-detection/package.json", + "main": "packages/mlkit-object-detection/index.ts", + "assets": [ + "packages/mlkit-object-detection/*.md", + "LICENSE", + { + "glob": "**/*", + "input": "packages/mlkit-object-detection/platforms/", + "output": "./platforms/" + } + ] + }, + "dependsOn": [ + { + "target": "build.all", + "projects": "dependencies" + } + ] + }, + "build.all": { + "executor": "@nrwl/workspace:run-commands", + "options": { + "commands": ["node tools/scripts/build-finish.ts mlkit-object-detection"], + "parallel": false + }, + "outputs": ["dist/packages/mlkit-object-detection"], + "dependsOn": [ + { + "target": "build.all", + "projects": "dependencies" + }, + { + "target": "build", + "projects": "self" + } + ] + }, + "focus": { + "executor": "@nrwl/workspace:run-commands", + "options": { + "commands": ["nx g @nativescript/plugin-tools:focus-packages mlkit-object-detection"], + "parallel": false + } + }, + "lint": { + "executor": "@nrwl/linter:eslint", + "options": { + "lintFilePatterns": ["packages/mlkit-object-detection/**/*.ts"] + } + } + } +} diff --git a/packages/mlkit-pose-detection/.eslintrc.json b/packages/mlkit-pose-detection/.eslintrc.json new file mode 100644 index 0000000..53c06c8 --- /dev/null +++ b/packages/mlkit-pose-detection/.eslintrc.json @@ -0,0 +1,18 @@ +{ + "extends": ["../../.eslintrc.json"], + "ignorePatterns": ["!**/*", "node_modules/**/*"], + "overrides": [ + { + "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], + "rules": {} + }, + { + "files": ["*.ts", "*.tsx"], + "rules": {} + }, + { + "files": ["*.js", "*.jsx"], + "rules": {} + } + ] +} diff --git a/packages/mlkit-pose-detection/README.md b/packages/mlkit-pose-detection/README.md index bd4fcf5..a8a458f 100644 --- a/packages/mlkit-pose-detection/README.md +++ b/packages/mlkit-pose-detection/README.md @@ -1,12 +1,12 @@ # @nativescript/mlkit-pose-detection ```javascript -ns plugin add @nativescript/mlkit-pose-detection +npm install @nativescript/mlkit-pose-detection ``` ## Usage -// TODO +See [@nativescript/mlkit-core](/packages/mlkit-core/README.md) Usage ## License diff --git a/packages/mlkit-pose-detection/package.json b/packages/mlkit-pose-detection/package.json index 4db6cfd..7e5238d 100644 --- a/packages/mlkit-pose-detection/package.json +++ b/packages/mlkit-pose-detection/package.json @@ -1,6 +1,6 @@ { "name": "@nativescript/mlkit-pose-detection", - "version": "1.0.5", + "version": "1.0.6", "description": "NativeScript MLKit Pose Detection module", "main": "index", "typings": "index.d.ts", diff --git a/packages/mlkit-pose-detection/project.json b/packages/mlkit-pose-detection/project.json new file mode 100644 index 0000000..90a2844 --- /dev/null +++ b/packages/mlkit-pose-detection/project.json @@ -0,0 +1,62 @@ +{ + "$schema": "../../node_modules/nx/schemas/project-schema.json", + "projectType": "library", + "sourceRoot": "packages/mlkit-pose-detection", + "targets": { + "build": { + "executor": "@nrwl/js:tsc", + "options": { + "outputPath": "dist/packages/mlkit-pose-detection", + "tsConfig": "packages/mlkit-pose-detection/tsconfig.json", + "packageJson": "packages/mlkit-pose-detection/package.json", + "main": "packages/mlkit-pose-detection/index.ts", + "assets": [ + "packages/mlkit-pose-detection/*.md", + "LICENSE", + { + "glob": "**/*", + "input": "packages/mlkit-pose-detection/platforms/", + "output": "./platforms/" + } + ] + }, + "dependsOn": [ + { + "target": "build.all", + "projects": "dependencies" + } + ] + }, + "build.all": { + "executor": "@nrwl/workspace:run-commands", + "options": { + "commands": ["node tools/scripts/build-finish.ts mlkit-pose-detection"], + "parallel": false + }, + "outputs": ["dist/packages/mlkit-pose-detection"], + "dependsOn": [ + { + "target": "build.all", + "projects": "dependencies" + }, + { + "target": "build", + "projects": "self" + } + ] + }, + "focus": { + "executor": "@nrwl/workspace:run-commands", + "options": { + "commands": ["nx g @nativescript/plugin-tools:focus-packages mlkit-pose-detection"], + "parallel": false + } + }, + "lint": { + "executor": "@nrwl/linter:eslint", + "options": { + "lintFilePatterns": ["packages/mlkit-pose-detection/**/*.ts"] + } + } + } +} diff --git a/packages/mlkit-selfie-segmentation/.eslintrc.json b/packages/mlkit-selfie-segmentation/.eslintrc.json new file mode 100644 index 0000000..53c06c8 --- /dev/null +++ b/packages/mlkit-selfie-segmentation/.eslintrc.json @@ -0,0 +1,18 @@ +{ + "extends": ["../../.eslintrc.json"], + "ignorePatterns": ["!**/*", "node_modules/**/*"], + "overrides": [ + { + "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], + "rules": {} + }, + { + "files": ["*.ts", "*.tsx"], + "rules": {} + }, + { + "files": ["*.js", "*.jsx"], + "rules": {} + } + ] +} diff --git a/packages/mlkit-selfie-segmentation/README.md b/packages/mlkit-selfie-segmentation/README.md index 7ebcdac..a5fe862 100644 --- a/packages/mlkit-selfie-segmentation/README.md +++ b/packages/mlkit-selfie-segmentation/README.md @@ -1,13 +1,12 @@ # @nativescript/mlkit-selfie-segmentation ```javascript -ns plugin add @nativescript/mlkit-selfie-segmentation +npm install @nativescript/mlkit-selfie-segmentation ``` ## Usage -// TODO - +See [@nativescript/mlkit-core](/packages/mlkit-core/README.md) Usage ## License Apache License Version 2.0 diff --git a/packages/mlkit-selfie-segmentation/package.json b/packages/mlkit-selfie-segmentation/package.json index b1bfef3..85ea7cc 100644 --- a/packages/mlkit-selfie-segmentation/package.json +++ b/packages/mlkit-selfie-segmentation/package.json @@ -1,6 +1,6 @@ { "name": "@nativescript/mlkit-selfie-segmentation", - "version": "1.0.5", + "version": "1.0.6", "description": "NativeScript MLKit Self Segmentation module", "main": "index", "typings": "index.d.ts", diff --git a/packages/mlkit-selfie-segmentation/project.json b/packages/mlkit-selfie-segmentation/project.json new file mode 100644 index 0000000..c5a8311 --- /dev/null +++ b/packages/mlkit-selfie-segmentation/project.json @@ -0,0 +1,62 @@ +{ + "$schema": "../../node_modules/nx/schemas/project-schema.json", + "projectType": "library", + "sourceRoot": "packages/mlkit-selfie-segmentation", + "targets": { + "build": { + "executor": "@nrwl/js:tsc", + "options": { + "outputPath": "dist/packages/mlkit-selfie-segmentation", + "tsConfig": "packages/mlkit-selfie-segmentation/tsconfig.json", + "packageJson": "packages/mlkit-selfie-segmentation/package.json", + "main": "packages/mlkit-selfie-segmentation/index.ts", + "assets": [ + "packages/mlkit-selfie-segmentation/*.md", + "LICENSE", + { + "glob": "**/*", + "input": "packages/mlkit-selfie-segmentation/platforms/", + "output": "./platforms/" + } + ] + }, + "dependsOn": [ + { + "target": "build.all", + "projects": "dependencies" + } + ] + }, + "build.all": { + "executor": "@nrwl/workspace:run-commands", + "options": { + "commands": ["node tools/scripts/build-finish.ts mlkit-selfie-segmentation"], + "parallel": false + }, + "outputs": ["dist/packages/mlkit-selfie-segmentation"], + "dependsOn": [ + { + "target": "build.all", + "projects": "dependencies" + }, + { + "target": "build", + "projects": "self" + } + ] + }, + "focus": { + "executor": "@nrwl/workspace:run-commands", + "options": { + "commands": ["nx g @nativescript/plugin-tools:focus-packages mlkit-selfie-segmentation"], + "parallel": false + } + }, + "lint": { + "executor": "@nrwl/linter:eslint", + "options": { + "lintFilePatterns": ["packages/mlkit-selfie-segmentation/**/*.ts"] + } + } + } +} diff --git a/packages/mlkit-text-recognition/.eslintrc.json b/packages/mlkit-text-recognition/.eslintrc.json new file mode 100644 index 0000000..53c06c8 --- /dev/null +++ b/packages/mlkit-text-recognition/.eslintrc.json @@ -0,0 +1,18 @@ +{ + "extends": ["../../.eslintrc.json"], + "ignorePatterns": ["!**/*", "node_modules/**/*"], + "overrides": [ + { + "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], + "rules": {} + }, + { + "files": ["*.ts", "*.tsx"], + "rules": {} + }, + { + "files": ["*.js", "*.jsx"], + "rules": {} + } + ] +} diff --git a/packages/mlkit-text-recognition/README.md b/packages/mlkit-text-recognition/README.md index d60265e..9a3efad 100644 --- a/packages/mlkit-text-recognition/README.md +++ b/packages/mlkit-text-recognition/README.md @@ -1,13 +1,12 @@ # @nativescript/mlkit-text-recognition ```javascript -ns plugin add @nativescript/mlkit-text-recognition +npm install @nativescript/mlkit-text-recognition ``` ## Usage -// TODO - +See [@nativescript/mlkit-core](/packages/mlkit-core/README.md) Usage ## License Apache License Version 2.0 diff --git a/packages/mlkit-text-recognition/package.json b/packages/mlkit-text-recognition/package.json index 7d9a24b..e281c6a 100644 --- a/packages/mlkit-text-recognition/package.json +++ b/packages/mlkit-text-recognition/package.json @@ -1,6 +1,6 @@ { "name": "@nativescript/mlkit-text-recognition", - "version": "1.0.5", + "version": "1.0.6", "description": "NativeScript MLKit Text Recognition module", "main": "index", "typings": "index.d.ts", diff --git a/packages/mlkit-text-recognition/project.json b/packages/mlkit-text-recognition/project.json new file mode 100644 index 0000000..c58eed8 --- /dev/null +++ b/packages/mlkit-text-recognition/project.json @@ -0,0 +1,62 @@ +{ + "$schema": "../../node_modules/nx/schemas/project-schema.json", + "projectType": "library", + "sourceRoot": "packages/mlkit-text-recognition", + "targets": { + "build": { + "executor": "@nrwl/js:tsc", + "options": { + "outputPath": "dist/packages/mlkit-text-recognition", + "tsConfig": "packages/mlkit-text-recognition/tsconfig.json", + "packageJson": "packages/mlkit-text-recognition/package.json", + "main": "packages/mlkit-text-recognition/index.ts", + "assets": [ + "packages/mlkit-text-recognition/*.md", + "LICENSE", + { + "glob": "**/*", + "input": "packages/mlkit-text-recognition/platforms/", + "output": "./platforms/" + } + ] + }, + "dependsOn": [ + { + "target": "build.all", + "projects": "dependencies" + } + ] + }, + "build.all": { + "executor": "@nrwl/workspace:run-commands", + "options": { + "commands": ["node tools/scripts/build-finish.ts mlkit-text-recognition"], + "parallel": false + }, + "outputs": ["dist/packages/mlkit-text-recognition"], + "dependsOn": [ + { + "target": "build.all", + "projects": "dependencies" + }, + { + "target": "build", + "projects": "self" + } + ] + }, + "focus": { + "executor": "@nrwl/workspace:run-commands", + "options": { + "commands": ["nx g @nativescript/plugin-tools:focus-packages mlkit-text-recognition"], + "parallel": false + } + }, + "lint": { + "executor": "@nrwl/linter:eslint", + "options": { + "lintFilePatterns": ["packages/mlkit-text-recognition/**/*.ts"] + } + } + } +} diff --git a/tools/scripts/build-finish.ts b/tools/scripts/build-finish.ts index 3e7e7e2..0b9a19d 100644 --- a/tools/scripts/build-finish.ts +++ b/tools/scripts/build-finish.ts @@ -20,11 +20,12 @@ console.log(`Building ${npmPackageName}...${publish ? 'and publishing.' : ''}`); function buildAngular() { ngPackage .ngPackagr() - .forProject(path.join('packages', packageName, 'angular', 'package.json')) + .forProject(path.join('packages', packageName, 'angular', 'ng-package.json')) .withTsConfig(path.join('packages', packageName, 'angular', 'tsconfig.angular.json')) .build() .then(() => { - copyAngularDist(); + console.log(`${npmPackageName} angular built successfully.`); + finishPreparation(); }) .catch((error) => { console.error(error); diff --git a/tools/workspace-scripts.js b/tools/workspace-scripts.js index 0edba8e..f629cc9 100644 --- a/tools/workspace-scripts.js +++ b/tools/workspace-scripts.js @@ -1,185 +1,183 @@ -const npsUtils = require('nps-utils'); - module.exports = { - message: 'NativeScript Plugins ~ made with โค๏ธ Choose a command to start...', - pageSize: 32, - scripts: { - default: 'nps-i', - nx: { - script: 'nx', - description: 'Execute any command with the @nrwl/cli', - }, - format: { - script: 'nx format:write', - description: 'Format source code of the entire workspace (auto-run on precommit hook)', - }, - '๐Ÿ”ง': { - script: `npx cowsay "NativeScript plugin demos make developers ๐Ÿ˜Š"`, - description: '_____________ Apps to demo plugins with _____________', - }, - // demos - apps: { - '...Vanilla...': { - script: `npx cowsay "Nothing wrong with vanilla ๐Ÿฆ"`, - description: ` ๐Ÿ”ป Vanilla`, - }, - demo: { - clean: { - script: 'nx run demo:clean', - description: 'โš† Clean ๐Ÿงน', - }, - ios: { - script: 'nx run demo:ios', - description: 'โš† Run iOS ๏ฃฟ', - }, - android: { - script: 'nx run demo:android', - description: 'โš† Run Android ๐Ÿค–', - }, - }, - '...Angular...': { - script: `npx cowsay "Test all the Angles!"`, - description: ` ๐Ÿ”ป Angular`, - }, - 'demo-angular': { - clean: { - script: 'nx run demo-angular:clean', - description: 'โš† Clean ๐Ÿงน', - }, - ios: { - script: 'nx run demo-angular:ios', - description: 'โš† Run iOS ๏ฃฟ', - }, - android: { - script: 'nx run demo-angular:android', - description: 'โš† Run Android ๐Ÿค–', - }, - }, - }, - 'โš™๏ธ': { - script: `npx cowsay "@nativescript/* packages will keep your โš™๏ธ cranking"`, - description: '_____________ @nativescript/* _____________', - }, - // packages - // build output is always in dist/packages - '@nativescript': { - // @nativescript/mlkit-text-recognition - 'mlkit-text-recognition': { - build: { - script: 'nx run mlkit-text-recognition:build.all', - description: '@nativescript/mlkit-text-recognition: Build', - }, - }, - // @nativescript/mlkit-core - 'mlkit-core': { - build: { - script: 'nx run mlkit-core:build.all', - description: '@nativescript/mlkit-core: Build', - }, - }, - // @nativescript/mlkit-barcode-scanning - 'mlkit-barcode-scanning': { - build: { - script: 'nx run mlkit-barcode-scanning:build.all', - description: '@nativescript/mlkit-barcode-scanning: Build', - }, - }, - // @nativescript/mlkit-face-detection - 'mlkit-face-detection': { - build: { - script: 'nx run mlkit-face-detection:build.all', - description: '@nativescript/mlkit-face-detection: Build', - }, - }, - // @nativescript/mlkit-image-labeling - 'mlkit-image-labeling': { - build: { - script: 'nx run mlkit-image-labeling:build.all', - description: '@nativescript/mlkit-image-labeling: Build', - }, - }, - // @nativescript/mlkit-object-detection - 'mlkit-object-detection': { - build: { - script: 'nx run mlkit-object-detection:build.all', - description: '@nativescript/mlkit-object-detection: Build', - }, - }, - // @nativescript/mlkit-digital-ink-recognition - 'mlkit-digital-ink-recognition': { - build: { - script: 'nx run mlkit-digital-ink-recognition:build.all', - description: '@nativescript/mlkit-digital-ink-recognition: Build', - }, - }, - // @nativescript/mlkit-pose-detection - 'mlkit-pose-detection': { - build: { - script: 'nx run mlkit-pose-detection:build.all', - description: '@nativescript/mlkit-pose-detection: Build', - }, - }, - // @nativescript/mlkit-selfie-segmentation - 'mlkit-selfie-segmentation': { - build: { - script: 'nx run mlkit-selfie-segmentation:build.all', - description: '@nativescript/mlkit-selfie-segmentation: Build', - }, - }, - 'build-all': { - script: 'nx run all:build', - description: 'Build all packages', - }, - }, - 'โšก': { - script: `npx cowsay "Focus only on source you care about for efficiency โšก"`, - description: '_____________ Focus (VS Code supported) _____________', - }, - focus: { - 'mlkit-text-recognition': { - script: 'nx run mlkit-text-recognition:focus', - description: 'Focus on @nativescript/mlkit-text-recognition', - }, - 'mlkit-core': { - script: 'nx run mlkit-core:focus', - description: 'Focus on @nativescript/mlkit-core', - }, - 'mlkit-barcode-scanning': { - script: 'nx run mlkit-barcode-scanning:focus', - description: 'Focus on @nativescript/mlkit-barcode-scanning', - }, - 'mlkit-face-detection': { - script: 'nx run mlkit-face-detection:focus', - description: 'Focus on @nativescript/mlkit-face-detection', - }, - 'mlkit-image-labeling': { - script: 'nx run mlkit-image-labeling:focus', - description: 'Focus on @nativescript/mlkit-image-labeling', - }, - 'mlkit-object-detection': { - script: 'nx run mlkit-object-detection:focus', - description: 'Focus on @nativescript/mlkit-object-detection', - }, - 'mlkit-digital-ink-recognition': { - script: 'nx run mlkit-digital-ink-recognition:focus', - description: 'Focus on @nativescript/mlkit-digital-ink-recognition', - }, - 'mlkit-pose-detection': { - script: 'nx run mlkit-pose-detection:focus', - description: 'Focus on @nativescript/mlkit-pose-detection', - }, - 'mlkit-selfie-segmentation': { - script: 'nx run mlkit-selfie-segmentation:focus', - description: 'Focus on @nativescript/mlkit-selfie-segmentation', - }, - reset: { - script: 'nx run all:focus', - description: 'Reset Focus', - } - }, - '.....................': { - script: `npx cowsay "That's all for now folks ~"`, - description: '.....................', - }, - }, + message: 'NativeScript Plugins ~ made with โค๏ธ Choose a command to start...', + pageSize: 32, + scripts: { + default: 'nps-i', + nx: { + script: 'nx', + description: 'Execute any command with the @nrwl/cli', + }, + format: { + script: 'nx format:write', + description: 'Format source code of the entire workspace (auto-run on precommit hook)', + }, + '๐Ÿ”ง': { + script: `npx cowsay "NativeScript plugin demos make developers ๐Ÿ˜Š"`, + description: '_____________ Apps to demo plugins with _____________', + }, + // demos + apps: { + '...Vanilla...': { + script: `npx cowsay "Nothing wrong with vanilla ๐Ÿฆ"`, + description: ` ๐Ÿ”ป Vanilla`, + }, + demo: { + clean: { + script: 'nx run demo:clean', + description: 'โš† Clean ๐Ÿงน', + }, + ios: { + script: 'nx run demo:ios', + description: 'โš† Run iOS ๏ฃฟ', + }, + android: { + script: 'nx run demo:android', + description: 'โš† Run Android ๐Ÿค–', + }, + }, + '...Angular...': { + script: `npx cowsay "Test all the Angles!"`, + description: ` ๐Ÿ”ป Angular`, + }, + 'demo-angular': { + clean: { + script: 'nx run demo-angular:clean', + description: 'โš† Clean ๐Ÿงน', + }, + ios: { + script: 'nx run demo-angular:ios', + description: 'โš† Run iOS ๏ฃฟ', + }, + android: { + script: 'nx run demo-angular:android', + description: 'โš† Run Android ๐Ÿค–', + }, + }, + }, + 'โš™๏ธ': { + script: `npx cowsay "@nativescript/* packages will keep your โš™๏ธ cranking"`, + description: '_____________ @nativescript/* _____________', + }, + // packages + // build output is always in dist/packages + '@nativescript': { + // @nativescript/mlkit-text-recognition + 'mlkit-text-recognition': { + build: { + script: 'nx run mlkit-text-recognition:build.all', + description: '@nativescript/mlkit-text-recognition: Build', + }, + }, + // @nativescript/mlkit-core + 'mlkit-core': { + build: { + script: 'nx run mlkit-core:build.all', + description: '@nativescript/mlkit-core: Build', + }, + }, + // @nativescript/mlkit-barcode-scanning + 'mlkit-barcode-scanning': { + build: { + script: 'nx run mlkit-barcode-scanning:build.all', + description: '@nativescript/mlkit-barcode-scanning: Build', + }, + }, + // @nativescript/mlkit-face-detection + 'mlkit-face-detection': { + build: { + script: 'nx run mlkit-face-detection:build.all', + description: '@nativescript/mlkit-face-detection: Build', + }, + }, + // @nativescript/mlkit-image-labeling + 'mlkit-image-labeling': { + build: { + script: 'nx run mlkit-image-labeling:build.all', + description: '@nativescript/mlkit-image-labeling: Build', + }, + }, + // @nativescript/mlkit-object-detection + 'mlkit-object-detection': { + build: { + script: 'nx run mlkit-object-detection:build.all', + description: '@nativescript/mlkit-object-detection: Build', + }, + }, + // @nativescript/mlkit-digital-ink-recognition + 'mlkit-digital-ink-recognition': { + build: { + script: 'nx run mlkit-digital-ink-recognition:build.all', + description: '@nativescript/mlkit-digital-ink-recognition: Build', + }, + }, + // @nativescript/mlkit-pose-detection + 'mlkit-pose-detection': { + build: { + script: 'nx run mlkit-pose-detection:build.all', + description: '@nativescript/mlkit-pose-detection: Build', + }, + }, + // @nativescript/mlkit-selfie-segmentation + 'mlkit-selfie-segmentation': { + build: { + script: 'nx run mlkit-selfie-segmentation:build.all', + description: '@nativescript/mlkit-selfie-segmentation: Build', + }, + }, + 'build-all': { + script: 'nx run-many --target=build.all --all', + description: 'Build all packages', + }, + }, + 'โšก': { + script: `npx cowsay "Focus only on source you care about for efficiency โšก"`, + description: '_____________ Focus (VS Code supported) _____________', + }, + focus: { + 'mlkit-text-recognition': { + script: 'nx run mlkit-text-recognition:focus', + description: 'Focus on @nativescript/mlkit-text-recognition', + }, + 'mlkit-core': { + script: 'nx run mlkit-core:focus', + description: 'Focus on @nativescript/mlkit-core', + }, + 'mlkit-barcode-scanning': { + script: 'nx run mlkit-barcode-scanning:focus', + description: 'Focus on @nativescript/mlkit-barcode-scanning', + }, + 'mlkit-face-detection': { + script: 'nx run mlkit-face-detection:focus', + description: 'Focus on @nativescript/mlkit-face-detection', + }, + 'mlkit-image-labeling': { + script: 'nx run mlkit-image-labeling:focus', + description: 'Focus on @nativescript/mlkit-image-labeling', + }, + 'mlkit-object-detection': { + script: 'nx run mlkit-object-detection:focus', + description: 'Focus on @nativescript/mlkit-object-detection', + }, + 'mlkit-digital-ink-recognition': { + script: 'nx run mlkit-digital-ink-recognition:focus', + description: 'Focus on @nativescript/mlkit-digital-ink-recognition', + }, + 'mlkit-pose-detection': { + script: 'nx run mlkit-pose-detection:focus', + description: 'Focus on @nativescript/mlkit-pose-detection', + }, + 'mlkit-selfie-segmentation': { + script: 'nx run mlkit-selfie-segmentation:focus', + description: 'Focus on @nativescript/mlkit-selfie-segmentation', + }, + reset: { + script: 'nx g @nativescript/plugin-tools:focus-packages', + description: 'Reset Focus', + }, + }, + '.....................': { + script: `npx cowsay "That's all for now folks ~"`, + description: '.....................', + }, + }, }; diff --git a/tsconfig.base.json b/tsconfig.base.json index 889d49a..5a21bce 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -9,10 +9,7 @@ "noEmitHelpers": false, "target": "es2015", "module": "esnext", - "lib": [ - "es2017", - "dom" - ], + "lib": ["es2017", "dom"], "skipLibCheck": true, "skipDefaultLibCheck": true, "baseUrl": ".", @@ -23,16 +20,18 @@ } ], "paths": { - "@nativescript/*": [ - "packages/*" - ], - "@demo/shared": [ - "tools/demo/index.ts" - ] + "@demo/shared": ["tools/demo/index.ts"], + "@nativescript/mlkit-barcode-scanning": ["packages/mlkit-barcode-scanning/index.ts"], + "@nativescript/mlkit-core": ["packages/mlkit-core/index.d.ts"], + "@nativescript/mlkit-core/angular": ["packages/mlkit-core/angular/index.ts"], + "@nativescript/mlkit-digital-ink-recognition": ["packages/mlkit-digital-ink-recognition/index.ts"], + "@nativescript/mlkit-face-detection": ["packages/mlkit-face-detection/index.ts"], + "@nativescript/mlkit-image-labeling": ["packages/mlkit-image-labeling/index.ts"], + "@nativescript/mlkit-object-detection": ["packages/mlkit-object-detection/index.ts"], + "@nativescript/mlkit-pose-detection": ["packages/mlkit-pose-detection/index.ts"], + "@nativescript/mlkit-selfie-segmentation": ["packages/mlkit-selfie-segmentation/index.ts"], + "@nativescript/mlkit-text-recognition": ["packages/mlkit-text-recognition/index.ts"] } }, - "exclude": [ - "node_modules", - "tmp" - ] -} \ No newline at end of file + "exclude": ["node_modules", "tmp"] +} diff --git a/workspace.json b/workspace.json index e7e8984..69efe65 100644 --- a/workspace.json +++ b/workspace.json @@ -1,518 +1,17 @@ { "version": 2, "projects": { - "demo": { - "root": "apps/demo/", - "sourceRoot": "apps/demo/src", - "projectType": "application", - "prefix": "demo", - "targets": { - "build": { - "executor": "@nativescript/nx:build", - "options": { - "noHmr": true, - "production": true, - "uglify": true, - "release": true, - "forDevice": true - } - }, - "ios": { - "executor": "@nativescript/nx:build", - "options": { - "platform": "ios", - "noHmr": true - } - }, - "android": { - "executor": "@nativescript/nx:build", - "options": { - "platform": "android", - "noHmr": true - } - }, - "clean": { - "executor": "@nativescript/nx:build", - "options": { - "clean": true - } - } - } - }, - "demo-angular": { - "root": "apps/demo-angular/", - "sourceRoot": "apps/demo-angular/src", - "projectType": "application", - "prefix": "demo", - "targets": { - "build": { - "executor": "@nativescript/nx:build", - "options": { - "noHmr": true, - "production": true, - "uglify": true, - "release": true, - "forDevice": true - } - }, - "ios": { - "executor": "@nativescript/nx:build", - "options": { - "platform": "ios" - } - }, - "android": { - "executor": "@nativescript/nx:build", - "options": { - "platform": "android" - } - }, - "clean": { - "executor": "@nativescript/nx:build", - "options": { - "clean": true - } - } - } - }, - "all": { - "root": "", - "projectType": "application", - "targets": { - "build": { - "executor": "@nrwl/workspace:run-commands", - "outputs": [ - "dist/packages" - ], - "options": { - "commands": [ - "nx run mlkit-text-recognition:build.all", - "nx run mlkit-core:build.all", - "nx run mlkit-barcode-scanning:build.all", - "nx run mlkit-face-detection:build.all", - "nx run mlkit-image-labeling:build.all", - "nx run mlkit-object-detection:build.all", - "nx run mlkit-digital-ink-recognition:build.all", - "nx run mlkit-pose-detection:build.all", - "nx run mlkit-selfie-segmentation:build.all" - ], - "parallel": false - } - }, - "focus": { - "outputs": [ - "dist/packages" - ], - "options": { - "commands": [ - "nx g @nativescript/plugin-tools:focus-packages" - ], - "parallel": false - }, - "executor": "@nrwl/workspace:run-commands" - } - }, - "sourceRoot": "" - }, - "mlkit-text-recognition": { - "root": "packages/mlkit-text-recognition", - "projectType": "library", - "sourceRoot": "packages/mlkit-text-recognition", - "targets": { - "build": { - "executor": "@nrwl/node:package", - "options": { - "outputPath": "dist/packages/mlkit-text-recognition", - "tsConfig": "packages/mlkit-text-recognition/tsconfig.json", - "packageJson": "packages/mlkit-text-recognition/package.json", - "main": "packages/mlkit-text-recognition/index.ts", - "assets": [ - "packages/mlkit-text-recognition/*.md", - "LICENSE", - { - "glob": "**/*", - "input": "packages/mlkit-text-recognition/platforms/", - "output": "./platforms/" - } - ] - } - }, - "build.all": { - "executor": "@nrwl/workspace:run-commands", - "options": { - "commands": [ - "nx run mlkit-text-recognition:build", - "node tools/scripts/build-finish.ts mlkit-text-recognition" - ], - "parallel": false - } - }, - "focus": { - "executor": "@nrwl/workspace:run-commands", - "options": { - "commands": [ - "nx g @nativescript/plugin-tools:focus-packages mlkit-text-recognition" - ], - "parallel": false - } - } - } - }, - "mlkit-core": { - "root": "packages/mlkit-core", - "projectType": "library", - "sourceRoot": "packages/mlkit-core", - "targets": { - "build": { - "executor": "@nrwl/node:package", - "options": { - "outputPath": "dist/packages/mlkit-core", - "tsConfig": "packages/mlkit-core/tsconfig.json", - "packageJson": "packages/mlkit-core/package.json", - "main": "packages/mlkit-core/index.d.ts", - "assets": [ - "packages/mlkit-core/*.md", - "packages/mlkit-core/index.d.ts", - "LICENSE", - { - "glob": "**/*", - "input": "packages/mlkit-core/platforms/", - "output": "./platforms/" - } - ] - } - }, - "build.all": { - "executor": "@nrwl/workspace:run-commands", - "options": { - "commands": [ - "nx run mlkit-core:build", - "node tools/scripts/build-finish.ts mlkit-core" - ], - "parallel": false - } - }, - "focus": { - "executor": "@nrwl/workspace:run-commands", - "options": { - "commands": [ - "nx g @nativescript/plugin-tools:focus-packages mlkit-core" - ], - "parallel": false - } - } - } - }, - "mlkit-barcode-scanning": { - "root": "packages/mlkit-barcode-scanning", - "projectType": "library", - "sourceRoot": "packages/mlkit-barcode-scanning", - "targets": { - "build": { - "executor": "@nrwl/node:package", - "options": { - "outputPath": "dist/packages/mlkit-barcode-scanning", - "tsConfig": "packages/mlkit-barcode-scanning/tsconfig.json", - "packageJson": "packages/mlkit-barcode-scanning/package.json", - "main": "packages/mlkit-barcode-scanning/index.ts", - "assets": [ - "packages/mlkit-barcode-scanning/*.md", - "LICENSE", - { - "glob": "**/*", - "input": "packages/mlkit-barcode-scanning/platforms/", - "output": "./platforms/" - } - ] - } - }, - "build.all": { - "executor": "@nrwl/workspace:run-commands", - "options": { - "commands": [ - "nx run mlkit-barcode-scanning:build", - "node tools/scripts/build-finish.ts mlkit-barcode-scanning" - ], - "parallel": false - } - }, - "focus": { - "executor": "@nrwl/workspace:run-commands", - "options": { - "commands": [ - "nx g @nativescript/plugin-tools:focus-packages mlkit-barcode-scanning" - ], - "parallel": false - } - } - } - }, - "mlkit-face-detection": { - "root": "packages/mlkit-face-detection", - "projectType": "library", - "sourceRoot": "packages/mlkit-face-detection", - "targets": { - "build": { - "executor": "@nrwl/node:package", - "options": { - "outputPath": "dist/packages/mlkit-face-detection", - "tsConfig": "packages/mlkit-face-detection/tsconfig.json", - "packageJson": "packages/mlkit-face-detection/package.json", - "main": "packages/mlkit-face-detection/index.ts", - "assets": [ - "packages/mlkit-face-detection/*.md", - "LICENSE", - { - "glob": "**/*", - "input": "packages/mlkit-face-detection/platforms/", - "output": "./platforms/" - } - ] - } - }, - "build.all": { - "executor": "@nrwl/workspace:run-commands", - "options": { - "commands": [ - "nx run mlkit-face-detection:build", - "node tools/scripts/build-finish.ts mlkit-face-detection" - ], - "parallel": false - } - }, - "focus": { - "executor": "@nrwl/workspace:run-commands", - "options": { - "commands": [ - "nx g @nativescript/plugin-tools:focus-packages mlkit-face-detection" - ], - "parallel": false - } - } - } - }, - "mlkit-image-labeling": { - "root": "packages/mlkit-image-labeling", - "projectType": "library", - "sourceRoot": "packages/mlkit-image-labeling", - "targets": { - "build": { - "executor": "@nrwl/node:package", - "options": { - "outputPath": "dist/packages/mlkit-image-labeling", - "tsConfig": "packages/mlkit-image-labeling/tsconfig.json", - "packageJson": "packages/mlkit-image-labeling/package.json", - "main": "packages/mlkit-image-labeling/index.ts", - "assets": [ - "packages/mlkit-image-labeling/*.md", - "LICENSE", - { - "glob": "**/*", - "input": "packages/mlkit-image-labeling/platforms/", - "output": "./platforms/" - } - ] - } - }, - "build.all": { - "executor": "@nrwl/workspace:run-commands", - "options": { - "commands": [ - "nx run mlkit-image-labeling:build", - "node tools/scripts/build-finish.ts mlkit-image-labeling" - ], - "parallel": false - } - }, - "focus": { - "executor": "@nrwl/workspace:run-commands", - "options": { - "commands": [ - "nx g @nativescript/plugin-tools:focus-packages mlkit-image-labeling" - ], - "parallel": false - } - } - } - }, - "mlkit-object-detection": { - "root": "packages/mlkit-object-detection", - "projectType": "library", - "sourceRoot": "packages/mlkit-object-detection", - "targets": { - "build": { - "executor": "@nrwl/node:package", - "options": { - "outputPath": "dist/packages/mlkit-object-detection", - "tsConfig": "packages/mlkit-object-detection/tsconfig.json", - "packageJson": "packages/mlkit-object-detection/package.json", - "main": "packages/mlkit-object-detection/index.ts", - "assets": [ - "packages/mlkit-object-detection/*.md", - "LICENSE", - { - "glob": "**/*", - "input": "packages/mlkit-object-detection/platforms/", - "output": "./platforms/" - } - ] - } - }, - "build.all": { - "executor": "@nrwl/workspace:run-commands", - "options": { - "commands": [ - "nx run mlkit-object-detection:build", - "node tools/scripts/build-finish.ts mlkit-object-detection" - ], - "parallel": false - } - }, - "focus": { - "executor": "@nrwl/workspace:run-commands", - "options": { - "commands": [ - "nx g @nativescript/plugin-tools:focus-packages mlkit-object-detection" - ], - "parallel": false - } - } - } - }, - "mlkit-digital-ink-recognition": { - "root": "packages/mlkit-digital-ink-recognition", - "projectType": "library", - "sourceRoot": "packages/mlkit-digital-ink-recognition", - "targets": { - "build": { - "executor": "@nrwl/node:package", - "options": { - "outputPath": "dist/packages/mlkit-digital-ink-recognition", - "tsConfig": "packages/mlkit-digital-ink-recognition/tsconfig.json", - "packageJson": "packages/mlkit-digital-ink-recognition/package.json", - "main": "packages/mlkit-digital-ink-recognition/index.ts", - "assets": [ - "packages/mlkit-digital-ink-recognition/*.md", - "LICENSE", - { - "glob": "**/*", - "input": "packages/mlkit-digital-ink-recognition/platforms/", - "output": "./platforms/" - } - ] - } - }, - "build.all": { - "executor": "@nrwl/workspace:run-commands", - "options": { - "commands": [ - "nx run mlkit-digital-ink-recognition:build", - "node tools/scripts/build-finish.ts mlkit-digital-ink-recognition" - ], - "parallel": false - } - }, - "focus": { - "executor": "@nrwl/workspace:run-commands", - "options": { - "commands": [ - "nx g @nativescript/plugin-tools:focus-packages mlkit-digital-ink-recognition" - ], - "parallel": false - } - } - } - }, - "mlkit-pose-detection": { - "root": "packages/mlkit-pose-detection", - "projectType": "library", - "sourceRoot": "packages/mlkit-pose-detection", - "targets": { - "build": { - "executor": "@nrwl/node:package", - "options": { - "outputPath": "dist/packages/mlkit-pose-detection", - "tsConfig": "packages/mlkit-pose-detection/tsconfig.json", - "packageJson": "packages/mlkit-pose-detection/package.json", - "main": "packages/mlkit-pose-detection/index.ts", - "assets": [ - "packages/mlkit-pose-detection/*.md", - "LICENSE", - { - "glob": "**/*", - "input": "packages/mlkit-pose-detection/platforms/", - "output": "./platforms/" - } - ] - } - }, - "build.all": { - "executor": "@nrwl/workspace:run-commands", - "options": { - "commands": [ - "nx run mlkit-pose-detection:build", - "node tools/scripts/build-finish.ts mlkit-pose-detection" - ], - "parallel": false - } - }, - "focus": { - "executor": "@nrwl/workspace:run-commands", - "options": { - "commands": [ - "nx g @nativescript/plugin-tools:focus-packages mlkit-pose-detection" - ], - "parallel": false - } - } - } - }, - "mlkit-selfie-segmentation": { - "root": "packages/mlkit-selfie-segmentation", - "projectType": "library", - "sourceRoot": "packages/mlkit-selfie-segmentation", - "targets": { - "build": { - "executor": "@nrwl/node:package", - "options": { - "outputPath": "dist/packages/mlkit-selfie-segmentation", - "tsConfig": "packages/mlkit-selfie-segmentation/tsconfig.json", - "packageJson": "packages/mlkit-selfie-segmentation/package.json", - "main": "packages/mlkit-selfie-segmentation/index.ts", - "assets": [ - "packages/mlkit-selfie-segmentation/*.md", - "LICENSE", - { - "glob": "**/*", - "input": "packages/mlkit-selfie-segmentation/platforms/", - "output": "./platforms/" - } - ] - } - }, - "build.all": { - "executor": "@nrwl/workspace:run-commands", - "options": { - "commands": [ - "nx run mlkit-selfie-segmentation:build", - "node tools/scripts/build-finish.ts mlkit-selfie-segmentation" - ], - "parallel": false - } - }, - "focus": { - "executor": "@nrwl/workspace:run-commands", - "options": { - "commands": [ - "nx g @nativescript/plugin-tools:focus-packages mlkit-selfie-segmentation" - ], - "parallel": false - } - } - } - } + "demo": "apps/demo", + "demo-angular": "apps/demo-angular", + "mlkit-barcode-scanning": "packages/mlkit-barcode-scanning", + "mlkit-core": "packages/mlkit-core", + "mlkit-digital-ink-recognition": "packages/mlkit-digital-ink-recognition", + "mlkit-face-detection": "packages/mlkit-face-detection", + "mlkit-image-labeling": "packages/mlkit-image-labeling", + "mlkit-object-detection": "packages/mlkit-object-detection", + "mlkit-pose-detection": "packages/mlkit-pose-detection", + "mlkit-selfie-segmentation": "packages/mlkit-selfie-segmentation", + "mlkit-text-recognition": "packages/mlkit-text-recognition" }, - "cli": { - "defaultCollection": "@nrwl/workspace" - } + "$schema": "./node_modules/nx/schemas/workspace-schema.json" } pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy