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

Migrate nx + upgrades #127

Merged
merged 48 commits into from
Jun 23, 2021
Merged

Migrate nx + upgrades #127

merged 48 commits into from
Jun 23, 2021

Conversation

fgravin
Copy link
Member

@fgravin fgravin commented Jun 21, 2021

Core refactoring of the architecture

  • use Nx workspaces
  • upgrade storybook
  • upgrade TailwindCSS
  • add angular-material
  • add search suggest autocomplete component
  • add first components of dataviz (grid, map)

jahow and others added 30 commits June 16, 2021 09:25
1. Created a new NX project from scratch using this doc:
https://nx.dev/latest/angular/getting-started/nx-setup

Recreated the previous project structure (apps and libs), and grouping
libs by type as best as I could.

Also copied the dependencies and NPM tasks from the previous package.json

Commands run:
npx create-nx-workspace --preset=angular
nx generate @nrwl/angular:library ui/search
nx generate @nrwl/angular:library ui/inputs
nx generate @nrwl/angular:library ui/layout
nx generate @nrwl/angular:library ui/widgets
nx generate @nrwl/angular:library ui/catalog
nx generate @nrwl/angular:library feature/editor
nx generate @nrwl/angular:library feature/catalog
nx generate @nrwl/angular:library feature/search
nx generate @nrwl/angular:library feature/auth
nx generate @nrwl/angular:library data-access/gn4
nx generate @nrwl/angular:library data-access/datafeeder
nx generate @nrwl/angular:library util/i18n
nx generate @nrwl/angular:library util/shared
nx generate @nrwl/angular:app datafeeder
ng add @angular/elements
ng add @angular/platform-server

2. Copied both datafeeder and search projects from the previous structure

3. copied all libs which were reorganized in order to have smaller
libs and a more granular dependency graph

4. regenerated the API clients (datafeeder and gn4) agains the specs in the
repo; this required adapting the generate-api tool a bit

5. adapted tsconfig to avoid errors linked to strict checking
Reworked the fuzzy-search and ui-autocomplete components to rely on
the material autocomplete component

Created a new helper in the ElasticSearch service to build an autocomplete
query payload
ESLint is stricter on many things so many adaptations were made, notably:
* empty functions and lifecycle methods removed
* using `object` type
* fixed relative/absolute import paths to respect module boundaries

Also all components were adapted to use the `gn-ui` prefix, disregarding
which lib or app they are from (this is the NX default).

Note that there is still a circular dependency remaining
also fix workflow formatting
@jahow jahow force-pushed the migrate-nx branch 4 times, most recently from 711174e to d9802fa Compare June 22, 2021 21:43
@fgravin fgravin force-pushed the migrate-nx branch 3 times, most recently from 49b9010 to cdba75c Compare June 23, 2021 16:10
@fgravin fgravin merged commit 491f9c4 into master Jun 23, 2021
@fgravin fgravin deleted the migrate-nx branch June 23, 2021 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants