mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
chore: nx migrate latest (#9709)
This commit is contained in:
@@ -7,4 +7,7 @@ export default {
|
||||
android: {
|
||||
v8Flags: '--expose_gc',
|
||||
},
|
||||
cli: {
|
||||
packageManager: 'npm',
|
||||
},
|
||||
} as NativeScriptConfig;
|
||||
|
||||
42
apps/automated/project.json
Normal file
42
apps/automated/project.json
Normal file
@@ -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"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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/*"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,4 +8,7 @@ export default {
|
||||
v8Flags: '--expose_gc',
|
||||
suppressCallJSMethodExceptions: false,
|
||||
},
|
||||
cli: {
|
||||
packageManager: 'npm',
|
||||
},
|
||||
} as NativeScriptConfig;
|
||||
|
||||
42
apps/toolbox/project.json
Normal file
42
apps/toolbox/project.json
Normal file
@@ -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"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"diagnostics": false,
|
||||
"paths": {
|
||||
"~/*": ["src/*"]
|
||||
}
|
||||
}
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"diagnostics": false,
|
||||
"paths": {
|
||||
"~/*": ["src/*"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,4 +7,7 @@ export default {
|
||||
android: {
|
||||
v8Flags: '--expose_gc',
|
||||
},
|
||||
cli: {
|
||||
packageManager: 'npm',
|
||||
},
|
||||
} as NativeScriptConfig;
|
||||
|
||||
42
apps/ui/project.json
Normal file
42
apps/ui/project.json
Normal file
@@ -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"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"diagnostics": false,
|
||||
"paths": {
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
module.exports = {
|
||||
projects: ['<rootDir>/packages/core'],
|
||||
};
|
||||
const { getJestProjects } = require('@nrwl/jest');
|
||||
|
||||
module.exports = { projects: getJestProjects() };
|
||||
|
||||
85
nx.json
85
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"
|
||||
}
|
||||
}
|
||||
|
||||
30
package.json
30
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 @@
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
55
packages/core/project.json
Normal file
55
packages/core/project.json
Normal file
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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__"]
|
||||
}
|
||||
|
||||
@@ -22,6 +22,6 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"exclude": ["**/*.spec.ts", "dist", "__tests__"],
|
||||
"exclude": ["**/*.spec.ts", "**/*.test.ts", "dist", "__tests__"],
|
||||
"include": ["**/*.ts", "./references.d.ts"]
|
||||
}
|
||||
|
||||
@@ -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"]
|
||||
}
|
||||
|
||||
17
packages/types-android/project.json
Normal file
17
packages/types-android/project.json
Normal file
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
16
packages/types-ios/project.json
Normal file
16
packages/types-ios/project.json
Normal file
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
17
packages/types/project.json
Normal file
17
packages/types/project.json
Normal file
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
16
packages/ui-mobile-base/project.json
Normal file
16
packages/ui-mobile-base/project.json
Normal file
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
31
packages/webpack/project.json
Normal file
31
packages/webpack/project.json
Normal file
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
21
packages/webpack5/project.json
Normal file
21
packages/webpack5/project.json
Normal file
@@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
17
tools/scripts/project.json
Normal file
17
tools/scripts/project.json
Normal file
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../dist/packages/core",
|
||||
"target": "es5",
|
||||
|
||||
@@ -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"]
|
||||
}
|
||||
|
||||
28
tsconfig.base.json
Normal file
28
tsconfig.base.json
Normal file
@@ -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__"]
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"extends": "./tsconfig.base.json",
|
||||
"include": ["packages/**/*"]
|
||||
}
|
||||
|
||||
@@ -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__"]
|
||||
}
|
||||
358
workspace.json
358
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"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user