Coder Social home page Coder Social logo

Comments (2)

JamesHenry avatar JamesHenry commented on July 18, 2024

We only use one name as the source of truth for a project.

  • In the case of a only package.json file being present there is name in there explicitly, so we use that.
  • If you were to set the name field in project.json to that same value we would use that and not allow anything else either.

Finally, if a project.json is present, that is the ultimate source of truth, and the behavior you are seeing is that we don't force you to write a name in the project.json file and instead infer it from its location on disk if you don't.

I agree that this combination, where there is a package.json with a name, and a project.json without a name, is currently confusing.

from nx.

AgentEnder avatar AgentEnder commented on July 18, 2024

Hey - just providing an update here. In package.json you can rename the project under the nx key. The current behavior where the name changes by adding an empty json file is confusing, we should fall back on the package.json instead.

The linked PR corrects that behavior. We can't safely remove the scope from your project names without a configuration field telling us the new name as it introduces footguns around name collisions.

from nx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.