diff --git a/apps/automated/nativescript.config.ts b/apps/automated/nativescript.config.ts index 413b3e554..043f59c66 100644 --- a/apps/automated/nativescript.config.ts +++ b/apps/automated/nativescript.config.ts @@ -7,4 +7,7 @@ export default { android: { v8Flags: '--expose_gc', }, + cli: { + packageManager: 'npm', + }, } as NativeScriptConfig; diff --git a/apps/automated/project.json b/apps/automated/project.json new file mode 100644 index 000000000..85cca779e --- /dev/null +++ b/apps/automated/project.json @@ -0,0 +1,42 @@ +{ + "root": "apps/automated/", + "sourceRoot": "apps/automated/app", + "projectType": "application", + "prefix": "nativescript", + "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 + } + }, + "lint": { + "executor": "@nrwl/linter:eslint", + "options": { + "lintFilePatterns": ["apps/automated/**/*.ts", "apps/automated/src/**/*.html"] + } + } + } +} diff --git a/apps/automated/tsconfig.json b/apps/automated/tsconfig.json index ab1c7ad8b..6230aa69d 100644 --- a/apps/automated/tsconfig.json +++ b/apps/automated/tsconfig.json @@ -1,10 +1,10 @@ { - "extends": "../../tsconfig.json", - "compilerOptions": { - "diagnostics": false, - "paths": { - "~/*": ["src/*"], - "tns-core-modules/*": ["@nativescript/core/*"] - } - } + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "diagnostics": false, + "paths": { + "~/*": ["src/*"], + "tns-core-modules/*": ["@nativescript/core/*"] + } + } } diff --git a/apps/toolbox/nativescript.config.ts b/apps/toolbox/nativescript.config.ts index 1f93e6add..e6bcbc6d0 100644 --- a/apps/toolbox/nativescript.config.ts +++ b/apps/toolbox/nativescript.config.ts @@ -8,4 +8,7 @@ export default { v8Flags: '--expose_gc', suppressCallJSMethodExceptions: false, }, + cli: { + packageManager: 'npm', + }, } as NativeScriptConfig; diff --git a/apps/toolbox/project.json b/apps/toolbox/project.json new file mode 100644 index 000000000..cbd4bc8dc --- /dev/null +++ b/apps/toolbox/project.json @@ -0,0 +1,42 @@ +{ + "root": "apps/toolbox/", + "sourceRoot": "apps/toolbox/src", + "projectType": "application", + "prefix": "nativescript", + "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 + } + }, + "lint": { + "executor": "@nrwl/linter:eslint", + "options": { + "lintFilePatterns": ["apps/toolbox/**/*.ts", "apps/toolbox/src/**/*.html"] + } + } + } +} diff --git a/apps/toolbox/tsconfig.json b/apps/toolbox/tsconfig.json index 27d27ebd9..0d0dc494b 100644 --- a/apps/toolbox/tsconfig.json +++ b/apps/toolbox/tsconfig.json @@ -1,9 +1,9 @@ { - "extends": "../../tsconfig.json", - "compilerOptions": { - "diagnostics": false, - "paths": { - "~/*": ["src/*"] - } - } + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "diagnostics": false, + "paths": { + "~/*": ["src/*"] + } + } } diff --git a/apps/ui/nativescript.config.ts b/apps/ui/nativescript.config.ts index d355e9993..3303902b2 100644 --- a/apps/ui/nativescript.config.ts +++ b/apps/ui/nativescript.config.ts @@ -7,4 +7,7 @@ export default { android: { v8Flags: '--expose_gc', }, + cli: { + packageManager: 'npm', + }, } as NativeScriptConfig; diff --git a/apps/ui/project.json b/apps/ui/project.json new file mode 100644 index 000000000..01150a335 --- /dev/null +++ b/apps/ui/project.json @@ -0,0 +1,42 @@ +{ + "root": "apps/ui/", + "sourceRoot": "apps/ui/src", + "projectType": "application", + "prefix": "nativescript", + "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 + } + }, + "lint": { + "executor": "@nrwl/linter:eslint", + "options": { + "lintFilePatterns": ["apps/ui/**/*.ts", "apps/ui/src/**/*.html"] + } + } + } +} diff --git a/apps/ui/tsconfig.json b/apps/ui/tsconfig.json index be54020e7..6d0ed95c0 100644 --- a/apps/ui/tsconfig.json +++ b/apps/ui/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "diagnostics": false, "paths": { diff --git a/jest.config.js b/jest.config.js index 8c858feaf..d08e9812c 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,3 +1,3 @@ -module.exports = { - projects: ['/packages/core'], -}; +const { getJestProjects } = require('@nrwl/jest'); + +module.exports = { projects: getJestProjects() }; diff --git a/nx.json b/nx.json index 4de54dd12..e92f224f4 100644 --- a/nx.json +++ b/nx.json @@ -15,39 +15,74 @@ "nx.json": "*", ".eslintrc.json": "*" }, - "projects": { - "apps-automated": { - "tags": [] + "targetDependencies": { + "build": [ + { + "target": "build", + "projects": "dependencies" + } + ] + }, + "cli": { + "defaultCollection": "@nrwl/workspace" + }, + "generators": { + "@nrwl/workspace": { + "library": { + "linter": "eslint" + } }, - "apps-toolbox": { - "tags": [] + "@nrwl/cypress": { + "cypress-project": { + "linter": "eslint" + } }, - "apps-ui": { - "tags": [] + "@nrwl/react": { + "application": { + "linter": "eslint" + }, + "library": { + "linter": "eslint" + } }, - "core": { - "tags": [] + "@nrwl/next": { + "application": { + "linter": "eslint" + } }, - "core-api-docs": { - "tags": [] + "@nrwl/web": { + "application": { + "linter": "eslint" + } }, - "types": { - "tags": [] + "@nrwl/node": { + "application": { + "linter": "eslint" + }, + "library": { + "linter": "eslint" + } }, - "types-ios": { - "tags": [] + "@nrwl/nx-plugin": { + "plugin": { + "linter": "eslint" + } }, - "types-android": { - "tags": [] + "@nrwl/nest": { + "application": { + "linter": "eslint" + } }, - "ui-mobile-base": { - "tags": [] - }, - "webpack": { - "tags": [] - }, - "webpack5": { - "tags": [] + "@nrwl/express": { + "application": { + "linter": "eslint" + }, + "library": { + "linter": "eslint" + } } + }, + "affected": { + "defaultBase": "master" } } diff --git a/package.json b/package.json index 1c832df65..d26207c7a 100644 --- a/package.json +++ b/package.json @@ -22,17 +22,18 @@ "devDependencies": { "@nativescript/eslint-plugin": "~0.0.4", "@nativescript/hook": "^2.0.0", - "@nrwl/cli": "12.0.8", - "@nrwl/eslint-plugin-nx": "12.0.8", - "@nrwl/jest": "12.0.8", - "@nrwl/node": "12.0.8", - "@nrwl/tao": "12.0.8", - "@nrwl/workspace": "12.0.8", - "@nstudio/focus": "~11.1.0", + "@nativescript/nx": "~2.0.8", + "@nrwl/cli": "13.3.12", + "@nrwl/eslint-plugin-nx": "13.3.12", + "@nrwl/jest": "13.3.12", + "@nrwl/node": "13.3.12", + "@nrwl/tao": "13.3.12", + "@nrwl/workspace": "13.3.12", + "@nstudio/focus": "~13.0.1", "@nstudio/nps-i": "~1.1.0", "@prettier/plugin-xml": "^0.13.1", "@types/chai": "^4.2.11", - "@types/jest": "~26.0.8", + "@types/jest": "27.0.2", "@types/mocha": "^7.0.2", "@types/node": "14.14.33", "@typescript-eslint/eslint-plugin": "4.19.0", @@ -42,33 +43,33 @@ "copyfiles": "^2.4.0", "css": "^3.0.0", "css-tree": "^1.0.0-alpha.39", - "dotenv": "8.2.0", + "dotenv": "10.0.0", "eslint": "7.22.0", "eslint-config-prettier": "8.1.0", "eslint-plugin-prettier": "^3.3.1", "gonzales": "^1.0.7", "husky": "^5.1.3", - "jest": "~26.2.2", + "jest": "27.2.3", "lint-staged": "^10.5.0", "mocha": "^8.0.1", "mocha-typescript": "^1.1.17", "module-alias": "^2.2.2", - "nativescript": "~8.1.3", + "nativescript": "~8.1.5", "nativescript-typedoc-theme": "1.1.0", "parse-css": "git+https://github.com/tabatkins/parse-css.git", "parserlib": "^1.1.1", - "prettier": "~2.2.1", + "prettier": "2.5.1", "reduce-css-calc": "~2.1.7", "sass": "~1.32.8", "shady-css-parser": "^0.1.0", "terser-webpack-plugin": "~3.0.6", "tree-kill": "^1.2.2", - "ts-jest": "26.4.0", + "ts-jest": "27.0.5", "ts-node": "9.1.1", "ts-patch": "^1.3.0", "tslint": "6.1.3", "typedoc": "^0.20.14", - "typescript": "4.1.4", + "typescript": "4.3.5", "webpack": "~4.44.1", "webpack-cli": "~3.3.12", "zx": "^4.2.0" @@ -79,3 +80,4 @@ ] } } + diff --git a/packages/core/project.json b/packages/core/project.json new file mode 100644 index 000000000..06a72f824 --- /dev/null +++ b/packages/core/project.json @@ -0,0 +1,55 @@ +{ + "root": "packages/core", + "sourceRoot": "packages/core", + "projectType": "library", + "generators": {}, + "targets": { + "lint": { + "executor": "@nrwl/linter:eslint", + "options": { + "lintFilePatterns": ["packages/core/**/*.ts", "packages/core/references.d.ts", "packages/core/**/*.spec.ts", "packages/core/**/*.spec.tsx", "packages/core/**/*.spec.js", "packages/core/**/*.spec.jsx", "packages/core/**/*.d.ts"] + } + }, + "test": { + "executor": "@nrwl/jest:jest", + "options": { + "jestConfig": "packages/core/jest.config.js", + "passWithNoTests": true + }, + "outputs": ["coverage/packages/core"] + }, + "build": { + "executor": "@nrwl/workspace:run-commands", + "outputs": ["dist/packages"], + "options": { + "commands": [ + "npx rimraf dist/packages/core", + "./node_modules/.bin/tsc -p packages/core/tsconfig.lib.json", + "./node_modules/.bin/copyfiles -e \"packages/core/__tests__/**/*\" \"packages/core/**/*.d.ts\" dist && ./node_modules/.bin/copyfiles -e \"packages/core/__tests__/**/*\" \"packages/core/js-libs/**/*\" dist && ./node_modules/.bin/copyfiles -e \"packages/core/__tests__/**/*\" \"packages/core/cli-hooks/**/*.js\" dist && ./node_modules/.bin/copyfiles -e \"packages/core/__tests__/**/*\" \"packages/core/platforms/**/*\" dist && ./node_modules/.bin/copyfiles -e \"packages/core/__tests__/**/*\" \"packages/core/fetch/**/*\" dist && ./node_modules/.bin/copyfiles -e \"packages/core/__tests__/**/*\" \"packages/core/css/**/*\" dist && ./node_modules/.bin/copyfiles -e \"packages/core/__tests__/**/*\" \"packages/core/css-value/**/*\" dist", + "cp packages/core/package.json dist/packages/core", + "cp packages/core/README.md dist/packages/core", + "cp LICENSE dist/packages/core", + "cd dist/packages/core && npm pack && mv *.tgz .." + ], + "cwd": ".", + "parallel": false + } + }, + "unit": { + "executor": "@nrwl/workspace:run-commands", + "options": { + "commands": ["../../../node_modules/.bin/tsc -p tsconfig.json && ../../../node_modules/.bin/mocha --config=.mocharc.yml"], + "cwd": "packages/core/__tests__", + "parallel": false + } + }, + "unit.watch": { + "executor": "@nrwl/workspace:run-commands", + "options": { + "commands": ["../../../node_modules/.bin/tsc -p tsconfig.json && ../../../node_modules/.bin/mocha --watch --config=.mocharc.yml"], + "cwd": "packages/core/__tests__", + "parallel": false + } + } + } +} diff --git a/packages/core/tsconfig.json b/packages/core/tsconfig.json index e9722048f..d1689fde9 100644 --- a/packages/core/tsconfig.json +++ b/packages/core/tsconfig.json @@ -1,8 +1,8 @@ { - "extends": "../../tsconfig.json", - "compilerOptions": { - "baseUrl": "." - }, - "include": ["**/*.ts", "./references.d.ts"], - "exclude": ["dist", "__tests__"] + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "baseUrl": "." + }, + "include": ["**/*.ts", "./references.d.ts"], + "exclude": ["dist", "__tests__"] } diff --git a/packages/core/tsconfig.lib.json b/packages/core/tsconfig.lib.json index 1c189dfd0..3ee2ce705 100644 --- a/packages/core/tsconfig.lib.json +++ b/packages/core/tsconfig.lib.json @@ -22,6 +22,6 @@ } ] }, - "exclude": ["**/*.spec.ts", "dist", "__tests__"], + "exclude": ["**/*.spec.ts", "**/*.test.ts", "dist", "__tests__"], "include": ["**/*.ts", "./references.d.ts"] } diff --git a/packages/core/tsconfig.spec.json b/packages/core/tsconfig.spec.json index 559410b96..3d95b817d 100644 --- a/packages/core/tsconfig.spec.json +++ b/packages/core/tsconfig.spec.json @@ -1,15 +1,9 @@ { - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../dist/out-tsc", - "module": "commonjs", - "types": ["jest", "node"] - }, - "include": [ - "**/*.spec.ts", - "**/*.spec.tsx", - "**/*.spec.js", - "**/*.spec.jsx", - "**/*.d.ts" - ] + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../dist/out-tsc", + "module": "commonjs", + "types": ["jest", "node"] + }, + "include": ["**/*.spec.ts", "**/*.test.ts", "**/*.spec.tsx", "**/*.test.tsx", "**/*.spec.js", "**/*.test.js", "**/*.spec.jsx", "**/*.test.jsx", "**/*.d.ts"] } diff --git a/packages/types-android/project.json b/packages/types-android/project.json new file mode 100644 index 000000000..d7a1a62bc --- /dev/null +++ b/packages/types-android/project.json @@ -0,0 +1,17 @@ +{ + "root": "packages/types-android", + "sourceRoot": "packages/types-android/src", + "projectType": "library", + "generators": {}, + "targets": { + "build": { + "executor": "@nrwl/workspace:run-commands", + "outputs": ["dist/packages"], + "options": { + "commands": ["mkdir -p ../../dist/packages/types-android", "cp -R src/* ../../dist/packages/types-android", "cp package.json *.md ../../dist/packages/types-android"], + "cwd": "packages/types-android", + "parallel": false + } + } + } +} diff --git a/packages/types-ios/project.json b/packages/types-ios/project.json new file mode 100644 index 000000000..6ba53b059 --- /dev/null +++ b/packages/types-ios/project.json @@ -0,0 +1,16 @@ +{ + "root": "packages/types-ios", + "sourceRoot": "packages/types-ios/src", + "projectType": "library", + "generators": {}, + "targets": { + "build": { + "executor": "@nrwl/workspace:run-commands", + "outputs": ["dist/packages"], + "options": { + "commands": ["./tools/scripts/typings-gen.sh latest", "mkdir -p dist/packages/types-ios", "cp -R packages/types-ios/src/* dist/packages/types-ios", "cp packages/types-ios/package.json dist/packages/types-ios", "cp packages/types-ios/README.md dist/packages/types-ios/README.md"], + "parallel": false + } + } + } +} diff --git a/packages/types/project.json b/packages/types/project.json new file mode 100644 index 000000000..3616cfddc --- /dev/null +++ b/packages/types/project.json @@ -0,0 +1,17 @@ +{ + "root": "packages/types", + "sourceRoot": "packages/types", + "projectType": "library", + "generators": {}, + "targets": { + "build": { + "executor": "@nrwl/workspace:run-commands", + "outputs": ["dist/packages"], + "options": { + "commands": ["mkdir -p ../../dist/packages/types", "cp -R * ../../dist/packages/types"], + "cwd": "packages/types", + "parallel": false + } + } + } +} diff --git a/packages/ui-mobile-base/project.json b/packages/ui-mobile-base/project.json new file mode 100644 index 000000000..46f6fd7b6 --- /dev/null +++ b/packages/ui-mobile-base/project.json @@ -0,0 +1,16 @@ +{ + "root": "packages/ui-mobile-base", + "sourceRoot": "packages/ui-mobile-base", + "projectType": "library", + "generators": {}, + "targets": { + "build": { + "executor": "@nrwl/workspace:run-commands", + "options": { + "commands": ["./build.sh", "cp -R dist/package/platforms/* ../../packages/core/platforms"], + "cwd": "packages/ui-mobile-base", + "parallel": false + } + } + } +} diff --git a/packages/webpack/project.json b/packages/webpack/project.json new file mode 100644 index 000000000..3d87956c2 --- /dev/null +++ b/packages/webpack/project.json @@ -0,0 +1,31 @@ +{ + "root": "packages/webpack", + "sourceRoot": "packages/webpack", + "projectType": "library", + "generators": {}, + "targets": { + "lint": { + "executor": "@nrwl/linter:eslint", + "options": { + "lintFilePatterns": [] + } + }, + "test": { + "executor": "@nrwl/workspace:run-commands", + "options": { + "commands": ["npm run tsc", "npm run jasmine"], + "cwd": "packages/webpack", + "parallel": false + } + }, + "build": { + "executor": "@nrwl/workspace:run-commands", + "outputs": ["dist/packages"], + "options": { + "commands": ["npm run setup", "mkdir -p ../../dist/packages", "mv \"$(npm pack | tail -n 1)\" ../../dist/packages/nativescript-webpack.tgz"], + "cwd": "packages/webpack", + "parallel": false + } + } + } +} diff --git a/packages/webpack5/project.json b/packages/webpack5/project.json new file mode 100644 index 000000000..b83ad29cd --- /dev/null +++ b/packages/webpack5/project.json @@ -0,0 +1,21 @@ +{ + "root": "packages/webpack5", + "sourceRoot": "packages/webpack5", + "projectType": "library", + "generators": {}, + "targets": { + "lint": { + "executor": "@nrwl/linter:eslint", + "options": { + "lintFilePatterns": [] + } + }, + "build": { + "executor": "@nrwl/workspace:run-commands", + "outputs": ["dist/packages"], + "options": { + "command": "npx zx ./tools/scripts/pack-webpack5.mjs" + } + } + } +} diff --git a/tools/scripts/project.json b/tools/scripts/project.json new file mode 100644 index 000000000..a5aa21ebd --- /dev/null +++ b/tools/scripts/project.json @@ -0,0 +1,17 @@ +{ + "root": "tools/scripts", + "sourceRoot": "tools/scripts", + "projectType": "library", + "generators": {}, + "targets": { + "build": { + "executor": "@nrwl/workspace:run-commands", + "outputs": ["tools/scripts/dist"], + "options": { + "commands": ["./build-docs.sh"], + "cwd": "tools/scripts", + "parallel": false + } + } + } +} diff --git a/tools/scripts/tsconfig.typedoc.json b/tools/scripts/tsconfig.typedoc.json index 290e69cf6..1e04a3340 100644 --- a/tools/scripts/tsconfig.typedoc.json +++ b/tools/scripts/tsconfig.typedoc.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "../../dist/packages/core", "target": "es5", diff --git a/tools/tsconfig.tools.json b/tools/tsconfig.tools.json index 82bd1f098..600c137a6 100644 --- a/tools/tsconfig.tools.json +++ b/tools/tsconfig.tools.json @@ -1,11 +1,11 @@ { - "extends": "../tsconfig.json", - "compilerOptions": { - "outDir": "../dist/out-tsc/tools", - "rootDir": ".", - "module": "commonjs", - "target": "es5", - "types": ["node"] - }, - "include": ["**/*.ts"] + "extends": "../tsconfig.base.json", + "compilerOptions": { + "outDir": "../dist/out-tsc/tools", + "rootDir": ".", + "module": "commonjs", + "target": "es5", + "types": ["node"] + }, + "include": ["**/*.ts"] } diff --git a/tsconfig.base.json b/tsconfig.base.json new file mode 100644 index 000000000..b3dfa14cd --- /dev/null +++ b/tsconfig.base.json @@ -0,0 +1,28 @@ +{ + "compileOnSave": false, + "compilerOptions": { + "rootDir": ".", + "target": "ES2017", + "module": "esnext", + "sourceMap": true, + "declaration": true, + "moduleResolution": "node", + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "noEmitOnError": true, + "noEmitHelpers": true, + "diagnostics": true, + "skipLibCheck": true, + "skipDefaultLibCheck": true, + "lib": ["es2017", "dom"], + "types": ["node", "jest"], + "baseUrl": ".", + "paths": { + "@nativescript/core": ["packages/core/index.ts"], + "@nativescript/core/*": ["packages/core/*"], + "@nativescript/types-android": ["packages/types-android/src/index.ts"], + "@nativescript/types-ios": ["packages/types-ios/src/index.ts"] + } + }, + "exclude": ["node_modules", "tmp", "platforms", "__tests__"] +} diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json index 5d8f21e45..6ca1bac23 100644 --- a/tsconfig.eslint.json +++ b/tsconfig.eslint.json @@ -1,4 +1,4 @@ { - "extends": "./tsconfig.json", + "extends": "./tsconfig.base.json", "include": ["packages/**/*"] } diff --git a/tsconfig.json b/tsconfig.json deleted file mode 100644 index 84a284c7c..000000000 --- a/tsconfig.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "compileOnSave": false, - "compilerOptions": { - "rootDir": ".", - "target": "ES2017", - "module": "esnext", - "sourceMap": true, - "declaration": true, - "moduleResolution": "node", - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "noEmitOnError": true, - "noEmitHelpers": true, - "diagnostics": true, - "skipLibCheck": true, - "skipDefaultLibCheck": true, - "lib": ["es2017", "dom"], - "types": ["node", "jest"], - "baseUrl": ".", - "paths": { - "@nativescript/core": ["packages/core/index.ts"], - "@nativescript/core/*": ["packages/core/*"], - "@nativescript/types-ios": ["packages/types-ios/src/index.ts"], - "@nativescript/types-android": ["packages/types-android/src/index.ts"] - } - }, - "exclude": ["node_modules", "tmp", "platforms", "__tests__"] -} diff --git a/workspace.json b/workspace.json index 83b3140c9..528c22834 100644 --- a/workspace.json +++ b/workspace.json @@ -1,350 +1,16 @@ { - "version": 1, + "version": 2, "projects": { - "apps-automated": { - "root": "apps/automated/", - "sourceRoot": "apps/automated/app", - "projectType": "application", - "prefix": "nativescript", - "architect": { - "ios": { - "builder": "@nrwl/workspace:run-commands", - "options": { - "commands": ["ns debug ios --no-hmr --emulator --env.testing"], - "cwd": "apps/automated", - "parallel": false - } - }, - "android": { - "builder": "@nrwl/workspace:run-commands", - "options": { - "commands": ["ns debug android --no-hmr --emulator --env.testing"], - "cwd": "apps/automated", - "parallel": false - } - }, - "clean": { - "builder": "@nrwl/workspace:run-commands", - "options": { - "commands": ["npx rimraf -- hooks node_modules platforms package-lock.json", "npm i --legacy-peer-deps", "npx rimraf -- package-lock.json"], - "cwd": "apps/automated", - "parallel": false - } - } - } - }, - "apps-toolbox": { - "root": "apps/toolbox/", - "sourceRoot": "apps/toolbox/src", - "projectType": "application", - "prefix": "nativescript", - "architect": { - "ios": { - "builder": "@nrwl/workspace:run-commands", - "options": { - "commands": ["ns debug ios --no-hmr --emulator --env.testing"], - "cwd": "apps/toolbox", - "parallel": false - } - }, - "android": { - "builder": "@nrwl/workspace:run-commands", - "options": { - "commands": ["ns debug android --no-hmr --emulator --env.testing"], - "cwd": "apps/toolbox", - "parallel": false - } - }, - "clean": { - "builder": "@nrwl/workspace:run-commands", - "options": { - "commands": ["npx rimraf -- hooks node_modules platforms package-lock.json", "npm i --legacy-peer-deps", "npx rimraf -- package-lock.json"], - "cwd": "apps/toolbox", - "parallel": false - } - } - } - }, - "apps-ui": { - "root": "apps/ui/", - "sourceRoot": "apps/ui/src", - "projectType": "application", - "prefix": "nativescript", - "architect": { - "ios": { - "builder": "@nrwl/workspace:run-commands", - "options": { - "commands": ["ns debug ios --no-hmr --emulator --env.testing"], - "cwd": "apps/ui", - "parallel": false - } - }, - "android": { - "builder": "@nrwl/workspace:run-commands", - "options": { - "commands": ["ns debug android --no-hmr --emulator --env.testing"], - "cwd": "apps/ui", - "parallel": false - } - }, - "clean": { - "builder": "@nrwl/workspace:run-commands", - "options": { - "commands": ["npx rimraf -- hooks node_modules platforms package-lock.json", "npm i --legacy-peer-deps", "npx rimraf -- package-lock.json"], - "cwd": "apps/ui", - "parallel": false - } - } - } - }, - "core": { - "root": "packages/core", - "sourceRoot": "packages/core", - "projectType": "library", - "schematics": {}, - "architect": { - "lint": { - "builder": "@nrwl/linter:eslint", - "options": { - "lintFilePatterns": ["packages/core/**/*.ts", "packages/core/references.d.ts", "packages/core/**/*.spec.ts", "packages/core/**/*.spec.tsx", "packages/core/**/*.spec.js", "packages/core/**/*.spec.jsx", "packages/core/**/*.d.ts"] - } - }, - "test": { - "builder": "@nrwl/jest:jest", - "options": { - "jestConfig": "packages/core/jest.config.js", - "passWithNoTests": true - }, - "outputs": ["coverage/packages/core"] - }, - "build": { - "builder": "@nrwl/workspace:run-commands", - "outputs": ["dist/packages"], - "options": { - "commands": [ - "npx rimraf dist/packages/core", - "./node_modules/.bin/tsc -p packages/core/tsconfig.lib.json", - "./node_modules/.bin/copyfiles -e \"packages/core/__tests__/**/*\" \"packages/core/**/*.d.ts\" dist && ./node_modules/.bin/copyfiles -e \"packages/core/__tests__/**/*\" \"packages/core/js-libs/**/*\" dist && ./node_modules/.bin/copyfiles -e \"packages/core/__tests__/**/*\" \"packages/core/cli-hooks/**/*.js\" dist && ./node_modules/.bin/copyfiles -e \"packages/core/__tests__/**/*\" \"packages/core/platforms/**/*\" dist && ./node_modules/.bin/copyfiles -e \"packages/core/__tests__/**/*\" \"packages/core/fetch/**/*\" dist && ./node_modules/.bin/copyfiles -e \"packages/core/__tests__/**/*\" \"packages/core/css/**/*\" dist && ./node_modules/.bin/copyfiles -e \"packages/core/__tests__/**/*\" \"packages/core/css-value/**/*\" dist", - "cp packages/core/package.json dist/packages/core", - "cp packages/core/README.md dist/packages/core", - "cp LICENSE dist/packages/core", - "cd dist/packages/core && npm pack && mv *.tgz .." - ], - "cwd": ".", - "parallel": false - } - }, - "unit": { - "builder": "@nrwl/workspace:run-commands", - "options": { - "commands": ["../../../node_modules/.bin/tsc -p tsconfig.json && ../../../node_modules/.bin/mocha --config=.mocharc.yml"], - "cwd": "packages/core/__tests__", - "parallel": false - } - }, - "unit.watch": { - "builder": "@nrwl/workspace:run-commands", - "options": { - "commands": ["../../../node_modules/.bin/tsc -p tsconfig.json && ../../../node_modules/.bin/mocha --watch --config=.mocharc.yml"], - "cwd": "packages/core/__tests__", - "parallel": false - } - } - } - }, - "core-api-docs": { - "root": "tools/scripts", - "sourceRoot": "tools/scripts", - "projectType": "library", - "schematics": {}, - "architect": { - "build": { - "builder": "@nrwl/workspace:run-commands", - "outputs": ["tools/scripts/dist"], - "options": { - "commands": ["./build-docs.sh"], - "cwd": "tools/scripts", - "parallel": false - } - } - } - }, - "types": { - "root": "packages/types", - "sourceRoot": "packages/types", - "projectType": "library", - "schematics": {}, - "architect": { - "build": { - "builder": "@nrwl/workspace:run-commands", - "outputs": ["dist/packages"], - "options": { - "commands": ["mkdir -p ../../dist/packages/types", "cp -R * ../../dist/packages/types"], - "cwd": "packages/types", - "parallel": false - } - } - } - }, - "types-ios": { - "root": "packages/types-ios", - "sourceRoot": "packages/types-ios/src", - "projectType": "library", - "schematics": {}, - "architect": { - "build": { - "builder": "@nrwl/workspace:run-commands", - "outputs": ["dist/packages"], - "options": { - "commands": ["./tools/scripts/typings-gen.sh latest", "mkdir -p dist/packages/types-ios", "cp -R packages/types-ios/src/* dist/packages/types-ios", "cp packages/types-ios/package.json dist/packages/types-ios", "cp packages/types-ios/README.md dist/packages/types-ios/README.md"], - "parallel": false - } - } - } - }, - "types-android": { - "root": "packages/types-android", - "sourceRoot": "packages/types-android/src", - "projectType": "library", - "schematics": {}, - "architect": { - "build": { - "builder": "@nrwl/workspace:run-commands", - "outputs": ["dist/packages"], - "options": { - "commands": ["mkdir -p ../../dist/packages/types-android", "cp -R src/* ../../dist/packages/types-android", "cp package.json *.md ../../dist/packages/types-android"], - "cwd": "packages/types-android", - "parallel": false - } - } - } - }, - "ui-mobile-base": { - "root": "packages/ui-mobile-base", - "sourceRoot": "packages/ui-mobile-base", - "projectType": "library", - "schematics": {}, - "architect": { - "build": { - "builder": "@nrwl/workspace:run-commands", - "options": { - "commands": ["./build.sh", "cp -R dist/package/platforms/* ../../packages/core/platforms"], - "cwd": "packages/ui-mobile-base", - "parallel": false - } - } - } - }, - "webpack": { - "root": "packages/webpack", - "sourceRoot": "packages/webpack", - "projectType": "library", - "schematics": {}, - "architect": { - "lint": { - "builder": "@nrwl/linter:eslint", - "options": { - "lintFilePatterns": [] - } - }, - "test": { - "builder": "@nrwl/workspace:run-commands", - "options": { - "commands": ["npm run tsc", "npm run jasmine"], - "cwd": "packages/webpack", - "parallel": false - } - }, - "build": { - "builder": "@nrwl/workspace:run-commands", - "outputs": ["dist/packages"], - "options": { - "commands": ["npm run setup", "mkdir -p ../../dist/packages", "mv \"$(npm pack | tail -n 1)\" ../../dist/packages/nativescript-webpack.tgz"], - "cwd": "packages/webpack", - "parallel": false - } - } - } - }, - "webpack5": { - "root": "packages/webpack5", - "sourceRoot": "packages/webpack5", - "projectType": "library", - "schematics": {}, - "architect": { - "lint": { - "builder": "@nrwl/linter:eslint", - "options": { - "lintFilePatterns": [] - } - }, - "build": { - "builder": "@nrwl/workspace:run-commands", - "outputs": ["dist/packages"], - "options": { - "command": "npx zx ./tools/scripts/pack-webpack5.mjs" - } - } - } - } - }, - "cli": { - "defaultCollection": "@nrwl/workspace" - }, - "schematics": { - "@nrwl/workspace": { - "library": { - "linter": "eslint" - } - }, - "@nrwl/cypress": { - "cypress-project": { - "linter": "eslint" - } - }, - "@nrwl/react": { - "application": { - "linter": "eslint" - }, - "library": { - "linter": "eslint" - } - }, - "@nrwl/next": { - "application": { - "linter": "eslint" - } - }, - "@nrwl/web": { - "application": { - "linter": "eslint" - } - }, - "@nrwl/node": { - "application": { - "linter": "eslint" - }, - "library": { - "linter": "eslint" - } - }, - "@nrwl/nx-plugin": { - "plugin": { - "linter": "eslint" - } - }, - "@nrwl/nest": { - "application": { - "linter": "eslint" - } - }, - "@nrwl/express": { - "application": { - "linter": "eslint" - }, - "library": { - "linter": "eslint" - } - } + "apps-automated": "apps/automated", + "apps-toolbox": "apps/toolbox", + "apps-ui": "apps/ui", + "core": "packages/core", + "core-api-docs": "tools/scripts", + "types": "packages/types", + "types-android": "packages/types-android", + "types-ios": "packages/types-ios", + "ui-mobile-base": "packages/ui-mobile-base", + "webpack": "packages/webpack", + "webpack5": "packages/webpack5" } }