Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 13 commits into from
Apr 25, 2023

Conversation

AleksanderSklorz
Copy link
Contributor

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

What kind of change does this PR introduce? (check one with "x")

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation
  • Other... Please describe:

What is the current behaviour? (You can also link to an open issue here)
https://alfresco.atlassian.net/browse/ACS-4534

What is the new behaviour?
NX workspace is initialized. We can use nx commands like nx build or nx affected:lint etc. Affected command works based on develop branch. All caches are stored locally in nxcache folder in root of project.

Does this PR introduce a breaking change? (check one with "x")

  • Yes
  • No

If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...

Other information:

README.md Outdated

```sh
ng test <project>
nx affected:test <project>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as this section describes running test for a particular project, it should be: nx text <project>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah right, corrected

package.json Outdated
"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",
"build-libs": "nx build aca-shared && nx build adf-office-services-ext && nx build aca-about && nx build aca-viewer && nx build aca-preview && nx build aca-folder-rules && nx build aca-content",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we investigate how to make project dependencies so that this script can be removed? the ADF should have some examples on how one project causes building other dependant ones

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok I will check thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it works already in that way by default. After calling:
nx build content-ce (which is build script in package.json)

it builds also all needed libraries. See screenshot:
image

So I just removed that script

@AleksanderSklorz
Copy link
Contributor Author

AleksanderSklorz commented Apr 24, 2023

Marked is as don't merge for now as discussed with @DenysVuika - just to add some extra scripts. I will unmark it after adding them.

package.json Outdated
"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 content-ce",
"start:prod": "npm run validate-app-config && node --max-old-space-size=8192 nx run content-ce:serve:production",
Copy link
Contributor

@DenysVuika DenysVuika Apr 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be --configuration=production like in the line 16 or line 21

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@AleksanderSklorz AleksanderSklorz force-pushed the ACS-4534-Nx-Workspace-support-for-ACA branch from ba4fe13 to 06220d2 Compare April 25, 2023 09:02
@AleksanderSklorz
Copy link
Contributor Author

Removed "do not merge" label as some more scripts have been already added

Copy link
Contributor

@TomikaArome TomikaArome left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@MichalKinas MichalKinas merged commit e9bc42d into develop Apr 25, 2023
@MichalKinas MichalKinas deleted the ACS-4534-Nx-Workspace-support-for-ACA branch April 25, 2023 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants