Giter Site home page Giter Site logo

Comments (6)

heartsucker avatar heartsucker commented on July 22, 2024

Hmm. It copies the whole node_modules dir, and that includes the dev dependencies. I have gone back and forth with including the node_modules in the .deb and have left it there for the stable/immutable packages possible. You could just rm -rf the node_modules and have a lean .deb.

I'm not sure if there's a reasonable way to walk the dependency tree and rip out the things you don't want. I can take a peek later.

from node-deb.

vidstige avatar vidstige commented on July 22, 2024

No, I think it's great to include the node_modules so you have a complete stand-alone package. 👍 It's more all the extra bloat that's not really needed. Walking the dep tree might be tricky... hmm, I'll just first run unit tests, then clear node_modules/ and then run npm install --production

from node-deb.

vidstige avatar vidstige commented on July 22, 2024

Wait that didn't work as it also removed the devDependency node-deb... Oh well, I'll keep the bloat stuff in there for now ^^

from node-deb.

heartsucker avatar heartsucker commented on July 22, 2024

I think a partial fix to this will be to add something to the docs to make devs aware of this.

from node-deb.

vidstige avatar vidstige commented on July 22, 2024

I made some further investigations and I think instead of including node_modules/ by default, just include everything this command npm ls --parseable --prod

For my project for example I get a nice flat list of all the prod dependencies. I'll try to make a pr if I ever get around.

from node-deb.

heartsucker avatar heartsucker commented on July 22, 2024

Oh dang. This is perfect. I think I can have a fix ready in a few minutes. Good find!

from node-deb.

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.