mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-14 01:43:14 +08:00
chore: nx-cloud setup (#10110)
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@ -43,6 +43,7 @@ apps/**/*/platforms
|
||||
apps/**/*/webpack.*.js
|
||||
*.tgz
|
||||
.npmrc
|
||||
**/**/*.log
|
||||
|
||||
# System Files
|
||||
.DS_Store
|
||||
|
@ -4,6 +4,10 @@
|
||||
"sourceRoot": "apps/automated/app",
|
||||
"projectType": "application",
|
||||
"prefix": "nativescript",
|
||||
"namedInputs": {
|
||||
"default": ["{projectRoot}/**/*"],
|
||||
"production": ["!{projectRoot}/**/*.spec.ts"]
|
||||
},
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nativescript/nx:build",
|
||||
@ -17,6 +21,8 @@
|
||||
},
|
||||
"ios": {
|
||||
"executor": "@nativescript/nx:build",
|
||||
"inputs": ["default", "^production"],
|
||||
"outputs": [],
|
||||
"options": {
|
||||
"noHmr": true,
|
||||
"platform": "ios"
|
||||
@ -24,6 +30,8 @@
|
||||
},
|
||||
"android": {
|
||||
"executor": "@nativescript/nx:build",
|
||||
"inputs": ["default", "^production"],
|
||||
"outputs": [],
|
||||
"options": {
|
||||
"noHmr": true,
|
||||
"platform": "android"
|
||||
|
@ -4,6 +4,10 @@
|
||||
"sourceRoot": "apps/toolbox/src",
|
||||
"projectType": "application",
|
||||
"prefix": "nativescript",
|
||||
"namedInputs": {
|
||||
"default": ["{projectRoot}/**/*"],
|
||||
"production": ["!{projectRoot}/**/*.spec.ts"]
|
||||
},
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nativescript/nx:build",
|
||||
@ -17,6 +21,8 @@
|
||||
},
|
||||
"ios": {
|
||||
"executor": "@nativescript/nx:build",
|
||||
"inputs": ["default", "^production"],
|
||||
"outputs": [],
|
||||
"options": {
|
||||
"platform": "ios",
|
||||
"noHmr": true
|
||||
@ -24,6 +30,8 @@
|
||||
},
|
||||
"android": {
|
||||
"executor": "@nativescript/nx:build",
|
||||
"inputs": ["default", "^production"],
|
||||
"outputs": [],
|
||||
"options": {
|
||||
"platform": "android",
|
||||
"noHmr": true
|
||||
|
@ -4,6 +4,10 @@
|
||||
"sourceRoot": "apps/ui/src",
|
||||
"projectType": "application",
|
||||
"prefix": "nativescript",
|
||||
"namedInputs": {
|
||||
"default": ["{projectRoot}/**/*"],
|
||||
"production": ["!{projectRoot}/**/*.spec.ts"]
|
||||
},
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nativescript/nx:build",
|
||||
@ -17,6 +21,8 @@
|
||||
},
|
||||
"ios": {
|
||||
"executor": "@nativescript/nx:build",
|
||||
"inputs": ["default", "^production"],
|
||||
"outputs": [],
|
||||
"options": {
|
||||
"platform": "ios",
|
||||
"noHmr": true
|
||||
@ -24,6 +30,8 @@
|
||||
},
|
||||
"android": {
|
||||
"executor": "@nativescript/nx:build",
|
||||
"inputs": ["default", "^production"],
|
||||
"outputs": [],
|
||||
"options": {
|
||||
"platform": "android",
|
||||
"noHmr": true
|
||||
|
7
nx.json
7
nx.json
@ -6,13 +6,14 @@
|
||||
},
|
||||
"tasksRunnerOptions": {
|
||||
"default": {
|
||||
"runner": "nx/tasks-runners/default",
|
||||
"runner": "@nrwl/nx-cloud",
|
||||
"options": {
|
||||
"useDaemonProcess": false,
|
||||
"cacheableOperations": ["build", "lint", "test", "e2e"],
|
||||
"cacheableOperations": ["build", "lint", "test", "ios", "android", "e2e"],
|
||||
"canTrackAnalytics": false,
|
||||
"showUsageWarnings": true,
|
||||
"parallel": 1
|
||||
"parallel": 1,
|
||||
"accessToken": "NzRmNDM3NDgtZjlmNy00MTUwLWIxZDktYjJlZTRhMWM5ODY3fHJlYWQtd3JpdGU="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -18,11 +18,12 @@
|
||||
"url": "https://github.com/NativeScript/NativeScript.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nrwl/nx-cloud": "^15.0.2",
|
||||
"nativescript-theme-core": "^1.0.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nativescript/hook": "^2.0.0",
|
||||
"@nativescript/nx": "~4.0.0",
|
||||
"@nativescript/nx": "~4.1.0",
|
||||
"@nrwl/cli": "15.2.1",
|
||||
"@nrwl/eslint-plugin-nx": "15.2.1",
|
||||
"@nrwl/jest": "15.2.1",
|
||||
@ -54,6 +55,7 @@
|
||||
"module-alias": "^2.2.2",
|
||||
"nativescript": "~8.3.0",
|
||||
"nativescript-typedoc-theme": "1.1.0",
|
||||
"nx": "15.2.1",
|
||||
"parse-css": "git+https://github.com/tabatkins/parse-css.git",
|
||||
"parserlib": "^1.1.1",
|
||||
"prettier": "^2.6.2",
|
||||
@ -69,8 +71,7 @@
|
||||
"tslint-to-eslint-config": "^2.13.0",
|
||||
"typedoc": "^0.22.17",
|
||||
"typescript": "4.8.4",
|
||||
"zx": "^7.0.5",
|
||||
"nx": "15.2.1"
|
||||
"zx": "^7.0.5"
|
||||
},
|
||||
"lint-staged": {
|
||||
"**/*": [
|
||||
@ -78,4 +79,3 @@
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4,6 +4,10 @@
|
||||
"sourceRoot": "packages/core",
|
||||
"projectType": "library",
|
||||
"generators": {},
|
||||
"namedInputs": {
|
||||
"default": ["{projectRoot}/**/*"],
|
||||
"production": ["!{projectRoot}/**/*.spec.ts"]
|
||||
},
|
||||
"targets": {
|
||||
"lint": {
|
||||
"executor": "@nrwl/linter:eslint",
|
||||
@ -13,6 +17,8 @@
|
||||
},
|
||||
"test": {
|
||||
"executor": "@nrwl/jest:jest",
|
||||
"inputs": ["default", "^production"],
|
||||
"outputs": ["dist/out-tsc"],
|
||||
"options": {
|
||||
"jestConfig": "packages/core/jest.config.ts",
|
||||
"passWithNoTests": true,
|
||||
@ -22,11 +28,11 @@
|
||||
"ci": {
|
||||
"ci": true
|
||||
}
|
||||
},
|
||||
"outputs": ["{workspaceRoot}/coverage/packages/core"]
|
||||
}
|
||||
},
|
||||
"build": {
|
||||
"executor": "nx:run-commands",
|
||||
"inputs": ["default", "^production"],
|
||||
"outputs": ["{workspaceRoot}/dist/packages"],
|
||||
"options": {
|
||||
"commands": [
|
||||
|
@ -11,13 +11,11 @@ const TIMEOUT_MS = 5 * 60 * 1000; // 5 minutes
|
||||
|
||||
const platform = process.argv[2];
|
||||
const spawned_process = spawn(
|
||||
"ns",
|
||||
"npx",
|
||||
[
|
||||
"--path=./apps/automated",
|
||||
"nx",
|
||||
"run",
|
||||
platform,
|
||||
"--no-hmr",
|
||||
"--force",
|
||||
`apps-automated:${platform}`,
|
||||
// "--log=trace",
|
||||
"--timeout=600" // 10 minutes, booting avds on CI is very slow...
|
||||
],
|
||||
|
Reference in New Issue
Block a user