mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[AAE-11255] adf-cli - Get rid of the build-testing and call copydist when needed (#7933)
* Get rid of the build-testing and call copydist when needed * Use the relative path instead of node_modules and avoid to build cli/testing in the before e2e * Try to build cli and testing as part of install * Build cli and testing before e2e * Copy cli bundle under dist * Copy cli bundle under dist * Copy testing into node_modules to fix protractor.js * Created a bundle target to handle build and move of cli/testing * Change from build target to something custom to avoid to exclude the packages * Remove the build-testing.sh script
This commit is contained in:
93
angular.json
93
angular.json
@@ -812,7 +812,7 @@
|
||||
"projectType": "library",
|
||||
"prefix": "adf",
|
||||
"architect": {
|
||||
"build": {
|
||||
"build-local": {
|
||||
"builder": "@nrwl/node:webpack",
|
||||
"options": {
|
||||
"projectRoot": "lib/testing",
|
||||
@@ -846,15 +846,34 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"copydist": {
|
||||
"bundle": {
|
||||
"executor": "nx:run-commands",
|
||||
"options": {
|
||||
"commands": [
|
||||
{
|
||||
"command": "rm -rf ./node_modules/@alfresco/adf-testing/ && mkdir -p ./node_modules/@alfresco/adf-testing/ && cp -R ./dist/libs/testing/* ./node_modules/@alfresco/adf-testing/"
|
||||
}
|
||||
]
|
||||
}
|
||||
"options": {
|
||||
"commands": [
|
||||
{
|
||||
"command": "echo testing bundle created"
|
||||
}
|
||||
]
|
||||
},
|
||||
"dependsOn": [
|
||||
"copyToNodeModules"
|
||||
]
|
||||
},
|
||||
"copyToNodeModules": {
|
||||
"executor": "nx:run-commands",
|
||||
"options": {
|
||||
"commands": [
|
||||
{
|
||||
"command": "rm -rf ./node_modules/@alfresco/adf-testing/ && mkdir -p ./node_modules/@alfresco/adf-testing/ && cp -R ./dist/libs/testing/* ./node_modules/@alfresco/adf-testing/"
|
||||
}
|
||||
]
|
||||
},
|
||||
"dependsOn": [
|
||||
{
|
||||
"projects": "self",
|
||||
"target": "build-local"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -864,11 +883,11 @@
|
||||
"projectType": "library",
|
||||
"prefix": "adf",
|
||||
"architect": {
|
||||
"build": {
|
||||
"build-local": {
|
||||
"builder": "@nrwl/workspace:run-commands",
|
||||
"options": {
|
||||
"commands": [
|
||||
"cd lib/cli && npm i && npm run dist && nx run cli:copydist"
|
||||
"cd lib/cli && npm i && npm run dist"
|
||||
]
|
||||
},
|
||||
"configurations": {
|
||||
@@ -877,6 +896,48 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"bundle": {
|
||||
"executor": "nx:run-commands",
|
||||
"options": {
|
||||
"commands": [
|
||||
{
|
||||
"command": "echo cli bundle created"
|
||||
}
|
||||
]
|
||||
},
|
||||
"dependsOn": [
|
||||
"copyToNodeModules"
|
||||
]
|
||||
},
|
||||
"moveToDist": {
|
||||
"executor": "nx:run-commands",
|
||||
"options": {
|
||||
"commands": [
|
||||
{
|
||||
"command": "mkdir -p ./dist/libs/cli && cp -R ./lib/cli/dist/* dist/libs/cli/"
|
||||
}
|
||||
]
|
||||
},
|
||||
"dependsOn": [
|
||||
{
|
||||
"projects": "self",
|
||||
"target": "build-local"
|
||||
}
|
||||
]
|
||||
},
|
||||
"copyToNodeModules": {
|
||||
"executor": "nx:run-commands",
|
||||
"options": {
|
||||
"commands": [
|
||||
{
|
||||
"command": "rm -rf ./node_modules/@alfresco/adf-cli/ && mkdir -p ./node_modules/@alfresco/adf-cli/ && cp -R ./dist/libs/cli/* ./node_modules/@alfresco/adf-cli/"
|
||||
}
|
||||
]
|
||||
},
|
||||
"dependsOn": [
|
||||
"moveToDist"
|
||||
]
|
||||
},
|
||||
"lint": {
|
||||
"builder": "@nrwl/linter:eslint",
|
||||
"options": {
|
||||
@@ -885,16 +946,6 @@
|
||||
"lib/cli/**/*.html"
|
||||
]
|
||||
}
|
||||
},
|
||||
"copydist": {
|
||||
"executor": "nx:run-commands",
|
||||
"options": {
|
||||
"commands": [
|
||||
{
|
||||
"command": "cp -R ./lib/cli/dist dist/libs/cli/ && rm -rf ./node_modules/@alfresco/adf-cli/ && mkdir -p ./node_modules/@alfresco/adf-cli/ && cp -R ./dist/libs/cli/* ./node_modules/@alfresco/adf-cli/"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Reference in New Issue
Block a user