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

feat(devkit): make nx.json optional #6398

Merged
merged 3 commits into from Jul 29, 2021

Conversation

edbzn
Copy link
Contributor

@edbzn edbzn commented Jul 16, 2021

Current Behavior

Devkit project configuration functions require nx.json file to be present on the workspace by reading it from the Tree. This breaks the compatibility with regular Angular CLI projects.

Expected Behavior

Optionally read nx.json file from the Tree, this is particularly useful for using the devkit to create schematics and builders for regular Angular CLI projects.

Related Issue(s)

Fixes #5678

@vercel
Copy link

vercel bot commented Jul 16, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/nrwl/nx-dev/F9AvDqMi7xTD8pack4jj9qis32t7
✅ Preview: https://nx-dev-git-fork-edbzn-devkit-ignore-nx-json-nrwl.vercel.app

@edbzn edbzn changed the title [devkit] Add ignoreNxJson option feat(devkit): add ignoreNxJson option Jul 16, 2021
@nx-cloud
Copy link

nx-cloud bot commented Jul 16, 2021

Nx Cloud Report

CI is running for commit 4110ae5.

📂 Click to track the progress, see the status, the terminal output, and the build insights.


Sent with 💌 from NxCloud.

Copy link
Collaborator

@FrozenPandaz FrozenPandaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much for contributing!

Please change the implementation to always expect nx.json to be optional. I think it should make the logic much easier.

Allow project configuration functions to work without nx.json configuration file, this is particulary handy for regular Angular CLI projects.
@edbzn edbzn requested a review from FrozenPandaz July 26, 2021 10:41
@edbzn edbzn changed the title feat(devkit): add ignoreNxJson option feat(devkit): make nx.json optional Jul 26, 2021
Copy link
Collaborator

@FrozenPandaz FrozenPandaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent job! This LGTM!

Thank you so much for contributing!

@FrozenPandaz FrozenPandaz merged commit 5a93037 into nrwl:master Jul 29, 2021
FrozenPandaz added a commit that referenced this pull request Jul 29, 2021
* feat(devkit): make nx.json optional (#5678)

Allow project configuration functions to work without nx.json configuration file, this is particulary handy for regular Angular CLI projects.

* docs(devkit): make `NxJsonConfiguration` partial

Co-authored-by: Jason Jean <jasonjean1993@gmail.com>
@edbzn edbzn deleted the devkit-ignore-nx-json branch July 30, 2021 09:19
ManojBahuguna pushed a commit to ManojBahuguna/nx that referenced this pull request Sep 16, 2021
* feat(devkit): make nx.json optional (nrwl#5678)

Allow project configuration functions to work without nx.json configuration file, this is particulary handy for regular Angular CLI projects.

* docs(devkit): make `NxJsonConfiguration` partial

Co-authored-by: Jason Jean <jasonjean1993@gmail.com>
@github-actions
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

@nrwl/devkit should expose readWorkspace
2 participants