nrwl / nx

Smart Monorepos · Fast CI
https://nx.dev
MIT License
23.29k stars 2.32k forks source link

Ability to skipPackageJson when generating a React app #8157

Closed LironHazan closed 2 years ago

LironHazan commented 2 years ago

Description

I would like to have the skipPackageJson flag when generating a React application (+ skipping the installation as well)

Motivation

I would like to use NX as the main building tool in a monorepo which will include both Angular and React apps, While I respect the "Single-version policy" my needs requires having a separated deployment of each app and I'm testing a use of NX with npm-workspaces in order to be able to manage my projects packages eassily. So each time I'll use the nx generators for generating a new app I wouldn't want it to add the dependencies on the root's repo package.json.

Alternatively I could generate an app directly under the /packages using my own scripts but I'll need to handle tweaking the nx config files (workspace.json) and add a project.json template and I would rather have that by using nx ootb generators if possible. Another option would be to use the app generator and "cleaning" the package.json afterwards myself.

Suggested Implementation

There's the "skipPackageJson" flag for Angular (which isn't working at the moment btw) having such for React could be great. nx g @nrwl/react:application --skipPackageJson=true

Alternate Implementations

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. If we missed this issue please reply to keep it active. Thanks for being a part of the Nx community! 🙏

github-actions[bot] commented 1 year ago

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.