mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[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:
@@ -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
|
||||
|
@@ -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"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
@@ -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"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
@@ -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"
|
||||
}, ...
|
||||
}
|
||||
|
||||
|
@@ -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` ファイルに以下の設定を追加してください。
|
||||
|
||||
@@ -49,4 +49,4 @@ ACA 拡張機能が初期バージョンで開発されたので、アプリケ
|
||||
|
||||
ACA のランディングページの左メニューに新しい項目が追加され、次のような内容の新しいページへのルートが実装されているはずです。下のスクリーンショットは、それがどのように見えるかを説明しています。
|
||||
|
||||

|
||||

|
||||
|
@@ -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"
|
||||
}, ...
|
||||
}
|
||||
|
||||
|
@@ -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.
|
||||
|
||||
@@ -48,4 +48,4 @@ Now that everything is properly developed, it’s time to launch ACA and see the
|
||||
|
||||
What you should see is a new item in left menu of the landing page for ACA, implementing the route to a new page with the following content. Below the screenshot describing what it should look like.
|
||||
|
||||

|
||||

|
||||
|
Reference in New Issue
Block a user