diff --git a/README.md b/README.md index e63fdc36f..014940402 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,16 @@ npm install npm start content-ce ``` +### Using Local ADF + +Clone the `alfresco-ng2-components` and `alfresco-content-app` repositories in the same folder, and run the following command: + +```sh +npm start content-ce -- --configuration=adf +``` + +Changing the ADF code results in the recompilation and hot-reloading of the ACA application. + ## See Also Please refer to the [Public documentation](https://alfresco-content-app.netlify.com/) for more details diff --git a/angular.json b/angular.json index 4e059c8a6..b2bec7b52 100644 --- a/angular.json +++ b/angular.json @@ -188,6 +188,15 @@ "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 } }, "defaultConfiguration": "" @@ -210,6 +219,9 @@ }, "release": { "browserTarget": "content-ce:build:release" + }, + "adf": { + "browserTarget": "content-ce:build:adf" } } }, diff --git a/app/tsconfig.app.adf.json b/app/tsconfig.app.adf.json index 2b7638718..1f4b8a50c 100644 --- a/app/tsconfig.app.adf.json +++ b/app/tsconfig.app.adf.json @@ -1,13 +1,20 @@ { - "extends": "../../../tsconfig.adf.json", + "extends": "../tsconfig.adf.json", "compilerOptions": { - "outDir": "../out-tsc/content-ce", + "outDir": "../out-tsc/content-ce" }, -"files": [ - "src/main.ts", - "src/polyfills.ts" -], -"include": [ - "apps/content-ce/src/**/*.d.ts" -] -} \ No newline at end of file + "files": ["src/main.ts", "src/polyfills.ts"], + "include": ["src/**/*.d.ts"], + "exclude": [ + "**/*.spec.ts", + "**/*.spec.ts", + "**/*.mock.ts", + "src/test.ts", + "src/environments/environment.prod.ts", + "src/environments/environment.e2e.ts", + "src/app/testing/app-testing.module.ts", + "src/app/testing/translation.service.ts", + "src/app/testing/translate-pipe.directive.ts", + "src/environments/environment.release.ts" + ] +} diff --git a/tsconfig.adf.json b/tsconfig.adf.json new file mode 100644 index 000000000..5bcc54106 --- /dev/null +++ b/tsconfig.adf.json @@ -0,0 +1,50 @@ +{ + "compileOnSave": false, + "compilerOptions": { + "baseUrl": "./", + "downlevelIteration": true, + "importHelpers": true, + "outDir": "./dist/out-tsc", + "sourceMap": true, + "declaration": false, + "module": "esnext", + "moduleResolution": "node", + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noImplicitReturns": true, + "target": "es2020", + "resolveJsonModule": true, + "allowSyntheticDefaultImports": true, + "typeRoots": ["node_modules/@types"], + "lib": ["es2019", "dom"], + "paths": { + "@alfresco/adf-testing": ["../alfresco-ng2-components/lib/testing"], + "@alfresco/adf-testing/shared": ["../alfresco-ng2-components/lib/testing/src/lib/shared"], + "@alfresco/adf-core": ["../alfresco-ng2-components/lib/core"], + "@alfresco/adf-core/*": ["../alfresco-ng2-components/lib/core/*/public-api.ts"], + "@alfresco/adf-extensions": ["../alfresco-ng2-components/lib/extensions"], + "@alfresco/adf-content-services": ["../alfresco-ng2-components/lib/content-services"], + "@alfresco/adf-process-services-cloud": ["../alfresco-ng2-components/lib/process-services-cloud"], + "@alfresco/adf-process-services": ["../alfresco-ng2-components/lib/process-services"], + "@alfresco/aca-shared": ["projects/aca-shared/src/public-api.ts"], + "@alfresco/aca-shared/store": ["projects/aca-shared/store/src/public-api.ts"], + "@alfresco/aca-shared/rules": ["projects/aca-shared/rules/src/public-api.ts"], + "@alfresco/adf-office-services-ext": ["projects/adf-office-services-ext/src/public-api.ts"], + "@alfresco/aca-testing-shared": ["projects/aca-testing-shared"], + "@alfresco/aca-about": ["projects/aca-about/src/public-api.ts"], + "@alfresco/aca-settings": ["projects/aca-settings/src/public-api.ts"], + "@alfresco/aca-folder-rules": ["projects/aca-folder-rules/src/public-api.ts"], + "package.json": ["package.json"], + "*": ["./node_modules/*"] + } + }, + "exclude": ["node_modules"], + "angularCompilerOptions": { + "preserveWhitespaces": false, + "fullTemplateTypeCheck": true, + "strictInjectionParameters": true, + "strictTemplates": true + } +} diff --git a/tsconfig.json b/tsconfig.json index 5405e980f..e485c4d72 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -18,7 +18,7 @@ "resolveJsonModule": true, "allowSyntheticDefaultImports": true, "typeRoots": ["node_modules/@types"], - "lib": ["es2018", "dom"], + "lib": ["es2019", "dom"], "paths": { "@alfresco/aca-shared": ["projects/aca-shared/src/public-api.ts"], "@alfresco/aca-shared/store": ["projects/aca-shared/store/src/public-api.ts"],