question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support multiple apps/libs in NX workspace

See original GitHub issue

I’m submitting a…


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[x] Feature request
[ ] Documentation issue or request
[ ] Support request
[ ] Other... Please describe:

Current behavior

At the moment it is only possible to set one app within the rootTranslationsPath. I am using NX with multiple apps and libs.

Expected behavior

It should be possible to have multiple root translation paths / to support multiple apps.

Minimal reproduction of the problem with instructions

Create two projects within a NX workspace.

What is the motivation / use case for changing the behavior?

Make it usable within NX.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
adgoncalcommented, Jan 10, 2020

It would also be nice to have support for --project and check angular.json for the given project. For example:

// package.json
{
  "scripts": {
    "transloco:extract": "transloco-keys-manager extract"
  }
}

// angular.json
{
 "projects": {
    "first-app": {
      "sourceRoot": "apps/first-app/src"
    }
  }
}

// transloco.config.ts
module.exports = {
  translationPath: 'assets/i18n'
};

Then

npm run transloco:extract -- --project first-app

would use apps/first-app/src/assets/i18n as the rootTranslationPath.


Furthermore (optional), if --project was the default arg, then we would be able to use

npm run transloco:extract -- first-app

Similar to how we can run tests for a given project using

ng test first-app
1reaction
adgoncalcommented, Jan 14, 2020

@adgoncal Thanks again for the feedback, can you try 1.3.2? 🙂

@shaharkazaz That is perfect! Thank you again!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Grouping Libraries - Nx
This organization has two apps, booking and check-in . In the Nx workspace, libraries related to booking are grouped under a libs/booking folder,...
Read more >
Angular shared assets with multiple apps — Nrwl Nx - Medium
Say you needed to reference shared assets across multiple projects within a single workspace, you will need some way of housing your assets...
Read more >
Set Your Multi-App Environment up in 5 Minutes - Dev Genius
A typical Nx workspace is structured into “apps” and “libs”. This distinction allows us to have a more modular architecture by following a...
Read more >
Migrate Multiple Angular CLI apps into a Single Nx Monorepo
Nx comes with powerful automated migrations to move an existing Angular CLI app (or also CRA app ) to a new Nx workspace....
Read more >
Configure Tailwind in a Nx Monorepo With Potentially Multiple ...
Monorepos might consist of multiple applications and libraries. As such, when we setup Tailwind, we might want to have certain ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found