-
-
Notifications
You must be signed in to change notification settings - Fork 244
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
feat: make nx plugin work without angular preset and add tailwind option #370
Conversation
✅ Deploy Preview for analog-blog ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for analog-docs ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for analog-app ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
const parsedTags = options.tags | ||
? options.tags.split(',').map((s) => s.trim()) | ||
: []; | ||
const offsetFromRoot = determineOffsetFromRoot(projectRoot); | ||
|
||
const nxPackageNamespace = major(nxVersion) >= 16 ? '@nx' : '@nrwl'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's just use @nx
as we'll pin everything to Nx 16.1.0 to support Angular >= v15
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The one thing I want to mention is that this is version comes from the user's Nx workspace. If I understand this correctly removing this logic would mean that we do not support workspaces that have an Nx version of 15
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Let's keep them separate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested with a v15.9.2 workspace and the current approach & versions for V15 worked 👍
The nx plugin now works without any manual addition of @nx/angular. You can create an empty workspace and simply add the @analogjs/platform dependency. After installing it you can run one command: nx g @analogjs/platform:app. This will automatically install all angular and analog dependencies. This plugin should also work as a preset for npx create-workspace. Since e2e testing for nx plugins is still a bit messy I tested this manually for now. It worked as expected for an empty package based and an empty integrated workspace as well as for an already preconfigured angular workspace.
d2a7028
to
74b90a2
Compare
The nx plugin now works without any manual addition of @nx/angular. You can create an empty workspace and simply add the @analogjs/platform dependency. After installing it you can run one command: nx g @analogjs/platform:app. This will automatically install all angular and analog dependencies. This plugin should also work as a preset for npx create-workspace. Since e2e testing for nx plugins is still a bit messy I tested this manually for now. It worked as expected for an empty package based and an empty integrated workspace as well as for an already preconfigured angular workspace.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
Which package are you modifying?
What is the current behavior?
Nx plugin required you to have your workspace already configured with angular.
Issue Number: #320
What is the new behavior?
This PR makes the analog plugin take care of all the config. It also makes the Nx plugin
compatible with npx create-nx-workspace presets. (need to verify this after publishing to npm)
It also adds support for setting up tailwind
Does this PR introduce a breaking change?
Other information
I wouldn't consider this completing #320 because we still need to update the Docs and integrate a SPARTAN setup.
I'd like to have all this working before writing the docs to make them be in sync from the get go :)