analogjs / analog

The fullstack meta-framework for Angular. Powered by Vite and Nitro
https://analogjs.org
MIT License
2.5k stars 240 forks source link

Docs: Nx Plugin #320

Closed yassernasc closed 1 year ago

yassernasc commented 1 year ago

Please provide the environment you discovered this bug in.

not quite a bug šŸ˜…

Which area/package is the issue in?

Docs

Description

At packages/nx-plugin/README.md, instead:

nx g @analogjs/nx:app analog-app

The correct command seems to be

nx g @analogjs/platform:app analog-app

As well, we can create a new page inside the Integration section at the official docs with the packages/nx-plugin/README.md content.

Please provide the exception or error you saw

No response

Other information

No response

I would be willing to submit a PR to fix this issue

brandonroberts commented 1 year ago

Thanks @yassernasc. That fix would be good. I'd like to have a more detailed docs page for usage with Nx under the Integrations section, so I think it would be its own document of how to:

yassernasc commented 1 year ago

I think I was rushed creating this "docs bug" because the plugin doesn't seem to be ready to use yet, I got some errors trying to run the default template at some empty nx workspaces.

brandonroberts commented 1 year ago

I think its ok to test out with. I ran into an issue with a completely empty workspace also. There is no tsconfig.base.json generated with an empty workspace which caused an error when trying to generate a new app.

These steps worked for me:

  1. npx create-nx-workspace@latest my-workspace (Choose integrated)
  2. (Choose angular workspace preset)
  3. npm i @analogjs/platform --save-dev
  4. nx g @analogjs/platform:app analog-app
  5. nx build analog-app
  6. nx test analog-app
brandonroberts commented 1 year ago

We should support starting from an empty workspace with no preset also @goetzrobin

goetzrobin commented 1 year ago

@brandonroberts agreed definitely need to update the docs and add support for an empty workspace. Do you think it's worth reaching out to the Nx team to see if they are interested in an analog workspace preset?

brandonroberts commented 1 year ago

Not quite yet. Nx is for "stable" projects, and we aren't quite there yet version-wise.

brandonroberts commented 1 year ago

We can create a preset generator to work with create-nx-workspace out of the box though so its only one step

https://nx.dev/recipes/advanced-plugins/create-preset

goetzrobin commented 1 year ago

Not quite yet. Nx is for "stable" projects, and we aren't quite there yet version-wise.

Fair enough! We got some more work to do šŸ˜Ž

goetzrobin commented 1 year ago

I'll give this some love the next couple days/weeks and make sure you can get analog up and running in Nx with a single step

brandonroberts commented 1 year ago

We can close this one right?

goetzrobin commented 1 year ago

Iā€™d say so