[ACS-4534] nx workspace support for aca (#3143)

* ACS-4534 Added nx workspace support

* ACS-4534 Updated package-lock.json file

* ACS-4534 Configured cache directory and affected command

* ACS-4534 Updated README

* ACS-4534 Updated more README files

* ACS-4534 Fixed lint

* ACS-4534 Address comment for readme

* ACS-4534 Removed redundant build-libs script

* ACS-4534 Fixed start script

* ACS-4534 Updated some left documentation

* ACS-4534 Added more helper scripts, addressed PR comments

* ACS-4534 Updated package-lock.json after rebasing

* ACS-4534 Fix stylelint issue
This commit is contained in:
AleksanderSklorz 2023-04-25 15:34:34 +02:00 committed by GitHub
parent ef5cbb07d0
commit e9bc42df10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
32 changed files with 9029 additions and 7777 deletions

View File

@ -38,7 +38,7 @@ runs:
- name: Build Libraries
shell: bash
run: npm ci && npm run build-libs
run: npm ci && npm run build
- uses: actions/setup-node@v3
name: setup GH registry

View File

@ -39,7 +39,7 @@ runs:
echo "APP_CONFIG_OAUTH2_REDIRECT_SILENT_IFRAME_URI={protocol}//{hostname}{:port}/assets/silent-refresh.html"
} >> .env
npm start > /dev/null &\
npm start content-ce > /dev/null &\
if [ ${{ inputs.test-runner }} == "playwright" ]; then
echo "Running playwright tests with options ${{ inputs.options }}"

1
.gitignore vendored
View File

@ -6,6 +6,7 @@
/.tmp
/app/.tmp
/out-tsc
/nxcache
# dependencies
/node_modules

View File

@ -6,6 +6,8 @@
"davidanson.vscode-markdownlint",
"esbenp.prettier-vscode",
"eamodio.gitlens",
"stylelint.vscode-stylelint"
"stylelint.vscode-stylelint",
"nrwl.angular-console",
"dbaeumer.vscode-eslint"
]
}

View File

@ -65,10 +65,10 @@ Changing the ADF code results in the recompilation and hot-reloading of the ACA
## Unit Tests
Use standard Angular CLI commands to test the projects:
Use following command to test the projects:
```sh
ng test <project>
nx test <project>
```
### Code Coverage
@ -80,7 +80,7 @@ You can view HTML reports in the `./coverage/<project>` folder.
When working with unit testing and code coverage improvement, you can run unit tests in the "live reload" mode:
```sh
ng test <project> --watch
nx test <project> -- --watch
```
Upon changing unit tests code, you can track the coverage results either in the console output, or by reloading the HTML report in the browser.

View File

@ -1,685 +0,0 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"content-ce": {
"root": "app",
"sourceRoot": "app/src",
"projectType": "application",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/content-ce",
"index": "app/src/index.html",
"main": "app/src/main.ts",
"tsConfig": "app/tsconfig.app.json",
"polyfills": "app/src/polyfills.ts",
"allowedCommonJsDependencies": [
"moment-es6",
"minimatch",
"moment",
"cropperjs"
],
"stylePreprocessorOptions": {
"includePaths": [
"projects/aca-content/src/lib/ui",
"node_modules"
]
},
"assets": [
{
"glob": "LICENSE",
"input": ".",
"output": "/"
},
"app/src/assets",
"app/src/favicon-96x96.png",
{
"input": "app/.tmp",
"output": "/",
"glob": "app.config.json"
},
{
"glob": "**/*",
"input": "node_modules/@alfresco/adf-core/bundles/assets",
"output": "/assets"
},
{
"glob": "**/*",
"input": "node_modules/@alfresco/adf-content-services/bundles/assets",
"output": "/assets"
},
{
"glob": "pdf.worker.min.js",
"input": "node_modules/pdfjs-dist/build",
"output": "/"
},
{
"glob": "extension.schema.json",
"input": ".",
"output": "./assets"
},
{
"glob": "**/*",
"input": "node_modules/@alfresco/adf-office-services-ext/assets",
"output": "./assets/adf-office-services-ext"
},
{
"glob": "**/*",
"input": "projects/adf-office-services-ext/assets",
"output": "./assets/adf-office-services-ext"
},
{
"glob": "aos.plugin.json",
"input": "projects/adf-office-services-ext/assets",
"output": "./assets/plugins"
},
{
"glob": "about.plugin.json",
"input": "projects/aca-about/assets",
"output": "./assets/plugins"
},
{
"glob": "folder-rules.plugin.json",
"input": "projects/aca-folder-rules/assets",
"output": "./assets/plugins"
},
{
"glob": "**/*",
"input": "projects/aca-folder-rules/assets",
"output": "./assets/aca-folder-rules"
},
{
"glob": "**/*",
"input": "projects/aca-content/assets",
"output": "./assets"
}
],
"styles": [
"app/src/assets/fonts/material-icons/material-icons.css",
"app/src/assets/fonts/OpenSans/OpenSans.css",
"node_modules/cropperjs/dist/cropper.min.css",
"node_modules/pdfjs-dist/web/pdf_viewer.css",
"projects/aca-content/src/lib/ui/application.scss",
"app/src/styles.scss"
],
"scripts": [
"node_modules/pdfjs-dist/build/pdf.js",
"node_modules/pdfjs-dist/web/pdf_viewer.js",
"node_modules/moment/min/moment.min.js"
],
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
},
"configurations": {
"production": {
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"fileReplacements": [
{
"replace": "app/src/environments/environment.ts",
"with": "app/src/environments/environment.prod.ts"
}
],
"budgets": [
{
"type": "bundle",
"name": "main",
"maximumWarning": "2mb",
"maximumError": "5mb"
},
{
"type": "bundle",
"name": "vendor",
"maximumWarning": "10mb",
"maximumError": "15mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
]
},
"release": {
"fileReplacements": [
{
"replace": "app/src/environments/environment.ts",
"with": "app/src/environments/environment.release.ts"
}
]
},
"e2e": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"fileReplacements": [
{
"replace": "app/src/environments/environment.ts",
"with": "app/src/environments/environment.e2e.ts"
}
]
},
"adf": {
"tsConfig": "app/tsconfig.app.adf.json",
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
},
"adfprod": {
"tsConfig": "app/tsconfig.app.adf.json",
"outputHashing": "all",
"fileReplacements": [
{
"replace": "app/src/environments/environment.ts",
"with": "app/src/environments/environment.prod.ts"
}
]
}
},
"defaultConfiguration": ""
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "content-ce:build",
"port": 4200,
"disableHostCheck": true,
"open": true,
"proxyConfig": "app/proxy.conf.js"
},
"configurations": {
"production": {
"browserTarget": "content-ce:build:production"
},
"e2e": {
"browserTarget": "content-ce:build:e2e"
},
"release": {
"browserTarget": "content-ce:build:release"
},
"adf": {
"browserTarget": "content-ce:build:adf"
}
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "app/src/test.ts",
"karmaConfig": "./karma.conf.js",
"sourceMap": true,
"polyfills": "app/src/polyfills.ts",
"stylePreprocessorOptions": {
"includePaths": [
"projects/aca-content/src/lib/ui/application.scss",
"node_modules"
]
},
"tsConfig": "app/tsconfig.spec.json",
"scripts": [
"node_modules/pdfjs-dist/build/pdf.js",
"node_modules/pdfjs-dist/web/pdf_viewer.js",
"node_modules/moment/min/moment.min.js"
],
"styles": [
"app/src/assets/fonts/material-icons/material-icons.css",
"app/src/assets/fonts/OpenSans/OpenSans.css",
"app/src/styles.scss",
"projects/aca-content/src/lib/ui/application.scss"
],
"assets": [
"app/src/assets",
"app/src/favicon-96x96.png",
"projects/aca-content/assets",
{
"input": "app/.tmp",
"output": "/",
"glob": "app.config.json"
},
{
"glob": "**/*",
"input": "node_modules/@alfresco/adf-core/prebuilt-themes",
"output": "/assets/prebuilt-themes"
},
{
"glob": "**/*",
"input": "node_modules/@alfresco/adf-core/bundles/assets",
"output": "/assets"
},
{
"glob": "**/*",
"input": "node_modules/@alfresco/adf-content-services/bundles/assets",
"output": "/assets"
},
{
"glob": "pdf.worker.min.js",
"input": "node_modules/pdfjs-dist/build",
"output": "/"
}
]
},
"configurations": {
"adfprod": {
"tsConfig": "app/tsconfig.spec.adf.json"
}
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"app/**/*.ts",
"app/**/*.html"
],
"cache": true,
"cacheLocation": ".eslintcache",
"ignorePath": ".eslintignore"
}
}
}
},
"app-e2e": {
"root": "e2e",
"sourceRoot": "e2e",
"projectType": "application",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "./protractor.conf.js",
"devServerTarget": "content-ce:serve"
},
"configurations": {
"production": {
"devServerTarget": "content-ce:serve:production"
}
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"e2e/**/*.ts",
"e2e/**/*.html"
],
"cache": true,
"cacheLocation": ".eslintcache",
"ignorePath": ".eslintignore"
}
}
}
},
"adf-office-services-ext": {
"root": "projects/adf-office-services-ext",
"sourceRoot": "projects/adf-office-services-ext/src",
"projectType": "library",
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"tsConfig": "projects/adf-office-services-ext/tsconfig.lib.json",
"project": "projects/adf-office-services-ext/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "projects/adf-office-services-ext/tsconfig.lib.prod.json"
}
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"codeCoverage": true,
"main": "projects/adf-office-services-ext/src/test.ts",
"tsConfig": "projects/adf-office-services-ext/tsconfig.spec.json",
"karmaConfig": "projects/adf-office-services-ext/karma.conf.js"
},
"configurations": {
"adfprod": {
"tsConfig": "projects/adf-office-services-ext/tsconfig.spec.adf.json"
}
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"projects/adf-office-services-ext/**/*.ts",
"projects/adf-office-services-ext/**/*.html"
],
"cache": true,
"cacheLocation": ".eslintcache",
"ignorePath": ".eslintignore"
}
}
}
},
"aca-shared": {
"root": "projects/aca-shared",
"sourceRoot": "projects/aca-shared/src",
"projectType": "library",
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"tsConfig": "projects/aca-shared/tsconfig.lib.json",
"project": "projects/aca-shared/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "projects/aca-shared/tsconfig.lib.prod.json"
}
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"codeCoverage": true,
"main": "projects/aca-shared/test.ts",
"tsConfig": "projects/aca-shared/tsconfig.spec.json",
"karmaConfig": "projects/aca-shared/karma.conf.js"
},
"configurations": {
"adfprod": {
"tsConfig": "projects/aca-shared/tsconfig.spec.adf.json"
}
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"projects/aca-shared/**/*.ts",
"projects/aca-shared/**/*.html"
],
"cache": true,
"cacheLocation": ".eslintcache",
"ignorePath": ".eslintignore"
}
}
}
},
"aca-testing-shared": {
"root": "projects/aca-testing-shared",
"sourceRoot": "projects/aca-testing-shared/src",
"projectType": "library",
"prefix": "lib"
},
"aca-about": {
"projectType": "library",
"root": "projects/aca-about",
"sourceRoot": "projects/aca-about/src",
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"tsConfig": "projects/aca-about/tsconfig.lib.json",
"project": "projects/aca-about/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "projects/aca-about/tsconfig.lib.prod.json"
}
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"codeCoverage": true,
"main": "projects/aca-about/src/test.ts",
"tsConfig": "projects/aca-about/tsconfig.spec.json",
"karmaConfig": "projects/aca-about/karma.conf.js"
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"projects/aca-about/**/*.ts",
"projects/aca-about/**/*.html"
],
"cache": true,
"cacheLocation": ".eslintcache",
"ignorePath": ".eslintignore"
}
}
}
},
"aca-folder-rules": {
"projectType": "library",
"root": "projects/aca-folder-rules",
"sourceRoot": "projects/aca-folder-rules/src",
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"tsConfig": "projects/aca-folder-rules/tsconfig.lib.json",
"project": "projects/aca-folder-rules/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "projects/aca-folder-rules/tsconfig.lib.prod.json"
}
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"codeCoverage": true,
"main": "projects/aca-folder-rules/src/test.ts",
"tsConfig": "projects/aca-folder-rules/tsconfig.spec.json",
"karmaConfig": "projects/aca-folder-rules/karma.conf.js"
},
"configurations": {
"adfprod": {
"tsConfig": "projects/aca-folder-rules/tsconfig.spec.adf.json"
}
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"projects/aca-folder-rules/**/*.ts",
"projects/aca-folder-rules/**/*.html"
],
"cache": true,
"cacheLocation": ".eslintcache",
"ignorePath": ".eslintignore"
}
}
}
},
"aca-content": {
"projectType": "library",
"root": "projects/aca-content",
"sourceRoot": "projects/aca-content/src",
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"project": "projects/aca-content/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "projects/aca-content/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "projects/aca-content/tsconfig.lib.json"
}
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"codeCoverage": true,
"main": "projects/aca-content/src/test.ts",
"tsConfig": "projects/aca-content/tsconfig.spec.json",
"karmaConfig": "projects/aca-content/karma.conf.js",
"styles": [
"projects/aca-content/src/lib/ui/application.scss"
]
},
"configurations": {
"adfprod": {
"tsConfig": "projects/aca-content/tsconfig.spec.adf.json"
}
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"projects/aca-content/**/*.ts",
"projects/aca-content/**/*.html"
],
"cache": true,
"cacheLocation": ".eslintcache",
"ignorePath": ".eslintignore"
}
}
}
},
"aca-viewer": {
"projectType": "library",
"root": "projects/aca-viewer",
"sourceRoot": "projects/aca-viewer/src",
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"project": "projects/aca-viewer/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "projects/aca-viewer/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "projects/aca-viewer/tsconfig.lib.json"
}
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"codeCoverage": true,
"main": "projects/aca-viewer/src/test.ts",
"tsConfig": "projects/aca-viewer/tsconfig.spec.json",
"karmaConfig": "projects/aca-viewer/karma.conf.js"
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"projects/aca-viewer/**/*.ts",
"projects/aca-viewer/**/*.html"
],
"cache": true,
"cacheLocation": ".eslintcache",
"ignorePath": ".eslintignore"
}
}
}
},
"aca-preview": {
"projectType": "library",
"root": "projects/aca-preview",
"sourceRoot": "projects/aca-preview/src",
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"project": "projects/aca-preview/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "projects/aca-preview/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "projects/aca-preview/tsconfig.lib.json"
}
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"codeCoverage": true,
"main": "projects/aca-preview/src/test.ts",
"tsConfig": "projects/aca-preview/tsconfig.spec.json",
"karmaConfig": "projects/aca-preview/karma.conf.js"
},
"configurations": {
"adfprod": {
"tsConfig": "projects/aca-preview/tsconfig.spec.adf.json"
}
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"projects/aca-preview/**/*.ts",
"projects/aca-preview/**/*.html"
],
"cache": true,
"cacheLocation": ".eslintcache",
"ignorePath": ".eslintignore"
}
}
}
}
},
"schematics": {
"@schematics/angular:component": {
"prefix": "aca",
"style": "scss"
},
"@schematics/angular:directive": {
"prefix": "aca"
}
},
"cli": {
"packageManager": "npm",
"analytics": false
}
}

306
app/project.json Normal file
View File

@ -0,0 +1,306 @@
{
"$schema": "../node_modules/nx/schemas/project-schema.json",
"name": "content-ce",
"sourceRoot": "app/src",
"projectType": "application",
"targets": {
"build": {
"executor": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/content-ce",
"index": "app/src/index.html",
"main": "app/src/main.ts",
"tsConfig": "app/tsconfig.app.json",
"polyfills": "app/src/polyfills.ts",
"allowedCommonJsDependencies": [
"moment-es6",
"minimatch",
"moment",
"cropperjs"
],
"stylePreprocessorOptions": {
"includePaths": [
"projects/aca-content/src/lib/ui",
"node_modules"
]
},
"assets": [
{
"glob": "LICENSE",
"input": ".",
"output": "/"
},
"app/src/assets",
"app/src/favicon-96x96.png",
{
"input": "app/.tmp",
"output": "/",
"glob": "app.config.json"
},
{
"glob": "**/*",
"input": "node_modules/@alfresco/adf-core/bundles/assets",
"output": "/assets"
},
{
"glob": "**/*",
"input": "node_modules/@alfresco/adf-content-services/bundles/assets",
"output": "/assets"
},
{
"glob": "pdf.worker.min.js",
"input": "node_modules/pdfjs-dist/build",
"output": "/"
},
{
"glob": "extension.schema.json",
"input": ".",
"output": "./assets"
},
{
"glob": "**/*",
"input": "node_modules/@alfresco/adf-office-services-ext/assets",
"output": "./assets/adf-office-services-ext"
},
{
"glob": "**/*",
"input": "projects/adf-office-services-ext/assets",
"output": "./assets/adf-office-services-ext"
},
{
"glob": "aos.plugin.json",
"input": "projects/adf-office-services-ext/assets",
"output": "./assets/plugins"
},
{
"glob": "about.plugin.json",
"input": "projects/aca-about/assets",
"output": "./assets/plugins"
},
{
"glob": "folder-rules.plugin.json",
"input": "projects/aca-folder-rules/assets",
"output": "./assets/plugins"
},
{
"glob": "**/*",
"input": "projects/aca-folder-rules/assets",
"output": "./assets/aca-folder-rules"
},
{
"glob": "**/*",
"input": "projects/aca-content/assets",
"output": "./assets"
}
],
"styles": [
"app/src/assets/fonts/material-icons/material-icons.css",
"app/src/assets/fonts/OpenSans/OpenSans.css",
"node_modules/cropperjs/dist/cropper.min.css",
"node_modules/pdfjs-dist/web/pdf_viewer.css",
"projects/aca-content/src/lib/ui/application.scss",
"app/src/styles.scss"
],
"scripts": [
"node_modules/pdfjs-dist/build/pdf.js",
"node_modules/pdfjs-dist/web/pdf_viewer.js",
"node_modules/moment/min/moment.min.js"
],
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
},
"configurations": {
"production": {
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"fileReplacements": [
{
"replace": "app/src/environments/environment.ts",
"with": "app/src/environments/environment.prod.ts"
}
],
"budgets": [
{
"type": "bundle",
"name": "main",
"maximumWarning": "2mb",
"maximumError": "5mb"
},
{
"type": "bundle",
"name": "vendor",
"maximumWarning": "10mb",
"maximumError": "15mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
]
},
"release": {
"fileReplacements": [
{
"replace": "app/src/environments/environment.ts",
"with": "app/src/environments/environment.release.ts"
}
]
},
"e2e": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"fileReplacements": [
{
"replace": "app/src/environments/environment.ts",
"with": "app/src/environments/environment.e2e.ts"
}
]
},
"adf": {
"tsConfig": "app/tsconfig.app.adf.json",
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
},
"adfprod": {
"tsConfig": "app/tsconfig.app.adf.json",
"outputHashing": "all",
"fileReplacements": [
{
"replace": "app/src/environments/environment.ts",
"with": "app/src/environments/environment.prod.ts"
}
]
}
},
"defaultConfiguration": "",
"outputs": [
"{options.outputPath}"
]
},
"serve": {
"executor": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "content-ce:build",
"port": 4200,
"disableHostCheck": true,
"open": true,
"proxyConfig": "app/proxy.conf.js"
},
"configurations": {
"production": {
"browserTarget": "content-ce:build:production"
},
"e2e": {
"browserTarget": "content-ce:build:e2e"
},
"release": {
"browserTarget": "content-ce:build:release"
},
"adf": {
"browserTarget": "content-ce:build:adf"
}
}
},
"test": {
"executor": "@angular-devkit/build-angular:karma",
"options": {
"main": "app/src/test.ts",
"karmaConfig": "./karma.conf.js",
"sourceMap": true,
"polyfills": "app/src/polyfills.ts",
"stylePreprocessorOptions": {
"includePaths": [
"projects/aca-content/src/lib/ui/application.scss",
"node_modules"
]
},
"tsConfig": "app/tsconfig.spec.json",
"scripts": [
"node_modules/pdfjs-dist/build/pdf.js",
"node_modules/pdfjs-dist/web/pdf_viewer.js",
"node_modules/moment/min/moment.min.js"
],
"styles": [
"app/src/assets/fonts/material-icons/material-icons.css",
"app/src/assets/fonts/OpenSans/OpenSans.css",
"app/src/styles.scss",
"projects/aca-content/src/lib/ui/application.scss"
],
"assets": [
"app/src/assets",
"app/src/favicon-96x96.png",
"projects/aca-content/assets",
{
"input": "app/.tmp",
"output": "/",
"glob": "app.config.json"
},
{
"glob": "**/*",
"input": "node_modules/@alfresco/adf-core/prebuilt-themes",
"output": "/assets/prebuilt-themes"
},
{
"glob": "**/*",
"input": "node_modules/@alfresco/adf-core/bundles/assets",
"output": "/assets"
},
{
"glob": "**/*",
"input": "node_modules/@alfresco/adf-content-services/bundles/assets",
"output": "/assets"
},
{
"glob": "pdf.worker.min.js",
"input": "node_modules/pdfjs-dist/build",
"output": "/"
}
]
},
"configurations": {
"adfprod": {
"tsConfig": "app/tsconfig.spec.adf.json"
}
}
},
"lint": {
"executor": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"app/**/*.ts",
"app/**/*.html"
],
"cache": true,
"cacheLocation": ".eslintcache",
"ignorePath": ".eslintignore"
},
"outputs": [
"{options.outputFile}"
]
}
}
}

View File

@ -17,10 +17,10 @@ ng generate @schematics/angular:library aca-new-lib
### Build library
In order to publish new library, we need to build it first. You need to add build of your library to `build-libs` command in `package.json`
In order to publish new library, we need to build it first. Building is done by following command from `package.json`
```sh
"build-libs": "ng build aca-shared && ng build aca-new-lib",
"build": "nx build content-ce"
```
### Update publish script

View File

@ -19,7 +19,7 @@ See also
First, generate a new project within the workspace:
```sh
ng generate library my-extension
nx generate library my-extension
```
You will get a new project in the `projects/my-extensions` folder.
@ -32,10 +32,10 @@ By default, the project contains at least the following content:
Next, build the project with the following command:
```sh
ng build my-extension
nx build my-extension
```
Angular CLI automatically configures Typescript path mappings for the project, so that you do not need any additional steps to link the library.
NX automatically configures Typescript path mappings for the project, so that you do not need any additional steps to link the library.
### Register dynamic components
@ -104,7 +104,7 @@ Update the root `package.json` file and append the following entry to the `scrip
{
"scripts": {
"build:my-extension":
"ng build my-extension && npx cpr projects/my-extension/assets dist/my-extension/assets --deleteFirst"
"nx build my-extension && npx cpr projects/my-extension/assets dist/my-extension/assets --deleteFirst"
}
}
```

View File

@ -20,7 +20,7 @@ nav: ja
最初に、ワークスペース内で新しいプロジェクトを生成します:
```sh
ng generate library my-extension
nx generate library my-extension
```
`projects/my-extensions` フォルダに新しいプロジェクトを取得します。
@ -33,10 +33,10 @@ ng generate library my-extension
次に、次のコマンドでプロジェクトをビルドします:
```sh
ng build my-extension
nx build my-extension
```
Angular CLI は、プロジェクトの Typescript パスマッピングを自動的に構成するため、ライブラリをリンクするための追加手順は必要ありません。
NX は、プロジェクトの Typescript パスマッピングを自動的に構成するため、ライブラリをリンクするための追加手順は必要ありません。
### 動的コンポーネントを登録する
@ -102,7 +102,7 @@ JSON 定義で `my-extension.main.component` 識別子を使用できるよう
{
"scripts": {
"build:my-extension":
"ng build my-extension && npx cpr projects/my-extension/assets dist/my-extension/assets --deleteFirst"
"nx build my-extension && npx cpr projects/my-extension/assets dist/my-extension/assets --deleteFirst"
}
}
```

View File

@ -33,7 +33,7 @@ ACA プロジェクトのルートフォルダから、ターミナルで以下
作成を完了するには、次のコマンドを起動して拡張機能を構築します。
ng build my-extension
nx build my-extension
# ACA 拡張機能の基礎知識を身につける
@ -131,7 +131,7 @@ ACA アプリからパブリック URL を介して拡張機能が見えるよ
{ ...
"scripts": {
...,
"build:my-extension": "ng build my-extension && npx cpr projects/my-extension/assets dist/my-extension/assets --deleteFirst"
"build:my-extension": "nx build my-extension && npx cpr projects/my-extension/assets dist/my-extension/assets --deleteFirst"
}, ...
}

View File

@ -21,7 +21,7 @@ nav: ja
ACA プロジェクトのルートフォルダから、ターミナルで以下のコマンドを起動します。その際、既存の拡張機能 (ここでは my-extension) と同じ名前を使用することを確認してください。
ng generate library my-extension
nx generate library my-extension
エラーが発生した場合は、`tsconfig.json` ファイルに以下の行を追加してください。
@ -31,7 +31,7 @@ ACA プロジェクトのルートフォルダから、ターミナルで以下
作成を完了するには、次のコマンドを起動して拡張機能を構築します。
ng build my-extension
nx build my-extension
エラーが発生した場合は、`tsconfig.json` ファイルに以下の設定を追加してください。

View File

@ -32,7 +32,7 @@ Once done, in the `projects/my-extension` path you will find the following struc
To complete the creation, build the extension launching the following command.
ng build my-extension
nx build my-extension
# Developing the basics of the ACA extension
@ -163,7 +163,7 @@ Last but not least, edit the package.json file to allow the build of the extensi
{ ...
"scripts": {
...,
"build:my-extension": "ng build my-extension && npx cpr projects/my-extension/assets dist/my-extension/assets --deleteFirst"
"build:my-extension": "nx build my-extension && npx cpr projects/my-extension/assets dist/my-extension/assets --deleteFirst"
}, ...
}

View File

@ -20,7 +20,7 @@ The idea behind this task is to create a brand new ACA extension with the same n
From the root folder of the ACA project, launch the command below from a terminal. Please be sure that you are going to use the same name as the existing extension (in this case my-extension).
ng generate library my-extension
nx generate library my-extension
In case of errors, add the following line to the `tsconfig.json` file.
@ -30,7 +30,7 @@ Once done, delete the full content of the `projects/my-extension` folder and rep
To complete the creation, build the extension launching the following command.
ng build my-extension
nx build my-extension
In case of errors, add the following configuration to the `tsconfig.json` file.

35
e2e/project.json Normal file
View File

@ -0,0 +1,35 @@
{
"$schema": "../node_modules/nx/schemas/project-schema.json",
"name": "app-e2e",
"sourceRoot": "e2e",
"projectType": "application",
"targets": {
"e2e": {
"executor": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "./protractor.conf.js",
"devServerTarget": "content-ce:serve"
},
"configurations": {
"production": {
"devServerTarget": "content-ce:serve:production"
}
}
},
"lint": {
"executor": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"e2e/**/*.ts",
"e2e/**/*.html"
],
"cache": true,
"cacheLocation": ".eslintcache",
"ignorePath": ".eslintignore"
},
"outputs": [
"{options.outputFile}"
]
}
}
}

63
nx.json Normal file
View File

@ -0,0 +1,63 @@
{
"tasksRunnerOptions": {
"default": {
"runner": "nx/tasks-runners/default",
"options": {
"cacheableOperations": [
"build",
"test",
"lint"
],
"cacheDirectory": "nxcache"
}
}
},
"defaultBase": "develop",
"affected": {
"defaultBase": "develop"
},
"namedInputs": {
"sharedGlobals": [],
"default": [
"{projectRoot}/**/*",
"sharedGlobals"
],
"production": [
"default",
"!{projectRoot}/tsconfig.spec.json",
"!{projectRoot}/**/*.spec.[jt]s",
"!{projectRoot}/karma.conf.js",
"!{projectRoot}/.eslintrc.json"
]
},
"targetDefaults": {
"build": {
"dependsOn": [
"^build"
],
"inputs": [
"production",
"^production"
]
},
"test": {
"inputs": [
"default",
"^production",
"{workspaceRoot}/karma.conf.js"
]
},
"lint": {
"inputs": [
"default",
"{workspaceRoot}/.eslintrc.json"
]
},
"e2e": {
"inputs": [
"default",
"^production"
]
}
}
}

15139
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -9,19 +9,28 @@
"validate-app-config": "ajv validate -s ./node_modules/@alfresco/adf-core/app.config.schema.json -d ./app/.tmp/app.config.json --errors=text --verbose",
"assemble-app-config": "envsub --env-file ./.env --env APP_CONFIG_ECM_HOST={protocol}//{hostname}{:port} --env APP_CONFIG_PROVIDER=ECM --env APP_CONFIG_AUTH_TYPE=BASIC --env APP_CONFIG_OAUTH2_HOST=http://localhost:4200/auth/realms/alfresco --env APP_CONFIG_OAUTH2_CLIENTID=alfresco --env APP_CONFIG_OAUTH2_IMPLICIT_FLOW=true --env APP_CONFIG_OAUTH2_SILENT_LOGIN=true --env APP_CONFIG_OAUTH2_REDIRECT_SILENT_IFRAME_URI={protocol}//{hostname}{:port}/assets/silent-refresh.html --env APP_CONFIG_OAUTH2_REDIRECT_LOGIN=/ --env APP_CONFIG_OAUTH2_REDIRECT_LOGOUT=/logout --all ./app/src/app.config.json.tpl ./app/.tmp/app.config.json",
"prestart": "mkdir -p ./app/.tmp && npm run assemble-app-config && npm run validate-app-config",
"start": "ng serve",
"start:prod": "npm run validate-app-config && node --max-old-space-size=8192 node_modules/@angular/cli/bin/ng serve --configuration production --open",
"start": "nx serve",
"start:prod": "npm run validate-app-config && node --max-old-space-size=8192 nx serve content-ce --configuration production",
"prebuild": "mkdir -p ./app/.tmp && cp ./app/src/app.config.json.tpl ./app/.tmp/app.config.json",
"build": "ng build content-ce",
"build": "nx build content-ce",
"build.release": "npm run build -- --configuration=production,release",
"build-libs": "ng build aca-shared && ng build adf-office-services-ext && ng build aca-about && ng build aca-viewer && ng build aca-preview && ng build aca-folder-rules && ng build aca-content",
"test": "ng test",
"lint": "NODE_OPTIONS=--max_old_space_size=4096 ng lint",
"test": "nx test",
"lint": "NODE_OPTIONS=--max_old_space_size=4096 nx run-many --all --target=lint",
"update-webdriver": "./scripts/update-webdriver.sh",
"e2e": "npm run update-webdriver && protractor $SUITE",
"inspect.bundle": "ng build content-ce --configuration production --stats-json && npx webpack-bundle-analyzer dist/content-ce/stats.json",
"inspect.bundle": "nx build content-ce --configuration production --stats-json && npx webpack-bundle-analyzer dist/content-ce/stats.json",
"prepare": "husky install",
"stylelint": "stylelint \"{app,projects}/**/*.scss\""
"stylelint": "stylelint \"{app,projects}/**/*.scss\"",
"affected:build": "nx affected:build",
"affected:test": "nx affected:test",
"affected:lint": "nx affected:lint",
"affected:dep-graph": "nx affected:dep-graph",
"affected": "nx affected",
"print-affected:app": "nx print-affected --type=app --select=projects",
"print-affected:projects": "nx print-affected --type=lib --select=projects",
"print-affected:build": "nx print-affected --target=build --select=tasks.target.project",
"print-affected:test": "nx print-affected --target=test --select=tasks.target.project",
"print-affected:lint": "nx print-affected --target=lint --select=tasks.target.project"
},
"repository": {
"type": "git",
@ -64,6 +73,8 @@
"@alfresco/adf-cli": "6.0.0-A.4.4784685390",
"@alfresco/adf-testing": "6.0.0-A.4.4784685390",
"@angular-devkit/build-angular": "14.2.11",
"@angular-devkit/core": "14.1.2",
"@angular-devkit/schematics": "14.1.2",
"@angular-eslint/builder": "^14.1.2",
"@angular-eslint/eslint-plugin": "^14.1.2",
"@angular-eslint/eslint-plugin-template": "^15.2.0",
@ -73,7 +84,10 @@
"@angular/compiler-cli": "14.1.2",
"@angular/language-service": "14.1.2",
"@cspell/eslint-plugin": "^6.31.1",
"@nrwl/angular": "15.9.2",
"@nrwl/workspace": "15.9.2",
"@playwright/test": "^1.31.2",
"@schematics/angular": "14.1.2",
"@types/event-emitter": "^0.3.3",
"@types/jasmine": "~3.6.0",
"@types/jasminewd2": "^2.0.8",
@ -110,6 +124,7 @@
"lint-staged": "^13.1.0",
"ng-packagr": "^14.2.2",
"node-stream-zip": "^1.14.0",
"nx": "15.9.2",
"prettier": "2.8.7",
"protractor": "~7.0.0",
"protractor-retry-angular-cli": "^2.0.3",

View File

@ -0,0 +1,49 @@
{
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"name": "aca-about",
"projectType": "library",
"sourceRoot": "projects/aca-about/src",
"prefix": "lib",
"targets": {
"build": {
"executor": "@angular-devkit/build-angular:ng-packagr",
"options": {
"tsConfig": "projects/aca-about/tsconfig.lib.json",
"project": "projects/aca-about/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "projects/aca-about/tsconfig.lib.prod.json"
}
},
"defaultConfiguration": "production",
"outputs": [
"{workspaceRoot}/dist/@alfresco/aca-about"
]
},
"test": {
"executor": "@angular-devkit/build-angular:karma",
"options": {
"codeCoverage": true,
"main": "projects/aca-about/src/test.ts",
"tsConfig": "projects/aca-about/tsconfig.spec.json",
"karmaConfig": "projects/aca-about/karma.conf.js"
}
},
"lint": {
"executor": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"projects/aca-about/**/*.ts",
"projects/aca-about/**/*.html"
],
"cache": true,
"cacheLocation": ".eslintcache",
"ignorePath": ".eslintignore"
},
"outputs": [
"{options.outputFile}"
]
}
}
}

View File

@ -4,21 +4,21 @@ This library was generated with [Angular CLI](https://github.com/angular/angular
## Code scaffolding
Run `ng generate component component-name --project aca-content` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project aca-content`.
Run `nx generate component component-name --project aca-content` to generate a new component. You can also use `nx generate directive|pipe|service|class|guard|interface|enum|module --project aca-content`.
> Note: Don't forget to add `--project aca-content` or else it will be added to the default project in your `angular.json` file.
## Build
Run `ng build aca-content` to build the project. The build artifacts will be stored in the `dist/` directory.
Run `nx build aca-content` to build the project. The build artifacts will be stored in the `dist/` directory.
## Publishing
After building your library with `ng build aca-content`, go to the dist folder `cd dist/aca-content` and run `npm publish`.
After building your library with `nx build aca-content`, go to the dist folder `cd dist/aca-content` and run `npm publish`.
## Running unit tests
Run `ng test aca-content` to execute the unit tests via [Karma](https://karma-runner.github.io).
Run `nx test aca-content` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
To get more help on the NX use `nx help` or go check out the [NX documentation](https://nx.dev/getting-started/intro) page.

View File

@ -0,0 +1,59 @@
{
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"name": "aca-content",
"projectType": "library",
"sourceRoot": "projects/aca-content/src",
"prefix": "lib",
"targets": {
"build": {
"executor": "@angular-devkit/build-angular:ng-packagr",
"options": {
"project": "projects/aca-content/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "projects/aca-content/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "projects/aca-content/tsconfig.lib.json"
}
},
"defaultConfiguration": "production",
"outputs": [
"{workspaceRoot}/dist/@alfresco/aca-content"
]
},
"test": {
"executor": "@angular-devkit/build-angular:karma",
"options": {
"codeCoverage": true,
"main": "projects/aca-content/src/test.ts",
"tsConfig": "projects/aca-content/tsconfig.spec.json",
"karmaConfig": "projects/aca-content/karma.conf.js",
"styles": [
"projects/aca-content/src/lib/ui/application.scss"
]
},
"configurations": {
"adfprod": {
"tsConfig": "projects/aca-content/tsconfig.spec.adf.json"
}
}
},
"lint": {
"executor": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"projects/aca-content/**/*.ts",
"projects/aca-content/**/*.html"
],
"cache": true,
"cacheLocation": ".eslintcache",
"ignorePath": ".eslintignore"
},
"outputs": [
"{options.outputFile}"
]
}
}
}

View File

@ -1,5 +1,8 @@
@mixin ay11-theme() {
.mat-icon-button, .mat-button, .mat-checkbox, .mat-raised-button {
.mat-icon-button,
.mat-button,
.mat-checkbox,
.mat-raised-button {
&:focus-visible {
@include rounded-outline;
}
@ -55,7 +58,8 @@
}
}
.adf-search-user-button, .app-search-button {
.adf-search-user-button,
.app-search-button {
line-height: 36px !important;
@include rounded-border(transparent);
@ -135,14 +139,12 @@
}
}
.mat-stroked-button, .mat-flat-button {
.mat-stroked-button,
.mat-flat-button {
&.cdk-keyboard-focused {
.mat-button-ripple.mat-ripple {
outline: 2px solid var(--theme-blue-button-color);
top: -4px;
left: -4px;
bottom: -4px;
right: -4px;
inset: -4px;
}
}
}
@ -179,7 +181,7 @@
}
}
&.cdk-keyboard-focused:not([aria-disabled="true"]) {
&.cdk-keyboard-focused:not([aria-disabled='true']) {
background-color: white;
@include rounded-border;
@ -189,7 +191,8 @@
.adf-error-snackbar {
background-color: #ba1b1b;
.mat-simple-snackbar, .mat-simple-snackbar-action {
.mat-simple-snackbar,
.mat-simple-snackbar-action {
color: white;
}
}
@ -197,7 +200,8 @@
.adf-info-snackbar {
background-color: var(--theme-blue-button-color);
.mat-simple-snackbar, .mat-simple-snackbar-action {
.mat-simple-snackbar,
.mat-simple-snackbar-action {
color: white;
}
}

View File

@ -2,8 +2,8 @@
## Build
Run `ng build aca-folder-rules` to build the project. The build artifacts will be stored in the `dist/` directory.
Run `nx build aca-folder-rules` to build the project. The build artifacts will be stored in the `dist/` directory.
## Running unit tests
Run `ng test aca-folder-rules` to execute the unit tests via [Karma](https://karma-runner.github.io).
Run `nx test aca-folder-rules` to execute the unit tests via [Karma](https://karma-runner.github.io).

View File

@ -0,0 +1,54 @@
{
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"name": "aca-folder-rules",
"projectType": "library",
"sourceRoot": "projects/aca-folder-rules/src",
"prefix": "lib",
"targets": {
"build": {
"executor": "@angular-devkit/build-angular:ng-packagr",
"options": {
"tsConfig": "projects/aca-folder-rules/tsconfig.lib.json",
"project": "projects/aca-folder-rules/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "projects/aca-folder-rules/tsconfig.lib.prod.json"
}
},
"defaultConfiguration": "production",
"outputs": [
"{workspaceRoot}/dist/@alfresco/aca-folder-rules"
]
},
"test": {
"executor": "@angular-devkit/build-angular:karma",
"options": {
"codeCoverage": true,
"main": "projects/aca-folder-rules/src/test.ts",
"tsConfig": "projects/aca-folder-rules/tsconfig.spec.json",
"karmaConfig": "projects/aca-folder-rules/karma.conf.js"
},
"configurations": {
"adfprod": {
"tsConfig": "projects/aca-folder-rules/tsconfig.spec.adf.json"
}
}
},
"lint": {
"executor": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"projects/aca-folder-rules/**/*.ts",
"projects/aca-folder-rules/**/*.html"
],
"cache": true,
"cacheLocation": ".eslintcache",
"ignorePath": ".eslintignore"
},
"outputs": [
"{options.outputFile}"
]
}
}
}

View File

@ -4,21 +4,21 @@ This library was generated with [Angular CLI](https://github.com/angular/angular
## Code scaffolding
Run `ng generate component component-name --project aca-preview` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project aca-preview`.
Run `nx generate component component-name --project aca-preview` to generate a new component. You can also use `nx generate directive|pipe|service|class|guard|interface|enum|module --project aca-preview`.
> Note: Don't forget to add `--project aca-preview` or else it will be added to the default project in your `angular.json` file.
## Build
Run `ng build aca-preview` to build the project. The build artifacts will be stored in the `dist/` directory.
Run `nx build aca-preview` to build the project. The build artifacts will be stored in the `dist/` directory.
## Publishing
After building your library with `ng build aca-preview`, go to the dist folder `cd dist/aca-preview` and run `npm publish`.
After building your library with `nx build aca-preview`, go to the dist folder `cd dist/aca-preview` and run `npm publish`.
## Running unit tests
Run `ng test aca-preview` to execute the unit tests via [Karma](https://karma-runner.github.io).
Run `nx test aca-preview` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
To get more help on the NX use `nx help` or go check out the [NX documentation](https://nx.dev/getting-started/intro) page.

View File

@ -0,0 +1,56 @@
{
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"name": "aca-preview",
"projectType": "library",
"sourceRoot": "projects/aca-preview/src",
"prefix": "lib",
"targets": {
"build": {
"executor": "@angular-devkit/build-angular:ng-packagr",
"options": {
"project": "projects/aca-preview/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "projects/aca-preview/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "projects/aca-preview/tsconfig.lib.json"
}
},
"defaultConfiguration": "production",
"outputs": [
"{workspaceRoot}/dist/@alfresco/aca-preview"
]
},
"test": {
"executor": "@angular-devkit/build-angular:karma",
"options": {
"codeCoverage": true,
"main": "projects/aca-preview/src/test.ts",
"tsConfig": "projects/aca-preview/tsconfig.spec.json",
"karmaConfig": "projects/aca-preview/karma.conf.js"
},
"configurations": {
"adfprod": {
"tsConfig": "projects/aca-preview/tsconfig.spec.adf.json"
}
}
},
"lint": {
"executor": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"projects/aca-preview/**/*.ts",
"projects/aca-preview/**/*.html"
],
"cache": true,
"cacheLocation": ".eslintcache",
"ignorePath": ".eslintignore"
},
"outputs": [
"{options.outputFile}"
]
}
}
}

View File

@ -4,22 +4,22 @@ This library was generated with [Angular CLI](https://github.com/angular/angular
## Code scaffolding
Run `ng generate component component-name --project aca-shared` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project aca-shared`.
Run `nx generate component component-name --project aca-shared` to generate a new component. You can also use `nx generate directive|pipe|service|class|guard|interface|enum|module --project aca-shared`.
> Note: Don't forget to add `--project aca-shared` or else it will be added to the default project in your `angular.json` file.
## Build
Run `ng build aca-shared` to build the project. The build artifacts will be stored in the `dist/` directory.
Run `nx build aca-shared` to build the project. The build artifacts will be stored in the `dist/` directory.
## Publishing
After building your library with `ng build aca-shared`, go to the dist folder `cd dist/aca-shared` and run `npm publish`.
After building your library with `nx build aca-shared`, go to the dist folder `cd dist/aca-shared` and run `npm publish`.
## Running unit tests
Run `ng test aca-shared` to execute the unit tests via [Karma](https://karma-runner.github.io).
Run `nx test aca-shared` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
To get more help on the NX use `nx help` or go check out the [NX documentation](https://nx.dev/getting-started/intro) page.

View File

@ -0,0 +1,54 @@
{
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"name": "aca-shared",
"sourceRoot": "projects/aca-shared/src",
"projectType": "library",
"prefix": "lib",
"targets": {
"build": {
"executor": "@angular-devkit/build-angular:ng-packagr",
"options": {
"tsConfig": "projects/aca-shared/tsconfig.lib.json",
"project": "projects/aca-shared/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "projects/aca-shared/tsconfig.lib.prod.json"
}
},
"defaultConfiguration": "production",
"outputs": [
"{workspaceRoot}/dist/@alfresco/aca-shared"
]
},
"test": {
"executor": "@angular-devkit/build-angular:karma",
"options": {
"codeCoverage": true,
"main": "projects/aca-shared/test.ts",
"tsConfig": "projects/aca-shared/tsconfig.spec.json",
"karmaConfig": "projects/aca-shared/karma.conf.js"
},
"configurations": {
"adfprod": {
"tsConfig": "projects/aca-shared/tsconfig.spec.adf.json"
}
}
},
"lint": {
"executor": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"projects/aca-shared/**/*.ts",
"projects/aca-shared/**/*.html"
],
"cache": true,
"cacheLocation": ".eslintcache",
"ignorePath": ".eslintignore"
},
"outputs": [
"{options.outputFile}"
]
}
}
}

View File

@ -0,0 +1,7 @@
{
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"name": "aca-testing-shared",
"sourceRoot": "projects/aca-testing-shared/src",
"projectType": "library",
"prefix": "lib"
}

View File

@ -4,21 +4,21 @@ This library was generated with [Angular CLI](https://github.com/angular/angular
## Code scaffolding
Run `ng generate component component-name --project aca-viewer` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project aca-viewer`.
Run `nx generate component component-name --project aca-viewer` to generate a new component. You can also use `nx generate directive|pipe|service|class|guard|interface|enum|module --project aca-viewer`.
> Note: Don't forget to add `--project aca-viewer` or else it will be added to the default project in your `angular.json` file.
## Build
Run `ng build aca-viewer` to build the project. The build artifacts will be stored in the `dist/` directory.
Run `nx build aca-viewer` to build the project. The build artifacts will be stored in the `dist/` directory.
## Publishing
After building your library with `ng build aca-viewer`, go to the dist folder `cd dist/aca-viewer` and run `npm publish`.
After building your library with `nx build aca-viewer`, go to the dist folder `cd dist/aca-viewer` and run `npm publish`.
## Running unit tests
Run `ng test aca-viewer` to execute the unit tests via [Karma](https://karma-runner.github.io).
Run `nx test aca-viewer` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
To get more help on the NX use `nx help` or go check out the [NX documentation](https://nx.dev/getting-started/intro) page.

View File

@ -0,0 +1,51 @@
{
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"name": "aca-viewer",
"projectType": "library",
"sourceRoot": "projects/aca-viewer/src",
"prefix": "lib",
"targets": {
"build": {
"executor": "@angular-devkit/build-angular:ng-packagr",
"options": {
"project": "projects/aca-viewer/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "projects/aca-viewer/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "projects/aca-viewer/tsconfig.lib.json"
}
},
"defaultConfiguration": "production",
"outputs": [
"{workspaceRoot}/dist/@alfresco/aca-viewer"
]
},
"test": {
"executor": "@angular-devkit/build-angular:karma",
"options": {
"codeCoverage": true,
"main": "projects/aca-viewer/src/test.ts",
"tsConfig": "projects/aca-viewer/tsconfig.spec.json",
"karmaConfig": "projects/aca-viewer/karma.conf.js"
}
},
"lint": {
"executor": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"projects/aca-viewer/**/*.ts",
"projects/aca-viewer/**/*.html"
],
"cache": true,
"cacheLocation": ".eslintcache",
"ignorePath": ".eslintignore"
},
"outputs": [
"{options.outputFile}"
]
}
}
}

View File

@ -0,0 +1,54 @@
{
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"name": "adf-office-services-ext",
"sourceRoot": "projects/adf-office-services-ext/src",
"projectType": "library",
"prefix": "lib",
"targets": {
"build": {
"executor": "@angular-devkit/build-angular:ng-packagr",
"options": {
"tsConfig": "projects/adf-office-services-ext/tsconfig.lib.json",
"project": "projects/adf-office-services-ext/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "projects/adf-office-services-ext/tsconfig.lib.prod.json"
}
},
"defaultConfiguration": "production",
"outputs": [
"{workspaceRoot}/dist/@alfresco/adf-office-services-ext"
]
},
"test": {
"executor": "@angular-devkit/build-angular:karma",
"options": {
"codeCoverage": true,
"main": "projects/adf-office-services-ext/src/test.ts",
"tsConfig": "projects/adf-office-services-ext/tsconfig.spec.json",
"karmaConfig": "projects/adf-office-services-ext/karma.conf.js"
},
"configurations": {
"adfprod": {
"tsConfig": "projects/adf-office-services-ext/tsconfig.spec.adf.json"
}
}
},
"lint": {
"executor": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"projects/adf-office-services-ext/**/*.ts",
"projects/adf-office-services-ext/**/*.html"
],
"cache": true,
"cacheLocation": ".eslintcache",
"ignorePath": ".eslintignore"
},
"outputs": [
"{options.outputFile}"
]
}
}
}