Giter VIP home page Giter VIP logo

Comments (7)

SBoudrias avatar SBoudrias commented on June 2, 2024

Can you expand on what you expect the behavior should be?

from generator-karma.

alfonso-presa avatar alfonso-presa commented on June 2, 2024

Of course, sorry for the sort description.

May be I'm wrong but I expect this two commands to be equivalent:
This:
yo karma --skip-install & npm install
And this:
yo karma

It turns out that the first one fails as no dependency is added to package.json, because npm install is used to do so with the --save-dev option.

This is relevant because I've seen some issues in generator angular because of the concurrent execution of both npm install commands, and I was trying to solve it by passing skip-install to karma:app and relying on generator angular install process... But it fails because no karma dependencies are added to the package.json.

from generator-karma.

SBoudrias avatar SBoudrias commented on June 2, 2024

Ok, that's a bug in this generator who should add it's dependency manually to the package.json

from generator-karma.

alfonso-presa avatar alfonso-presa commented on June 2, 2024

I was trying to give a try to solve this by myself when I realized that there's no way to modify the package.json consistently with the npm configuration (check "save-bundle" option and "save-prefix" option at https://github.com/npm/npm/blob/master/lib/install.js#L408) without using npm itself.

Maybe this is only possible if they add a method in npm to modify the package.json that doesn't actually trigger the downloading of artifacts....

I really feel all generator --skip-install should be consistent with a later execution of npm install, but I don't see how to solve my own request in the generator itself. I'm going to fill an issue to npm. Should I close this one or should I keep it and link to the npm one just in case they implement the feature? What do you think?

Thanks!

from generator-karma.

alfonso-presa avatar alfonso-presa commented on June 2, 2024

Npm issue: npm/npm#7865

from generator-karma.

SBoudrias avatar SBoudrias commented on June 2, 2024

I think you're not looking at the issue from the right angle.

This generator should add it's dependency to the package.json file without relying on npm --save

from generator-karma.

alfonso-presa avatar alfonso-presa commented on June 2, 2024

This should be solved in 1.0.0

from generator-karma.

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.