mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-23 02:41:50 +03:00
Added defaults to Nx build step
refs https://github.com/TryGhost/DevOps/issues/122 - this allows us to DRY up some of the other configuration we have dotted around and fixes a niche bug with overlapping builds that we were seeing before, because Nx should only allow one build at a time
This commit is contained in:
parent
efec8b5fba
commit
a9c9202b5c
4
.github/scripts/dev.js
vendored
4
.github/scripts/dev.js
vendored
@ -55,13 +55,13 @@ const adminXApps = '@tryghost/admin-x-demo,@tryghost/admin-x-settings';
|
||||
|
||||
const COMMANDS_ADMINX = [{
|
||||
name: 'adminXDeps',
|
||||
command: 'while [ 1 ]; do nx watch --projects=apps/admin-x-design-system,apps/admin-x-framework -- nx run \\$NX_PROJECT_NAME:build --skip-nx-cache; done',
|
||||
command: 'while [ 1 ]; do nx watch --projects=apps/admin-x-design-system,apps/admin-x-framework -- nx run \\$NX_PROJECT_NAME:build; done',
|
||||
cwd: path.resolve(__dirname, '../..'),
|
||||
prefixColor: '#C35831',
|
||||
env: {}
|
||||
}, {
|
||||
name: 'adminX',
|
||||
command: `nx run-many --projects=${adminXApps} --targets=build && nx run-many --projects=${adminXApps} --parallel=${adminXApps.length} --targets=dev`,
|
||||
command: `nx run-many --projects=${adminXApps} --parallel=${adminXApps.length} --targets=dev`,
|
||||
cwd: path.resolve(__dirname, '../../apps/admin-x-settings'),
|
||||
prefixColor: '#C35831',
|
||||
env: {}
|
||||
|
@ -25,7 +25,7 @@
|
||||
"lint": "yarn run lint:code && yarn run lint:test",
|
||||
"lint:code": "eslint --ext .js,.ts,.cjs,.tsx --cache src",
|
||||
"lint:test": "eslint -c test/.eslintrc.cjs --ext .js,.ts,.cjs,.tsx --cache test",
|
||||
"test:unit": "yarn nx build && vitest run",
|
||||
"test:unit": "vitest run",
|
||||
"test:acceptance": "NODE_OPTIONS='--experimental-specifier-resolution=node --no-warnings' VITE_TEST=true playwright test",
|
||||
"test:acceptance:slowmo": "TIMEOUT=100000 PLAYWRIGHT_SLOWMO=100 yarn test:acceptance --headed",
|
||||
"test:acceptance:full": "ALL_BROWSERS=1 yarn test:acceptance",
|
||||
@ -42,28 +42,19 @@
|
||||
},
|
||||
"nx": {
|
||||
"targets": {
|
||||
"build": {
|
||||
"dev": {
|
||||
"dependsOn": [
|
||||
"build",
|
||||
{
|
||||
"projects": [
|
||||
"@tryghost/admin-x-design-system",
|
||||
"@tryghost/admin-x-framework"
|
||||
],
|
||||
"target": "build"
|
||||
}
|
||||
"^build"
|
||||
]
|
||||
},
|
||||
"test:unit": {
|
||||
"dependsOn": [
|
||||
"^build"
|
||||
]
|
||||
},
|
||||
"test:acceptance": {
|
||||
"dependsOn": [
|
||||
"test:acceptance",
|
||||
{
|
||||
"projects": [
|
||||
"@tryghost/admin-x-design-system",
|
||||
"@tryghost/admin-x-framework"
|
||||
],
|
||||
"target": "build"
|
||||
}
|
||||
"^build"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -100,16 +100,15 @@
|
||||
},
|
||||
"nx": {
|
||||
"targets": {
|
||||
"build": {
|
||||
"dev": {
|
||||
"dependsOn": [
|
||||
"build",
|
||||
{"projects": ["@tryghost/admin-x-design-system"], "target": "build"}
|
||||
"^build"
|
||||
]
|
||||
},
|
||||
"test:unit": {
|
||||
"dependsOn": [
|
||||
"test:unit",
|
||||
{"projects": ["@tryghost/admin-x-design-system"], "target": "build"}
|
||||
"^build"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -66,28 +66,15 @@
|
||||
},
|
||||
"nx": {
|
||||
"targets": {
|
||||
"build": {
|
||||
"dev": {
|
||||
"dependsOn": [
|
||||
"build",
|
||||
{
|
||||
"projects": [
|
||||
"@tryghost/admin-x-design-system",
|
||||
"@tryghost/admin-x-framework"
|
||||
],
|
||||
"target": "build"
|
||||
}
|
||||
"^build"
|
||||
]
|
||||
},
|
||||
"test:acceptance": {
|
||||
"dependsOn": [
|
||||
"test:acceptance",
|
||||
{
|
||||
"projects": [
|
||||
"@tryghost/admin-x-design-system",
|
||||
"@tryghost/admin-x-framework"
|
||||
],
|
||||
"target": "build"
|
||||
}
|
||||
"^build"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user