Giter VIP home page Giter VIP logo

Comments (6)

lukeed avatar lukeed commented on July 18, 2024 1

Hey!

I think "in use" is a a bit ambiguous, as simply having something installed on a system doesn't mean it's actually being used or preferred. I stopped the generator before installation so that users can use whatever they want for the actual expensive task.

I think the best I can do here is adding a --yarn flag that prints and includes yarn commands. Even then I'm hesitant because anyone who's actually using yarn/pnpm is smart enough to know how to run the npm * commands in their flavor.

from pwa.

Daniel15 avatar Daniel15 commented on July 18, 2024

Hmm, that makes sense. I wonder what create-react-app does.

from pwa.

lukeed avatar lukeed commented on July 18, 2024

TBH I could have sworn that they printed npm run commands in the message. Maybe it's changed since?

from pwa.

Daniel15 avatar Daniel15 commented on July 18, 2024

I ran yarn create react-app testcra and it output this at the end:

Success! Created testcra at C:\src\testcra
Inside that directory, you can run several commands:

  yarn start
    Starts the development server.

  yarn build
    Bundles the app into static files for production.

  yarn test
    Starts the test runner.

  yarn eject
    Removes this tool and copies build dependencies, configuration files
    and scripts into the app directory. If you do this, you can’t go back!

We suggest that you begin by typing:

  cd testcra
  yarn start

from pwa.

Daniel15 avatar Daniel15 commented on July 18, 2024

@lukeed Looks like create-react-app decides to use Yarn based on whether there's a yarn.lock file in the directory: https://github.com/facebook/create-react-app/blob/26f701fd60cece427d0e6c5a0ae98a5c79993640/packages/react-scripts/scripts/init.js#L88

from pwa.

lukeed avatar lukeed commented on July 18, 2024

Okay, but that still doesn't make sense for this use case. The init creates new directories, and in the event you select the cwd you have to go thru two confirmation steps to make sure it's intended. I'd assume/hope that 99% of inits are not into existing directories πŸ˜…

from pwa.

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.