diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index 3856c8cdb..000000000 --- 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 000000000..5b7d00967 --- /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/.nxignore b/.nxignore new file mode 100644 index 000000000..80a8f0e48 --- /dev/null +++ b/.nxignore @@ -0,0 +1 @@ +apps/**/*_off \ No newline at end of file diff --git a/apps/demo-angular/.eslintrc.json b/apps/demo-angular/.eslintrc.json new file mode 100644 index 000000000..be41074b7 --- /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 eda50a020..b0e6e05bd 100644 --- a/apps/demo-angular/package.json +++ b/apps/demo-angular/package.json @@ -1,19 +1,19 @@ { - "main": "./src/main.ts", - "dependencies": { - "@nativescript/canvas": "file:../../dist/packages/canvas", - "@nativescript/canvas-babylon": "file:../../dist/packages/canvas-babylon", - "@nativescript/canvas-media": "file:../../dist/packages/canvas-media", - "@nativescript/canvas-phaser": "file:../../dist/packages/canvas-phaser", - "@nativescript/canvas-phaser-ce": "file:../../dist/packages/canvas-phaser-ce", - "@nativescript/canvas-pixi": "file:../../dist/packages/canvas-pixi", - "@nativescript/canvas-polyfill": "file:../../dist/packages/canvas-polyfill", - "@nativescript/canvas-three": "file:../../dist/packages/canvas-three", - "@nativescript/core": "file:../../node_modules/@nativescript/core", - "three": "file:../../node_modules/three" - }, - "devDependencies": { - "@nativescript/android": "8.2.0-alpha.2", - "@nativescript/ios": "8.0.0" - } + "main": "./src/main.ts", + "dependencies": { + "@nativescript/canvas": "file:../../dist/packages/canvas", + "@nativescript/canvas-babylon": "file:../../dist/packages/canvas-babylon", + "@nativescript/canvas-media": "file:../../dist/packages/canvas-media", + "@nativescript/canvas-phaser": "file:../../dist/packages/canvas-phaser", + "@nativescript/canvas-phaser-ce": "file:../../dist/packages/canvas-phaser-ce", + "@nativescript/canvas-pixi": "file:../../dist/packages/canvas-pixi", + "@nativescript/canvas-polyfill": "file:../../dist/packages/canvas-polyfill", + "@nativescript/canvas-three": "file:../../dist/packages/canvas-three", + "@nativescript/core": "file:../../node_modules/@nativescript/core", + "three": "file:../../node_modules/three" + }, + "devDependencies": { + "@nativescript/android": "~8.2.0", + "@nativescript/ios": "~8.2.0" + } } diff --git a/apps/demo-angular/project.json b/apps/demo-angular/project.json new file mode 100644 index 000000000..d87b757a6 --- /dev/null +++ b/apps/demo-angular/project.json @@ -0,0 +1,62 @@ +{ + "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 + }, + "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-angular/**/*.ts"] + } + } + } +} diff --git a/apps/demo-angular/tsconfig.json b/apps/demo-angular/tsconfig.json index e3e8d80e6..a708d9bac 100644 --- a/apps/demo-angular/tsconfig.json +++ b/apps/demo-angular/tsconfig.json @@ -1,26 +1,20 @@ { - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "rootDirs": [ - ".", - "../.." - ], - "baseUrl": ".", - "paths": { - "~/*": [ - "src/*" - ], - "@nativescript/*": [ - "../../dist/packages/*" - ], - "@demo/shared": [ - "../../tools/demo/index.ts" - ] - } - }, - "files": [ - "./references.d.ts", - "./src/main.ts", - "./src/polyfills.ts" - ] -} \ No newline at end of file + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "paths": { + "~/*": ["src/*"], + "@demo/shared": ["tools/demo/index.ts"], + "@nativescript/canvas": ["packages/canvas/index.ts"], + "@nativescript/canvas/angular": ["packages/canvas/angular/index.ts"], + "@nativescript/canvas-babylon": ["packages/canvas-babylon/index.ts"], + "@nativescript/canvas-polyfill": ["packages/canvas-polyfill/index.ts"], + "@nativescript/canvas-phaser": ["packages/canvas-phaser/index.ts"], + "@nativescript/canvas-phaser-ce": ["packages/canvas-phaser-ce/index.ts"], + "@nativescript/canvas-pixi": ["packages/canvas-pixi/index.ts"], + "@nativescript/canvas-three": ["packages/canvas-three/index.ts"], + "@nativescript/canvas-media": ["packages/canvas-media/index.ts"] + } + }, + "files": ["./references.d.ts", "./src/main.ts", "./src/polyfills.ts"], + "include": ["../../packages/**/references.d.ts"] +} diff --git a/apps/demo-vue/.eslintrc.json b/apps/demo-vue/.eslintrc.json new file mode 100644 index 000000000..be41074b7 --- /dev/null +++ b/apps/demo-vue/.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-vue/package.json b/apps/demo-vue/package.json index b045095ec..691257fba 100644 --- a/apps/demo-vue/package.json +++ b/apps/demo-vue/package.json @@ -1,19 +1,19 @@ { - "main": "./app/app.ts", - "dependencies": { - "nativescript-vue": "file:../../node_modules/nativescript-vue", - "@nativescript/core": "file:../../node_modules/@nativescript/core", - "@nativescript/canvas-media": "file:../../packages/canvas-media", - "@nativescript/canvas": "file:../../packages/canvas", - "@nativescript/canvas-babylon": "file:../../packages/canvas-babylon", - "@nativescript/canvas-phaser": "file:../../packages/canvas-phaser", - "@nativescript/canvas-phaser-ce": "file:../../packages/canvas-phaser-ce", - "@nativescript/canvas-pixi": "file:../../packages/canvas-pixi", - "@nativescript/canvas-polyfill": "file:../../packages/canvas-polyfill", - "@nativescript/canvas-three": "file:../../packages/canvas-three" - }, - "devDependencies": { - "@nativescript/android": "8.0.0", - "@nativescript/ios": "8.0.0" - } -} \ No newline at end of file + "main": "./app/app.ts", + "dependencies": { + "nativescript-vue": "file:../../node_modules/nativescript-vue", + "@nativescript/core": "file:../../node_modules/@nativescript/core", + "@nativescript/canvas-media": "file:../../packages/canvas-media", + "@nativescript/canvas": "file:../../packages/canvas", + "@nativescript/canvas-babylon": "file:../../packages/canvas-babylon", + "@nativescript/canvas-phaser": "file:../../packages/canvas-phaser", + "@nativescript/canvas-phaser-ce": "file:../../packages/canvas-phaser-ce", + "@nativescript/canvas-pixi": "file:../../packages/canvas-pixi", + "@nativescript/canvas-polyfill": "file:../../packages/canvas-polyfill", + "@nativescript/canvas-three": "file:../../packages/canvas-three" + }, + "devDependencies": { + "@nativescript/android": "~8.2.0", + "@nativescript/ios": "~8.2.0" + } +} diff --git a/apps/demo-vue/project.json b/apps/demo-vue/project.json new file mode 100644 index 000000000..2d4711862 --- /dev/null +++ b/apps/demo-vue/project.json @@ -0,0 +1,60 @@ +{ + "root": "apps/demo-vue/", + "sourceRoot": "apps/demo-vue/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-vue/**/*.ts"] + } + } + } +} diff --git a/apps/demo/.eslintrc.json b/apps/demo/.eslintrc.json new file mode 100644 index 000000000..be41074b7 --- /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 24d740057..247507c97 100644 --- a/apps/demo/package.json +++ b/apps/demo/package.json @@ -1,34 +1,34 @@ { - "main": "./src/app.ts", - "description": "NativeScript Application", - "license": "SEE LICENSE IN ", - "repository": "", - "dependencies": { - "@nativescript/canvas": "file:../../packages/canvas", - "@nativescript/canvas-babylon": "file:../../packages/canvas-babylon", - "@nativescript/canvas-media": "file:../../packages/canvas-media", - "@nativescript/canvas-phaser": "file:../../packages/canvas-phaser", - "@nativescript/canvas-phaser-ce": "file:../../packages/canvas-phaser-ce", - "@nativescript/canvas-pixi": "file:../../packages/canvas-pixi", - "@nativescript/canvas-polyfill": "file:../../packages/canvas-polyfill", - "@nativescript/canvas-three": "file:../../packages/canvas-three", - "@nativescript/core": "file:../../node_modules/@nativescript/core", - "@nativescript/webpack": "^5.0.0", - "babylonjs": "file:../../node_modules/babylonjs", - "babylonjs-materials": "file:../../node_modules/babylonjs-materials", - "chart.js": "file:../../node_modules/chart.js", - "d3": "file:../../node_modules/d3", - "leaflet": "file:../../node_modules/leaflet", - "matter-js": "file:../../node_modules/matter-js", - "phaser": "file:../../node_modules/phaser", - "phaser-ce": "file:../../node_modules/phaser-ce", - "pixi.js": "file:../../node_modules/pixi.js", - "three": "file:../../node_modules/three", - "vexflow": "file:../../node_modules/vexflow", - "zen-3d": "file:../../node_modules/zen-3d" - }, - "devDependencies": { - "@nativescript/android": "8.2.0", - "@nativescript/ios": "8.2.0" - } + "main": "./src/app.ts", + "description": "NativeScript Application", + "license": "SEE LICENSE IN ", + "repository": "", + "dependencies": { + "@nativescript/canvas": "file:../../packages/canvas", + "@nativescript/canvas-babylon": "file:../../packages/canvas-babylon", + "@nativescript/canvas-media": "file:../../packages/canvas-media", + "@nativescript/canvas-phaser": "file:../../packages/canvas-phaser", + "@nativescript/canvas-phaser-ce": "file:../../packages/canvas-phaser-ce", + "@nativescript/canvas-pixi": "file:../../packages/canvas-pixi", + "@nativescript/canvas-polyfill": "file:../../packages/canvas-polyfill", + "@nativescript/canvas-three": "file:../../packages/canvas-three", + "@nativescript/core": "file:../../node_modules/@nativescript/core", + "@nativescript/webpack": "^5.0.0", + "babylonjs": "file:../../node_modules/babylonjs", + "babylonjs-materials": "file:../../node_modules/babylonjs-materials", + "chart.js": "file:../../node_modules/chart.js", + "d3": "file:../../node_modules/d3", + "leaflet": "file:../../node_modules/leaflet", + "matter-js": "file:../../node_modules/matter-js", + "phaser": "file:../../node_modules/phaser", + "phaser-ce": "file:../../node_modules/phaser-ce", + "pixi.js": "file:../../node_modules/pixi.js", + "three": "file:../../node_modules/three", + "vexflow": "file:../../node_modules/vexflow", + "zen-3d": "file:../../node_modules/zen-3d" + }, + "devDependencies": { + "@nativescript/android": "~8.2.0", + "@nativescript/ios": "~8.2.0" + } } diff --git a/apps/demo/project.json b/apps/demo/project.json new file mode 100644 index 000000000..ec38960ef --- /dev/null +++ b/apps/demo/project.json @@ -0,0 +1,62 @@ +{ + "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 + }, + "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 883134e94..2c1abc40c 100644 --- a/apps/demo/tsconfig.json +++ b/apps/demo/tsconfig.json @@ -5,8 +5,16 @@ "baseUrl": ".", "paths": { "~/*": ["src/*"], - "@nativescript/*": ["../../packages/*"], - "@demo/shared": ["../../tools/demo/index.ts"] + "@demo/shared": ["../../tools/demo/index.ts"], + "@nativescript/canvas": ["../../packages/canvas/index.ts"], + "@nativescript/canvas/angular": ["../../packages/canvas/angular/index.ts"], + "@nativescript/canvas-babylon": ["../../packages/canvas-babylon/index.ts"], + "@nativescript/canvas-polyfill": ["../../packages/canvas-polyfill/index.ts"], + "@nativescript/canvas-phaser": ["../../packages/canvas-phaser/index.ts"], + "@nativescript/canvas-phaser-ce": ["../../packages/canvas-phaser-ce/index.ts"], + "@nativescript/canvas-pixi": ["../../packages/canvas-pixi/index.ts"], + "@nativescript/canvas-three": ["../../packages/canvas-three/index.ts"], + "@nativescript/canvas-media": ["../../packages/canvas-media/index.ts"] } } } diff --git a/migrations.json b/migrations.json new file mode 100644 index 000000000..4d0b47e44 --- /dev/null +++ b/migrations.json @@ -0,0 +1,20 @@ +{ + "migrations": [ + { + "cli": "nx", + "version": "2.2.1", + "description": "Migrate tools to 2.2.1", + "implementation": "./src/migrations/update-2-2-1/update-2-2-1", + "package": "@nativescript/plugin-tools", + "name": "update-to-2.2.1" + }, + { + "cli": "nx", + "version": "3.0.0", + "description": "Migrate tools to 3.0.0", + "implementation": "./src/migrations/update-3-0-0/update-3-0-0", + "package": "@nativescript/plugin-tools", + "name": "update-to-3.0.0" + } + ] +} diff --git a/nx.json b/nx.json index b0fe65356..f64600dfe 100644 --- a/nx.json +++ b/nx.json @@ -13,46 +13,20 @@ "tslint.json": "*", "nx.json": "*" }, - "projects": { - "demo": { - "tags": [] - }, - "demo-angular": { - "tags": [] - }, - "demo-vue": { - "tags": [] - }, - "all": { - "tags": [] - }, - "canvas": { - "tags": [] - }, - "canvas-babylon": { - "tags": [] - }, - "canvas-polyfill": { - "tags": [] - }, - "canvas-phaser": { - "tags": [] - }, - "canvas-phaser-ce": { - "tags": [] - }, - "canvas-pixi": { - "tags": [] - }, - "canvas-three": { - "tags": [] - }, - "canvas-media": { - "tags": [] - } - }, "workspaceLayout": { "appsDir": "apps", "libsDir": "packages" + }, + "tasksRunnerOptions": { + "default": { + "runner": "@nrwl/workspace/tasks-runners/default", + "options": { + "cacheableOperations": ["build", "build.all", "lint", "test", "e2e"], + "runtimeCacheInputs": ["node -v"] + } + } + }, + "cli": { + "defaultCollection": "@nrwl/workspace" } } diff --git a/package.json b/package.json index c42515f88..ddef3b64e 100644 --- a/package.json +++ b/package.json @@ -1,76 +1,77 @@ { - "name": "canvas", - "version": "0.0.0", - "license": "MIT", - "scripts": { - "setup": "npx rimraf node_modules package-lock.json dist tmp yarn.lock && yarn config set ignore-engines true && ns package-manager set npm && yarn", - "start": "nps", - "add": "nx g @nativescript/plugin-tools:add-package", - "add-angular": "nx g @nativescript/plugin-tools:add-angular", - "config": "nx g @nativescript/plugin-tools:config", - "publish-packages": "nx g @nativescript/plugin-tools:publish", - "sync-packages-with-demos": "nx g @nativescript/plugin-tools:sync-packages-with-demos", - "postinstall": "husky install && npx ts-patch install", - "remove-package": "nx g @nativescript/plugin-tools:remove-package", - "add-demo": "nx g @nativescript/plugin-tools:add-demo", - "build.canvas.android.release": "nx run canvas:build.native.android.release", - "build.canvas.android.debug": "nx run canvas:build.native.android.debug", - "build.canvas.ios.release": "nx run canvas:build.native.ios.release", - "build.canvas.ios.debug": "nx run canvas:build.native.ios.debug", - "build.canvas.ios.framework.release": "nx run canvas:build.native.ios.framework.release", - "build.canvas.ios.framework.debug": "nx run canvas:build.native.ios.framework.debug" - }, - "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.1.0", - "@nativescript/plugin-tools": "2.1.0", - "@nativescript/types": "^8.0.0", - "@nativescript/webpack": "~5.0.0", - "@ngtools/webpack": "^12.0.0", - "babylonjs": "^4.1.0", - "babylonjs-materials": "^4.1.0", - "canvg": "^3.0.6", - "chart.js": "^2.9.3", - "d3": "^6.1.1", - "dotenv": "~8.2.0", - "eslint": "~7.4.0", - "eslint-config-prettier": "~6.11.0", - "husky": "^5.1.3", - "leaflet": "^1.7.1", - "matter-js": "^0.14.2", - "nativescript-permissions": "^1.3.9", - "nativescript-theme-core": "~1.0.4", - "nativescript-vue": "~2.9.0", - "nativescript-vue-template-compiler": "~2.9.0", - "ng-packagr": "^12.0.0", - "phaser": "^3.24.1", - "phaser-ce": "^2.15.0", - "pixi.js": "^5.3.3", - "playcanvas": "^1.37.0", - "react-nativescript": "^2.0.0", - "rimraf": "^3.0.2", - "rxjs": "~6.6.0", - "svelte-native": "^0.9.3", - "three": "^0.133.1", - "typescript": "~4.3.0", - "vexflow": "^3.0.9", - "xmldom": "~0.6.0", - "zen-3d": "0.0.3", - "zone.js": "~0.11.1" - }, - "lint-staged": { - "**/*.{js,ts,scss,json,html}": [ - "npx prettier --write" - ] - } + "name": "canvas", + "version": "0.0.0", + "license": "MIT", + "scripts": { + "setup": "npx rimraf node_modules package-lock.json dist tmp yarn.lock && yarn config set ignore-engines true && ns package-manager set npm && yarn", + "start": "nps", + "add": "nx g @nativescript/plugin-tools:add-package", + "add-angular": "nx g @nativescript/plugin-tools:add-angular", + "config": "nx g @nativescript/plugin-tools:config", + "publish-packages": "nx g @nativescript/plugin-tools:publish", + "sync-packages-with-demos": "nx g @nativescript/plugin-tools:sync-packages-with-demos", + "postinstall": "husky install && npx ts-patch install", + "remove-package": "nx g @nativescript/plugin-tools:remove-package", + "add-demo": "nx g @nativescript/plugin-tools:add-demo", + "build.canvas.android.release": "nx run canvas:build.native.android.release", + "build.canvas.android.debug": "nx run canvas:build.native.android.debug", + "build.canvas.ios.release": "nx run canvas:build.native.ios.release", + "build.canvas.ios.debug": "nx run canvas:build.native.ios.debug", + "build.canvas.ios.framework.release": "nx run canvas:build.native.ios.framework.release", + "build.canvas.ios.framework.debug": "nx run canvas:build.native.ios.framework.debug" + }, + "private": true, + "devDependencies": { + "@angular/animations": "^13.2.0", + "@angular/common": "^13.2.0", + "@angular/compiler": "^13.2.0", + "@angular/compiler-cli": "^13.2.0", + "@angular/core": "^13.2.0", + "@angular/forms": "^13.2.0", + "@angular/platform-browser": "^13.2.0", + "@angular/platform-browser-dynamic": "^13.2.0", + "@angular/router": "^13.2.0", + "@nativescript/angular": "^13.0.0", + "@nativescript/core": "~8.2.0", + "@nativescript/plugin-tools": "3.0.2", + "@nativescript/types": "~8.2.0", + "@nativescript/webpack": "~5.0.5", + "@ngtools/webpack": "^13.0.0", + "babylonjs": "^4.1.0", + "babylonjs-materials": "^4.1.0", + "canvg": "^3.0.6", + "chart.js": "^2.9.3", + "d3": "^6.1.1", + "dotenv": "~8.2.0", + "eslint": "~7.4.0", + "eslint-config-prettier": "~6.11.0", + "husky": "^7.0.0", + "leaflet": "^1.7.1", + "matter-js": "^0.14.2", + "nativescript-permissions": "1.3.11", + "nativescript-theme-core": "~1.0.4", + "nativescript-vue": "~2.9.0", + "nativescript-vue-template-compiler": "~2.9.0", + "ng-packagr": "^13.2.0", + "phaser": "^3.24.1", + "phaser-ce": "^2.15.0", + "pixi.js": "^5.3.3", + "playcanvas": "^1.37.0", + "react-nativescript": "^2.0.0", + "rimraf": "^3.0.2", + "rxjs": "~7.5.0", + "svelte-native": "^0.9.3", + "three": "^0.133.1", + "typescript": "~4.5.5", + "vexflow": "^3.0.9", + "xmldom": "~0.6.0", + "zen-3d": "0.0.3", + "zone.js": "~0.11.1", + "@angular-devkit/build-angular": "^13.2.0" + }, + "lint-staged": { + "**/*.{js,ts,scss,json,html}": [ + "npx prettier --write" + ] + } } diff --git a/packages/canvas-babylon/.eslintrc.json b/packages/canvas-babylon/.eslintrc.json new file mode 100644 index 000000000..be41074b7 --- /dev/null +++ b/packages/canvas-babylon/.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/canvas-babylon/project.json b/packages/canvas-babylon/project.json new file mode 100644 index 000000000..d78e10fb6 --- /dev/null +++ b/packages/canvas-babylon/project.json @@ -0,0 +1,64 @@ +{ + "root": "packages/canvas-babylon", + "sourceRoot": "packages/canvas-babylon", + "projectType": "library", + "generators": {}, + "targets": { + "build": { + "options": { + "outputPath": "dist/packages/canvas-babylon", + "tsConfig": "packages/canvas-babylon/tsconfig.json", + "packageJson": "packages/canvas-babylon/package.json", + "main": "packages/canvas-babylon/index.ts", + "assets": [ + "packages/canvas-babylon/*.md", + "packages/canvas-babylon/index.d.ts", + "LICENSE", + { + "glob": "**/*", + "input": "packages/canvas-babylon/platforms/", + "output": "./platforms/" + } + ] + }, + "executor": "@nrwl/js:tsc", + "dependsOn": [ + { + "target": "build.all", + "projects": "dependencies" + } + ] + }, + "build.all": { + "outputs": ["dist/packages/canvas-babylon"], + "options": { + "commands": ["node tools/scripts/build-finish.ts canvas-babylon"], + "parallel": false + }, + "executor": "@nrwl/workspace:run-commands", + "dependsOn": [ + { + "target": "build.all", + "projects": "dependencies" + }, + { + "target": "build", + "projects": "self" + } + ] + }, + "focus": { + "options": { + "commands": ["nx workspace-schematic focus-packages canvas-babylon"], + "parallel": false + }, + "executor": "@nrwl/workspace:run-commands" + }, + "lint": { + "executor": "@nrwl/linter:eslint", + "options": { + "lintFilePatterns": ["packages/canvas-babylon/**/*.ts"] + } + } + } +} diff --git a/packages/canvas-media/.eslintrc.json b/packages/canvas-media/.eslintrc.json new file mode 100644 index 000000000..be41074b7 --- /dev/null +++ b/packages/canvas-media/.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/canvas-media/project.json b/packages/canvas-media/project.json new file mode 100644 index 000000000..1fefa0870 --- /dev/null +++ b/packages/canvas-media/project.json @@ -0,0 +1,74 @@ +{ + "root": "packages/canvas-media", + "sourceRoot": "packages/canvas-media", + "projectType": "library", + "generators": {}, + "targets": { + "build": { + "options": { + "outputPath": "dist/packages/canvas-media", + "tsConfig": "packages/canvas-media/tsconfig.json", + "packageJson": "packages/canvas-media/package.json", + "main": "packages/canvas-media/index.ts", + "assets": [ + "packages/canvas-media/*.md", + "packages/canvas-media/index.d.ts", + "LICENSE", + { + "glob": "**/*", + "input": "packages/canvas-media/platforms/", + "output": "./platforms/" + }, + { + "glob": "**/*.d.ts", + "input": "packages/canvas-media/audio/", + "output": "./audio" + }, + { + "glob": "**/*.d.ts", + "input": "packages/canvas-media/video/", + "output": "./video" + } + ] + }, + "executor": "@nrwl/js:tsc", + "dependsOn": [ + { + "target": "build.all", + "projects": "dependencies" + } + ] + }, + "build.all": { + "outputs": ["dist/packages/canvas-media"], + "options": { + "commands": ["node tools/scripts/build-finish.ts canvas-media"], + "parallel": false + }, + "executor": "@nrwl/workspace:run-commands", + "dependsOn": [ + { + "target": "build.all", + "projects": "dependencies" + }, + { + "target": "build", + "projects": "self" + } + ] + }, + "focus": { + "options": { + "commands": ["nx workspace-schematic focus-packages canvas-media"], + "parallel": false + }, + "executor": "@nrwl/workspace:run-commands" + }, + "lint": { + "executor": "@nrwl/linter:eslint", + "options": { + "lintFilePatterns": ["packages/canvas-media/**/*.ts"] + } + } + } +} diff --git a/packages/canvas-phaser-ce/.eslintrc.json b/packages/canvas-phaser-ce/.eslintrc.json new file mode 100644 index 000000000..be41074b7 --- /dev/null +++ b/packages/canvas-phaser-ce/.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/canvas-phaser-ce/project.json b/packages/canvas-phaser-ce/project.json new file mode 100644 index 000000000..9ddc9cdf8 --- /dev/null +++ b/packages/canvas-phaser-ce/project.json @@ -0,0 +1,69 @@ +{ + "root": "packages/canvas-phaser-ce", + "sourceRoot": "packages/canvas-phaser-ce", + "projectType": "library", + "generators": {}, + "targets": { + "build": { + "options": { + "outputPath": "dist/packages/canvas-phaser-ce", + "tsConfig": "packages/canvas-phaser-ce/tsconfig.json", + "packageJson": "packages/canvas-phaser-ce/package.json", + "main": "packages/canvas-phaser-ce/index.ts", + "assets": [ + "packages/canvas-phaser-ce/*.md", + "packages/canvas-phaser-ce/index.d.ts", + "LICENSE", + { + "glob": "**/*", + "input": "packages/canvas-phaser-ce/platforms/", + "output": "./platforms/" + }, + { + "glob": "**/*.js", + "input": "packages/canvas-phaser-ce/", + "output": "./" + } + ] + }, + "executor": "@nrwl/js:tsc", + "dependsOn": [ + { + "target": "build.all", + "projects": "dependencies" + } + ] + }, + "build.all": { + "outputs": ["dist/packages/canvas-phaser-ce"], + "options": { + "commands": ["node tools/scripts/build-finish.ts canvas-phaser-ce"], + "parallel": false + }, + "executor": "@nrwl/workspace:run-commands", + "dependsOn": [ + { + "target": "build.all", + "projects": "dependencies" + }, + { + "target": "build", + "projects": "self" + } + ] + }, + "focus": { + "options": { + "commands": ["nx workspace-schematic focus-packages canvas-phaser-ce"], + "parallel": false + }, + "executor": "@nrwl/workspace:run-commands" + }, + "lint": { + "executor": "@nrwl/linter:eslint", + "options": { + "lintFilePatterns": ["packages/canvas-phaser-ce/**/*.ts"] + } + } + } +} diff --git a/packages/canvas-phaser/.eslintrc.json b/packages/canvas-phaser/.eslintrc.json new file mode 100644 index 000000000..be41074b7 --- /dev/null +++ b/packages/canvas-phaser/.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/canvas-phaser/project.json b/packages/canvas-phaser/project.json new file mode 100644 index 000000000..ac88404cc --- /dev/null +++ b/packages/canvas-phaser/project.json @@ -0,0 +1,64 @@ +{ + "root": "packages/canvas-phaser", + "sourceRoot": "packages/canvas-phaser", + "projectType": "library", + "generators": {}, + "targets": { + "build": { + "options": { + "outputPath": "dist/packages/canvas-phaser", + "tsConfig": "packages/canvas-phaser/tsconfig.json", + "packageJson": "packages/canvas-phaser/package.json", + "main": "packages/canvas-phaser/index.ts", + "assets": [ + "packages/canvas-phaser/*.md", + "packages/canvas-phaser/index.d.ts", + "LICENSE", + { + "glob": "**/*", + "input": "packages/canvas-phaser/platforms/", + "output": "./platforms/" + } + ] + }, + "executor": "@nrwl/js:tsc", + "dependsOn": [ + { + "target": "build.all", + "projects": "dependencies" + } + ] + }, + "build.all": { + "outputs": ["dist/packages/canvas-phaser"], + "options": { + "commands": ["node tools/scripts/build-finish.ts canvas-phaser"], + "parallel": false + }, + "executor": "@nrwl/workspace:run-commands", + "dependsOn": [ + { + "target": "build.all", + "projects": "dependencies" + }, + { + "target": "build", + "projects": "self" + } + ] + }, + "focus": { + "options": { + "commands": ["nx workspace-schematic focus-packages canvas-phaser"], + "parallel": false + }, + "executor": "@nrwl/workspace:run-commands" + }, + "lint": { + "executor": "@nrwl/linter:eslint", + "options": { + "lintFilePatterns": ["packages/canvas-phaser/**/*.ts"] + } + } + } +} diff --git a/packages/canvas-pixi/.eslintrc.json b/packages/canvas-pixi/.eslintrc.json new file mode 100644 index 000000000..be41074b7 --- /dev/null +++ b/packages/canvas-pixi/.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/canvas-pixi/project.json b/packages/canvas-pixi/project.json new file mode 100644 index 000000000..a1a3da171 --- /dev/null +++ b/packages/canvas-pixi/project.json @@ -0,0 +1,64 @@ +{ + "root": "packages/canvas-pixi", + "sourceRoot": "packages/canvas-pixi", + "projectType": "library", + "generators": {}, + "targets": { + "build": { + "options": { + "outputPath": "dist/packages/canvas-pixi", + "tsConfig": "packages/canvas-pixi/tsconfig.json", + "packageJson": "packages/canvas-pixi/package.json", + "main": "packages/canvas-pixi/index.ts", + "assets": [ + "packages/canvas-pixi/*.md", + "packages/canvas-pixi/index.d.ts", + "LICENSE", + { + "glob": "**/*", + "input": "packages/canvas-pixi/platforms/", + "output": "./platforms/" + } + ] + }, + "executor": "@nrwl/js:tsc", + "dependsOn": [ + { + "target": "build.all", + "projects": "dependencies" + } + ] + }, + "build.all": { + "outputs": ["dist/packages/canvas-pixi"], + "options": { + "commands": ["node tools/scripts/build-finish.ts canvas-pixi"], + "parallel": false + }, + "executor": "@nrwl/workspace:run-commands", + "dependsOn": [ + { + "target": "build.all", + "projects": "dependencies" + }, + { + "target": "build", + "projects": "self" + } + ] + }, + "focus": { + "options": { + "commands": ["nx workspace-schematic focus-packages canvas-pixi"], + "parallel": false + }, + "executor": "@nrwl/workspace:run-commands" + }, + "lint": { + "executor": "@nrwl/linter:eslint", + "options": { + "lintFilePatterns": ["packages/canvas-pixi/**/*.ts"] + } + } + } +} diff --git a/packages/canvas-polyfill/.eslintrc.json b/packages/canvas-polyfill/.eslintrc.json new file mode 100644 index 000000000..be41074b7 --- /dev/null +++ b/packages/canvas-polyfill/.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/canvas-polyfill/project.json b/packages/canvas-polyfill/project.json new file mode 100644 index 000000000..7b85dfc46 --- /dev/null +++ b/packages/canvas-polyfill/project.json @@ -0,0 +1,69 @@ +{ + "root": "packages/canvas-polyfill", + "sourceRoot": "packages/canvas-polyfill", + "projectType": "library", + "generators": {}, + "targets": { + "build": { + "options": { + "outputPath": "dist/packages/canvas-polyfill", + "tsConfig": "packages/canvas-polyfill/tsconfig.json", + "packageJson": "packages/canvas-polyfill/package.json", + "main": "packages/canvas-polyfill/index.ts", + "assets": [ + "packages/canvas-polyfill/*.md", + "packages/canvas-polyfill/index.d.ts", + "LICENSE", + { + "glob": "**/*", + "input": "packages/canvas-polyfill/platforms/", + "output": "./platforms/" + }, + { + "glob": "**/*", + "input": "packages/canvas-polyfill/vendor/", + "output": "./vendor/" + } + ] + }, + "executor": "@nrwl/js:tsc", + "dependsOn": [ + { + "target": "build.all", + "projects": "dependencies" + } + ] + }, + "build.all": { + "outputs": ["dist/packages/canvas-polyfill"], + "options": { + "commands": ["node tools/scripts/build-finish.ts canvas-polyfill"], + "parallel": false + }, + "executor": "@nrwl/workspace:run-commands", + "dependsOn": [ + { + "target": "build.all", + "projects": "dependencies" + }, + { + "target": "build", + "projects": "self" + } + ] + }, + "focus": { + "options": { + "commands": ["nx workspace-schematic focus-packages canvas-polyfill"], + "parallel": false + }, + "executor": "@nrwl/workspace:run-commands" + }, + "lint": { + "executor": "@nrwl/linter:eslint", + "options": { + "lintFilePatterns": ["packages/canvas-polyfill/**/*.ts"] + } + } + } +} diff --git a/packages/canvas-three/.eslintrc.json b/packages/canvas-three/.eslintrc.json new file mode 100644 index 000000000..be41074b7 --- /dev/null +++ b/packages/canvas-three/.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/canvas-three/project.json b/packages/canvas-three/project.json new file mode 100644 index 000000000..4dd82690b --- /dev/null +++ b/packages/canvas-three/project.json @@ -0,0 +1,64 @@ +{ + "root": "packages/canvas-three", + "sourceRoot": "packages/canvas-three", + "projectType": "library", + "generators": {}, + "targets": { + "build": { + "options": { + "outputPath": "dist/packages/canvas-three", + "tsConfig": "packages/canvas-three/tsconfig.json", + "packageJson": "packages/canvas-three/package.json", + "main": "packages/canvas-three/index.ts", + "assets": [ + "packages/canvas-three/*.md", + "packages/canvas-three/index.d.ts", + "LICENSE", + { + "glob": "**/*", + "input": "packages/canvas-three/platforms/", + "output": "./platforms/" + } + ] + }, + "executor": "@nrwl/js:tsc", + "dependsOn": [ + { + "target": "build.all", + "projects": "dependencies" + } + ] + }, + "build.all": { + "outputs": ["dist/packages/canvas-three"], + "options": { + "commands": ["node tools/scripts/build-finish.ts canvas-three"], + "parallel": false + }, + "executor": "@nrwl/workspace:run-commands", + "dependsOn": [ + { + "target": "build.all", + "projects": "dependencies" + }, + { + "target": "build", + "projects": "self" + } + ] + }, + "focus": { + "options": { + "commands": ["nx workspace-schematic focus-packages canvas-three"], + "parallel": false + }, + "executor": "@nrwl/workspace:run-commands" + }, + "lint": { + "executor": "@nrwl/linter:eslint", + "options": { + "lintFilePatterns": ["packages/canvas-three/**/*.ts"] + } + } + } +} diff --git a/packages/canvas/.eslintrc.json b/packages/canvas/.eslintrc.json new file mode 100644 index 000000000..be41074b7 --- /dev/null +++ b/packages/canvas/.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/canvas/Canvas2D/CanvasRenderingContext2D/index.android.ts b/packages/canvas/Canvas2D/CanvasRenderingContext2D/index.android.ts index 6e87bab19..7ed746c1f 100644 --- a/packages/canvas/Canvas2D/CanvasRenderingContext2D/index.android.ts +++ b/packages/canvas/Canvas2D/CanvasRenderingContext2D/index.android.ts @@ -7,7 +7,7 @@ import {Color, ImageSource} from '@nativescript/core'; import {ImageAsset} from '../../ImageAsset'; import {CanvasPattern} from '../CanvasPattern'; import {Canvas} from '../../Canvas'; -import lazy from '@nativescript/canvas/utils'; +import lazy from '@nativescript/core/utils/lazy'; const FillRule = { EvenOdd: lazy(() => org.nativescript.canvas.TNSFillRule.EvenOdd), diff --git a/packages/canvas/angular/.eslintrc.json b/packages/canvas/angular/.eslintrc.json new file mode 100644 index 000000000..a129a9f3c --- /dev/null +++ b/packages/canvas/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/canvas/angular/ng-package.json b/packages/canvas/angular/ng-package.json new file mode 100644 index 000000000..d2ed35306 --- /dev/null +++ b/packages/canvas/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/canvas/angular" +} diff --git a/packages/canvas/angular/package.json b/packages/canvas/angular/package.json index 272ffbe56..158de7e21 100644 --- a/packages/canvas/angular/package.json +++ b/packages/canvas/angular/package.json @@ -1,16 +1,3 @@ { - "name": "nativescript-canvas-angular", - "ngPackage": { - "lib": { - "entryFile": "index.ts", - "umdModuleIds": { - "@nativescript/core": "ns-core", - "@nativescript/angular": "ns-angular", - "@nativescript/canvas": "ns-canvas" - } - }, - "allowedNonPeerDependencies": [ - "." - ] - } -} \ No newline at end of file + "name": "nativescript-canvas-angular" +} diff --git a/packages/canvas/angular/tsconfig.angular.json b/packages/canvas/angular/tsconfig.angular.json index 8392ca308..fc7305ecc 100644 --- a/packages/canvas/angular/tsconfig.angular.json +++ b/packages/canvas/angular/tsconfig.angular.json @@ -1,12 +1,13 @@ { - "extends": "../../../node_modules/ng-packagr/lib/ts/conf/tsconfig.ngc.json", - "compilerOptions": { - "types": ["node"], - "baseUrl": ".", - "paths": { - "@nativescript/canvas": [ - "../../../dist/packages/canvas" - ] - } - } + "extends": "../../../node_modules/ng-packagr/lib/ts/conf/tsconfig.ngc.json", + "compilerOptions": { + "types": ["node"], + "baseUrl": ".", + "paths": { + "@nativescript/canvas": ["../../../dist/packages/canvas"] + }, + "outDir": "../../../dist/out-tsc", + "declarationDir": "../../../dist/out-tsc" + }, + "files": ["index.ts"] } diff --git a/packages/canvas/angular/tsconfig.json b/packages/canvas/angular/tsconfig.json index be39f9675..c0b256a92 100644 --- a/packages/canvas/angular/tsconfig.json +++ b/packages/canvas/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/canvas/project.json b/packages/canvas/project.json new file mode 100644 index 000000000..ba010ef2d --- /dev/null +++ b/packages/canvas/project.json @@ -0,0 +1,193 @@ +{ + "root": "packages/canvas", + "sourceRoot": "packages/canvas", + "projectType": "library", + "generators": {}, + "targets": { + "build": { + "options": { + "outputPath": "dist/packages/canvas", + "tsConfig": "packages/canvas/tsconfig.json", + "packageJson": "packages/canvas/package.json", + "main": "packages/canvas/index.ts", + "assets": [ + "packages/canvas/*.md", + "packages/canvas/index.d.ts", + "LICENSE", + { + "glob": "**/*", + "input": "packages/canvas/platforms/", + "output": "./platforms/" + }, + { + "glob": "**/*.d.ts", + "input": "packages/canvas/Canvas/", + "output": "./Canvas/" + }, + { + "glob": "**/*.d.ts", + "input": "packages/canvas/Canvas2D/CanvasGradient", + "output": "./Canvas2D/CanvasGradient" + }, + { + "glob": "**/*.d.ts", + "input": "packages/canvas/Canvas2D/CanvasPattern", + "output": "./Canvas2D/CanvasPattern" + }, + { + "glob": "**/*.d.ts", + "input": "packages/canvas/Canvas2D/CanvasRenderingContext2D", + "output": "./Canvas2D/CanvasRenderingContext2D" + }, + { + "glob": "**/*.d.ts", + "input": "packages/canvas/Canvas2D/DOMMatrix", + "output": "./Canvas2D/DOMMatrix" + }, + { + "glob": "**/*.d.ts", + "input": "packages/canvas/Canvas2D/ImageData", + "output": "./Canvas2D/ImageData" + }, + { + "glob": "**/*.d.ts", + "input": "packages/canvas/Canvas2D/Path2D", + "output": "./Canvas2D/Path2D" + }, + { + "glob": "**/*.d.ts", + "input": "packages/canvas/Canvas2D/Path2D", + "output": "./Canvas2D/Path2D" + }, + { + "glob": "**/*.d.ts", + "input": "packages/canvas/Canvas2D/TextMetrics", + "output": "./Canvas2D/TextMetrics" + }, + { + "glob": "**/*.d.ts", + "input": "packages/canvas/ImageAsset", + "output": "./ImageAsset" + }, + { + "glob": "**/*.d.ts", + "input": "packages/canvas/TextDecoder", + "output": "./TextDecoder" + }, + { + "glob": "**/*.d.ts", + "input": "packages/canvas/TextEncoder", + "output": "./TextEncoder" + }, + { + "glob": "**/*.d.ts", + "input": "packages/canvas/WebGL/WebGLExtensions", + "output": "./WebGL/WebGLExtensions" + }, + { + "glob": "**/*.d.ts", + "input": "packages/canvas/WebGL/WebGLRenderingContext", + "output": "./WebGL/WebGLRenderingContext" + }, + { + "glob": "**/*.d.ts", + "input": "packages/canvas/WebGL2/WebGL2RenderingContext", + "output": "./WebGL2/WebGL2RenderingContext" + } + ] + }, + "executor": "@nrwl/js:tsc", + "dependsOn": [ + { + "target": "build.all", + "projects": "dependencies" + } + ] + }, + "build.all": { + "outputs": ["dist/packages/canvas"], + "options": { + "commands": ["node tools/scripts/build-finish.ts canvas"], + "parallel": false + }, + "executor": "@nrwl/workspace:run-commands", + "dependsOn": [ + { + "target": "build.all", + "projects": "dependencies" + }, + { + "target": "build", + "projects": "self" + } + ] + }, + "build.native.ios.framework.release": { + "outputs": ["dist/packages"], + "options": { + "commands": ["sh canvas-build.sh"], + "cwd": "tools/scripts", + "parallel": false + }, + "executor": "@nrwl/workspace:run-commands" + }, + "build.native.ios.framework.debug": { + "outputs": ["dist/packages"], + "options": { + "commands": ["sh canvas-build-debug.sh"], + "cwd": "tools/scripts", + "parallel": false + }, + "executor": "@nrwl/workspace:run-commands" + }, + "build.native.ios.debug": { + "outputs": ["dist/packages"], + "options": { + "commands": ["sh ios-build.sh"], + "cwd": "tools/scripts", + "parallel": false + }, + "executor": "@nrwl/workspace:run-commands" + }, + "build.native.ios.release": { + "outputs": ["dist/packages"], + "options": { + "commands": ["sh ios-build.sh --release"], + "cwd": "tools/scripts", + "parallel": false + }, + "executor": "@nrwl/workspace:run-commands" + }, + "build.native.android.debug": { + "outputs": ["dist/packages"], + "options": { + "commands": ["sh android-build.sh"], + "cwd": "tools/scripts", + "parallel": false + }, + "executor": "@nrwl/workspace:run-commands" + }, + "build.native.android.release": { + "outputs": ["dist/packages"], + "options": { + "commands": ["sh android-build.sh --release"], + "cwd": "tools/scripts", + "parallel": false + }, + "executor": "@nrwl/workspace:run-commands" + }, + "focus": { + "options": { + "commands": ["nx workspace-schematic focus-packages canvas"], + "parallel": false + }, + "executor": "@nrwl/workspace:run-commands" + }, + "lint": { + "executor": "@nrwl/linter:eslint", + "options": { + "lintFilePatterns": ["packages/canvas/**/*.ts"] + } + } + } +} diff --git a/tools/assets/App_Resources/iOS/Podfile b/tools/assets/App_Resources/iOS/Podfile new file mode 100644 index 000000000..3c8210b5a --- /dev/null +++ b/tools/assets/App_Resources/iOS/Podfile @@ -0,0 +1,9 @@ +platform :ios, '13.0' + +post_install do |installer| + installer.pods_project.targets.each do |target| + target.build_configurations.each do |config| + config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET' + end + end +end diff --git a/tools/scripts/build-finish.ts b/tools/scripts/build-finish.ts index 3e7e7e284..398d1df9f 100644 --- a/tools/scripts/build-finish.ts +++ b/tools/scripts/build-finish.ts @@ -18,40 +18,41 @@ console.log(`Building ${npmPackageName}...${publish ? 'and publishing.' : ''}`); // build angular package function buildAngular() { - ngPackage - .ngPackagr() - .forProject(path.join('packages', packageName, 'angular', 'package.json')) - .withTsConfig(path.join('packages', packageName, 'angular', 'tsconfig.angular.json')) - .build() - .then(() => { - copyAngularDist(); - }) - .catch((error) => { - console.error(error); - process.exit(1); - }); + ngPackage + .ngPackagr() + .forProject(path.join('packages', packageName, 'angular', 'ng-package.json')) + .withTsConfig(path.join('packages', packageName, 'angular', 'tsconfig.angular.json')) + .build() + .then(() => { + console.log(`${npmPackageName} angular built successfully.`); + finishPreparation(); + }) + .catch((error) => { + console.error(error); + process.exit(1); + }); } // copy angular ng-packagr output to dist/packages/{name} function copyAngularDist() { - fs.copy(path.join('packages', packageName, 'angular', 'dist'), path.join('dist', 'packages', packageName, 'angular')) - .then(() => { - console.log(`${npmPackageName} angular built successfully.`); - // buildNativeSrc(); - finishPreparation(); - }) - .catch((err) => console.error(err)); + fs.copy(path.join('packages', packageName, 'angular', 'dist'), path.join('dist', 'packages', packageName, 'angular')) + .then(() => { + console.log(`${npmPackageName} angular built successfully.`); + // buildNativeSrc(); + finishPreparation(); + }) + .catch((err) => console.error(err)); } function finishPreparation() { - fs.copy(path.join('tools', 'assets', 'publishing'), path.join('dist', 'packages', packageName)) - .then(() => console.log(`${npmPackageName} ready to publish.`)) - .catch((err) => console.error(err)); + fs.copy(path.join('tools', 'assets', 'publishing'), path.join('dist', 'packages', packageName)) + .then(() => console.log(`${npmPackageName} ready to publish.`)) + .catch((err) => console.error(err)); } if (fs.existsSync(path.join(rootDir, 'packages', packageName, 'angular'))) { - // package has angular specific src, build it first - buildAngular(); + // package has angular specific src, build it first + buildAngular(); } else { - finishPreparation(); + finishPreparation(); } diff --git a/tools/workspace-scripts.js b/tools/workspace-scripts.js index 2a023005a..657271be4 100644 --- a/tools/workspace-scripts.js +++ b/tools/workspace-scripts.js @@ -120,7 +120,7 @@ module.exports = { }, }, 'build-all': { - script: 'nx run all:build', + script: 'nx run-many --target=build.all --all', description: 'Build all packages', }, }, @@ -172,7 +172,7 @@ module.exports = { description: 'Focus on @nativescript/canvas-media', }, reset: { - script: 'nx run all:focus', + script: 'nx g @nativescript/plugin-tools:focus-packages', description: 'Reset Focus', }, }, diff --git a/tsconfig.base.json b/tsconfig.base.json index 6821bd3b2..8e5a9c24c 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -1,38 +1,36 @@ { - "compilerOptions": { - "rootDir": ".", - "sourceMap": true, - "declaration": true, - "moduleResolution": "node", - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "noEmitHelpers": false, - "target": "es2017", - "module": "esnext", - "lib": [ - "es2017", - "dom" - ], - "skipLibCheck": true, - "skipDefaultLibCheck": true, - "baseUrl": ".", - "plugins": [ - { - "transform": "@nativescript/webpack/dist/transformers/NativeClass", - "type": "raw" - } - ], - "paths": { - "@nativescript/*": [ - "packages/*" - ], - "@demo/shared": [ - "tools/demo/index.ts" - ] - } - }, - "exclude": [ - "node_modules", - "tmp" - ] -} \ No newline at end of file + "compilerOptions": { + "rootDir": ".", + "sourceMap": true, + "declaration": true, + "moduleResolution": "node", + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "noEmitHelpers": false, + "target": "es2017", + "module": "esnext", + "lib": ["es2017", "dom"], + "skipLibCheck": true, + "skipDefaultLibCheck": true, + "baseUrl": ".", + "plugins": [ + { + "transform": "@nativescript/webpack/dist/transformers/NativeClass", + "type": "raw" + } + ], + "paths": { + "@demo/shared": ["tools/demo/index.ts"], + "@nativescript/canvas": ["packages/canvas/index.ts"], + "@nativescript/canvas-babylon": ["packages/canvas-babylon/index.ts"], + "@nativescript/canvas-media": ["packages/canvas-media/index.ts"], + "@nativescript/canvas-phaser": ["packages/canvas-phaser/index.ts"], + "@nativescript/canvas-phaser-ce": ["packages/canvas-phaser-ce/index.ts"], + "@nativescript/canvas-pixi": ["packages/canvas-pixi/index.ts"], + "@nativescript/canvas-polyfill": ["packages/canvas-polyfill/index.ts"], + "@nativescript/canvas-three": ["packages/canvas-three/index.ts"], + "@nativescript/canvas/angular": ["packages/canvas/angular/index.ts"] + } + }, + "exclude": ["node_modules", "tmp"] +} diff --git a/workspace.json b/workspace.json index ec3745c5a..cde455f55 100644 --- a/workspace.json +++ b/workspace.json @@ -1,747 +1,16 @@ { - "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", - "noHmr": true - } - }, - "android": { - "executor": "@nativescript/nx:build", - "options": { - "platform": "android", - "noHmr": true - } - }, - "clean": { - "executor": "@nativescript/nx:build", - "options": { - "clean": true - } - } - } - }, - "demo-vue": { - "root": "apps/demo-vue/", - "sourceRoot": "apps/demo-vue/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": { - "outputs": [ - "dist/packages" - ], - "options": { - "commands": [ - "nx run canvas:build.all", - "nx run canvas-media:build.all", - "nx run canvas-polyfill:build.all", - "nx run canvas-babylon:build.all", - "nx run canvas-phaser:build.all", - "nx run canvas-phaser-ce:build.all", - "nx run canvas-pixi:build.all", - "nx run canvas-three:build.all" - ], - "parallel": false - }, - "executor": "@nrwl/workspace:run-commands" - }, - "focus": { - "outputs": [ - "dist/packages" - ], - "options": { - "commands": [ - "nx workspace-schematic focus-packages" - ], - "parallel": false - }, - "executor": "@nrwl/workspace:run-commands" - } - }, - "sourceRoot": "" - }, - "canvas": { - "root": "packages/canvas", - "sourceRoot": "packages/canvas", - "projectType": "library", - "schematics": {}, - "targets": { - "build": { - "options": { - "outputPath": "dist/packages/canvas", - "tsConfig": "packages/canvas/tsconfig.json", - "packageJson": "packages/canvas/package.json", - "main": "packages/canvas/index.ts", - "assets": [ - "packages/canvas/*.md", - "packages/canvas/index.d.ts", - "LICENSE", - { - "glob": "**/*", - "input": "packages/canvas/platforms/", - "output": "./platforms/" - }, - { - "glob": "**/*.d.ts", - "input": "packages/canvas/Canvas/", - "output": "./Canvas/" - }, - { - "glob": "**/*.d.ts", - "input": "packages/canvas/Canvas2D/CanvasGradient", - "output": "./Canvas2D/CanvasGradient" - }, - { - "glob": "**/*.d.ts", - "input": "packages/canvas/Canvas2D/CanvasPattern", - "output": "./Canvas2D/CanvasPattern" - }, - { - "glob": "**/*.d.ts", - "input": "packages/canvas/Canvas2D/CanvasRenderingContext2D", - "output": "./Canvas2D/CanvasRenderingContext2D" - }, - { - "glob": "**/*.d.ts", - "input": "packages/canvas/Canvas2D/DOMMatrix", - "output": "./Canvas2D/DOMMatrix" - }, - { - "glob": "**/*.d.ts", - "input": "packages/canvas/Canvas2D/ImageData", - "output": "./Canvas2D/ImageData" - }, - { - "glob": "**/*.d.ts", - "input": "packages/canvas/Canvas2D/Path2D", - "output": "./Canvas2D/Path2D" - }, - { - "glob": "**/*.d.ts", - "input": "packages/canvas/Canvas2D/Path2D", - "output": "./Canvas2D/Path2D" - }, - { - "glob": "**/*.d.ts", - "input": "packages/canvas/Canvas2D/TextMetrics", - "output": "./Canvas2D/TextMetrics" - }, - { - "glob": "**/*.d.ts", - "input": "packages/canvas/ImageAsset", - "output": "./ImageAsset" - }, - { - "glob": "**/*.d.ts", - "input": "packages/canvas/TextDecoder", - "output": "./TextDecoder" - }, - { - "glob": "**/*.d.ts", - "input": "packages/canvas/TextEncoder", - "output": "./TextEncoder" - }, - { - "glob": "**/*.d.ts", - "input": "packages/canvas/WebGL/WebGLExtensions", - "output": "./WebGL/WebGLExtensions" - }, - { - "glob": "**/*.d.ts", - "input": "packages/canvas/WebGL/WebGLRenderingContext", - "output": "./WebGL/WebGLRenderingContext" - }, - { - "glob": "**/*.d.ts", - "input": "packages/canvas/WebGL2/WebGL2RenderingContext", - "output": "./WebGL2/WebGL2RenderingContext" - } - ] - }, - "executor": "@nrwl/node:package" - }, - "build.all": { - "outputs": [ - "dist/packages" - ], - "options": { - "commands": [ - "nx run canvas:build", - "node tools/scripts/build-finish.ts canvas" - ], - "parallel": false - }, - "executor": "@nrwl/workspace:run-commands" - }, - "build.native.ios.framework.release": { - "outputs": [ - "dist/packages" - ], - "options": { - "commands": [ - "sh canvas-build.sh" - ], - "cwd": "tools/scripts", - "parallel": false - }, - "executor": "@nrwl/workspace:run-commands" - }, - "build.native.ios.framework.debug": { - "outputs": [ - "dist/packages" - ], - "options": { - "commands": [ - "sh canvas-build-debug.sh" - ], - "cwd": "tools/scripts", - "parallel": false - }, - "executor": "@nrwl/workspace:run-commands" - }, - "build.native.ios.debug": { - "outputs": [ - "dist/packages" - ], - "options": { - "commands": [ - "sh ios-build.sh" - ], - "cwd": "tools/scripts", - "parallel": false - }, - "executor": "@nrwl/workspace:run-commands" - }, - "build.native.ios.release": { - "outputs": [ - "dist/packages" - ], - "options": { - "commands": [ - "sh ios-build.sh --release" - ], - "cwd": "tools/scripts", - "parallel": false - }, - "executor": "@nrwl/workspace:run-commands" - }, - "build.native.android.debug": { - "outputs": [ - "dist/packages" - ], - "options": { - "commands": [ - "sh android-build.sh" - ], - "cwd": "tools/scripts", - "parallel": false - }, - "executor": "@nrwl/workspace:run-commands" - }, - "build.native.android.release": { - "outputs": [ - "dist/packages" - ], - "options": { - "commands": [ - "sh android-build.sh --release" - ], - "cwd": "tools/scripts", - "parallel": false - }, - "executor": "@nrwl/workspace:run-commands" - }, - "focus": { - "outputs": [ - "dist/packages" - ], - "options": { - "commands": [ - "nx workspace-schematic focus-packages canvas" - ], - "parallel": false - }, - "executor": "@nrwl/workspace:run-commands" - } - } - }, - "canvas-babylon": { - "root": "packages/canvas-babylon", - "sourceRoot": "packages/canvas-babylon", - "projectType": "library", - "schematics": {}, - "targets": { - "build": { - "options": { - "outputPath": "dist/packages/canvas-babylon", - "tsConfig": "packages/canvas-babylon/tsconfig.json", - "packageJson": "packages/canvas-babylon/package.json", - "main": "packages/canvas-babylon/index.ts", - "assets": [ - "packages/canvas-babylon/*.md", - "packages/canvas-babylon/index.d.ts", - "LICENSE", - { - "glob": "**/*", - "input": "packages/canvas-babylon/platforms/", - "output": "./platforms/" - } - ] - }, - "executor": "@nrwl/node:package" - }, - "build.all": { - "outputs": [ - "dist/packages" - ], - "options": { - "commands": [ - "nx run canvas-babylon:build", - "node tools/scripts/build-finish.ts canvas-babylon" - ], - "parallel": false - }, - "executor": "@nrwl/workspace:run-commands" - }, - "focus": { - "outputs": [ - "dist/packages" - ], - "options": { - "commands": [ - "nx workspace-schematic focus-packages canvas-babylon" - ], - "parallel": false - }, - "executor": "@nrwl/workspace:run-commands" - } - } - }, - "canvas-polyfill": { - "root": "packages/canvas-polyfill", - "sourceRoot": "packages/canvas-polyfill", - "projectType": "library", - "schematics": {}, - "targets": { - "build": { - "options": { - "outputPath": "dist/packages/canvas-polyfill", - "tsConfig": "packages/canvas-polyfill/tsconfig.json", - "packageJson": "packages/canvas-polyfill/package.json", - "main": "packages/canvas-polyfill/index.ts", - "assets": [ - "packages/canvas-polyfill/*.md", - "packages/canvas-polyfill/index.d.ts", - "LICENSE", - { - "glob": "**/*", - "input": "packages/canvas-polyfill/platforms/", - "output": "./platforms/" - }, - { - "glob": "**/*", - "input": "packages/canvas-polyfill/vendor/", - "output": "./vendor/" - } - ] - }, - "executor": "@nrwl/node:package" - }, - "build.all": { - "outputs": [ - "dist/packages" - ], - "options": { - "commands": [ - "nx run canvas-polyfill:build", - "node tools/scripts/build-finish.ts canvas-polyfill" - ], - "parallel": false - }, - "executor": "@nrwl/workspace:run-commands" - }, - "focus": { - "outputs": [ - "dist/packages" - ], - "options": { - "commands": [ - "nx workspace-schematic focus-packages canvas-polyfill" - ], - "parallel": false - }, - "executor": "@nrwl/workspace:run-commands" - } - } - }, - "canvas-phaser": { - "root": "packages/canvas-phaser", - "sourceRoot": "packages/canvas-phaser", - "projectType": "library", - "schematics": {}, - "targets": { - "build": { - "options": { - "outputPath": "dist/packages/canvas-phaser", - "tsConfig": "packages/canvas-phaser/tsconfig.json", - "packageJson": "packages/canvas-phaser/package.json", - "main": "packages/canvas-phaser/index.ts", - "assets": [ - "packages/canvas-phaser/*.md", - "packages/canvas-phaser/index.d.ts", - "LICENSE", - { - "glob": "**/*", - "input": "packages/canvas-phaser/platforms/", - "output": "./platforms/" - } - ] - }, - "executor": "@nrwl/node:package" - }, - "build.all": { - "outputs": [ - "dist/packages" - ], - "options": { - "commands": [ - "nx run canvas-phaser:build", - "node tools/scripts/build-finish.ts canvas-phaser" - ], - "parallel": false - }, - "executor": "@nrwl/workspace:run-commands" - }, - "focus": { - "outputs": [ - "dist/packages" - ], - "options": { - "commands": [ - "nx workspace-schematic focus-packages canvas-phaser" - ], - "parallel": false - }, - "executor": "@nrwl/workspace:run-commands" - } - } - }, - "canvas-phaser-ce": { - "root": "packages/canvas-phaser-ce", - "sourceRoot": "packages/canvas-phaser-ce", - "projectType": "library", - "schematics": {}, - "targets": { - "build": { - "options": { - "outputPath": "dist/packages/canvas-phaser-ce", - "tsConfig": "packages/canvas-phaser-ce/tsconfig.json", - "packageJson": "packages/canvas-phaser-ce/package.json", - "main": "packages/canvas-phaser-ce/index.ts", - "assets": [ - "packages/canvas-phaser-ce/*.md", - "packages/canvas-phaser-ce/index.d.ts", - "LICENSE", - { - "glob": "**/*", - "input": "packages/canvas-phaser-ce/platforms/", - "output": "./platforms/" - }, - { - "glob": "**/*.js", - "input": "packages/canvas-phaser-ce/", - "output": "./" - } - ] - }, - "executor": "@nrwl/node:package" - }, - "build.all": { - "outputs": [ - "dist/packages" - ], - "options": { - "commands": [ - "nx run canvas-phaser-ce:build", - "node tools/scripts/build-finish.ts canvas-phaser-ce" - ], - "parallel": false - }, - "executor": "@nrwl/workspace:run-commands" - }, - "focus": { - "outputs": [ - "dist/packages" - ], - "options": { - "commands": [ - "nx workspace-schematic focus-packages canvas-phaser-ce" - ], - "parallel": false - }, - "executor": "@nrwl/workspace:run-commands" - } - } - }, - "canvas-pixi": { - "root": "packages/canvas-pixi", - "sourceRoot": "packages/canvas-pixi", - "projectType": "library", - "schematics": {}, - "targets": { - "build": { - "options": { - "outputPath": "dist/packages/canvas-pixi", - "tsConfig": "packages/canvas-pixi/tsconfig.json", - "packageJson": "packages/canvas-pixi/package.json", - "main": "packages/canvas-pixi/index.ts", - "assets": [ - "packages/canvas-pixi/*.md", - "packages/canvas-pixi/index.d.ts", - "LICENSE", - { - "glob": "**/*", - "input": "packages/canvas-pixi/platforms/", - "output": "./platforms/" - } - ] - }, - "executor": "@nrwl/node:package" - }, - "build.all": { - "outputs": [ - "dist/packages" - ], - "options": { - "commands": [ - "nx run canvas-pixi:build", - "node tools/scripts/build-finish.ts canvas-pixi" - ], - "parallel": false - }, - "executor": "@nrwl/workspace:run-commands" - }, - "focus": { - "outputs": [ - "dist/packages" - ], - "options": { - "commands": [ - "nx workspace-schematic focus-packages canvas-pixi" - ], - "parallel": false - }, - "executor": "@nrwl/workspace:run-commands" - } - } - }, - "canvas-three": { - "root": "packages/canvas-three", - "sourceRoot": "packages/canvas-three", - "projectType": "library", - "schematics": {}, - "targets": { - "build": { - "options": { - "outputPath": "dist/packages/canvas-three", - "tsConfig": "packages/canvas-three/tsconfig.json", - "packageJson": "packages/canvas-three/package.json", - "main": "packages/canvas-three/index.ts", - "assets": [ - "packages/canvas-three/*.md", - "packages/canvas-three/index.d.ts", - "LICENSE", - { - "glob": "**/*", - "input": "packages/canvas-three/platforms/", - "output": "./platforms/" - } - ] - }, - "executor": "@nrwl/node:package" - }, - "build.all": { - "outputs": [ - "dist/packages" - ], - "options": { - "commands": [ - "nx run canvas-three:build", - "node tools/scripts/build-finish.ts canvas-three" - ], - "parallel": false - }, - "executor": "@nrwl/workspace:run-commands" - }, - "focus": { - "outputs": [ - "dist/packages" - ], - "options": { - "commands": [ - "nx workspace-schematic focus-packages canvas-three" - ], - "parallel": false - }, - "executor": "@nrwl/workspace:run-commands" - } - } - }, - "canvas-media": { - "root": "packages/canvas-media", - "sourceRoot": "packages/canvas-media", - "projectType": "library", - "schematics": {}, - "targets": { - "build": { - "options": { - "outputPath": "dist/packages/canvas-media", - "tsConfig": "packages/canvas-media/tsconfig.json", - "packageJson": "packages/canvas-media/package.json", - "main": "packages/canvas-media/index.ts", - "assets": [ - "packages/canvas-media/*.md", - "packages/canvas-media/index.d.ts", - "LICENSE", - { - "glob": "**/*", - "input": "packages/canvas-media/platforms/", - "output": "./platforms/" - }, - { - "glob": "**/*.d.ts", - "input": "packages/canvas-media/audio/", - "output": "./audio" - }, - { - "glob": "**/*.d.ts", - "input": "packages/canvas-media/video/", - "output": "./video" - } - ] - }, - "executor": "@nrwl/node:package" - }, - "build.all": { - "outputs": [ - "dist/packages" - ], - "options": { - "commands": [ - "nx run canvas-media:build", - "node tools/scripts/build-finish.ts canvas-media" - ], - "parallel": false - }, - "executor": "@nrwl/workspace:run-commands" - }, - "focus": { - "outputs": [ - "dist/packages" - ], - "options": { - "commands": [ - "nx workspace-schematic focus-packages canvas-media" - ], - "parallel": false - }, - "executor": "@nrwl/workspace:run-commands" - } - } - } - }, - "cli": { - "defaultCollection": "@nrwl/workspace" - } -} \ No newline at end of file + "version": 2, + "projects": { + "canvas": "packages/canvas", + "canvas-babylon": "packages/canvas-babylon", + "canvas-media": "packages/canvas-media", + "canvas-phaser": "packages/canvas-phaser", + "canvas-phaser-ce": "packages/canvas-phaser-ce", + "canvas-pixi": "packages/canvas-pixi", + "canvas-polyfill": "packages/canvas-polyfill", + "canvas-three": "packages/canvas-three", + "demo": "apps/demo", + "demo-angular": "apps/demo-angular", + "demo-vue": "apps/demo-vue" + } +}