Code Monkey home page Code Monkey logo

Comments (10)

spudly avatar spudly commented on May 22, 2024 7

I was getting by with just running npm install--save <package> before, but now that I've enabled automatic hoisting I want it to install the package at the root so normal install won't work.

Current workflow:

  1. Run npm show <pkg> version to determine what version to use
  2. Manually add the dependency to package.json
  3. Run lerna bootstrap --scope="<my pkg>"

Adding this feature would save me a lot of time!

from lerna.

kirbysayshi avatar kirbysayshi commented on May 22, 2024 2

One way I worked around this for now:

$ lerna exec -- npm install --save debug@latest

from lerna.

ianwremmel avatar ianwremmel commented on May 22, 2024 1

I think I see two different needs that could be addressed in almost the same way:

  1. Add a dependency to a single package like you described (but maybe closer to standard npm commands):

    $ lerna install [--save] my-package-name dep-name [dep-name-two...]
    
  2. Add a dependency to all packages:

    $ lerna install [--save] dep-name [dep-name-two...]
    

    or possibly

    $ lerna install [--save] * dep-name [dep-name-two...]
    

from lerna.

rygine avatar rygine commented on May 22, 2024

the install command could take advantage of the scope flag. the ignore flag may land soon, which could be used as well.

if you're currently in a package folder, it would make sense that lerna install would add something to that package, unless otherwise specified.

from lerna.

gigabo avatar gigabo commented on May 22, 2024

Asini has this. We should port that over.

from lerna.

reggi avatar reggi commented on May 22, 2024

What's the progress with this? How do people currently do this? Manually enter it in the package.json?

from lerna.

jribeiro avatar jribeiro commented on May 22, 2024

Hi @thejameskyle, regarding #53 (comment), do you know if this is still planned to be implemented in lerna or on the experimental yarn workspaces feature? Thanks!

from lerna.

TxHawks avatar TxHawks commented on May 22, 2024

Is there a PR for this? Is there interest in one?

from lerna.

marionebl avatar marionebl commented on May 22, 2024

Implemented via #1069 and released via https://github.com/lerna/lerna/releases/tag/v2.5.0

from lerna.

lock avatar lock commented on May 22, 2024

This thread has been automatically locked because there has not been any recent activity after it was closed. Please open a new issue for related bugs.

from lerna.

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.