GithubHelp home page GithubHelp logo

node_modules in git about nodeclub HOT 7 CLOSED

cnodejs avatar cnodejs commented on July 16, 2024
node_modules in git

from nodeclub.

Comments (7)

 avatar commented on July 16, 2024

如果你发布的是库,不应该把 node_modules 放入 git
而如果你发布的是软件,可以考虑把 node_modules 放入 git

from nodeclub.

fengmk2 avatar fengmk2 commented on July 16, 2024

ok,确实需要这样做。

from nodeclub.

ericzhang-cn avatar ericzhang-cn commented on July 16, 2024

我个人还是建议不论是库还是软件都将node_modules加入.gitignore列表,因为通过npm install -d可以很方便安装相关模块。同时最大程度利用了npm的灵活性,减少耦合。另外,将node_modules放入git必然会令git库变庞大,浪费空间。

from nodeclub.

freizl avatar freizl commented on July 16, 2024

如果那个库我们改过,我觉得应该进git。
要不然别人npm install 之后还得自己按照readme去改,赶脚不方便。

from nodeclub.

guileen avatar guileen commented on July 16, 2024

@freizl 自己改过的也不应该进git,既然是自己改过的module,那这个module应该有他自己的git,你当然也可以修改他的package name,比如叫做 myusername-somelib 依然可以用npm来管理。

from nodeclub.

freizl avatar freizl commented on July 16, 2024

我是指比如nodeclub这个项目开发的时候需要修改一些库,那这些被修改的库应该加入source control, 否则别人用的时候需要他自己再手动去修改,感觉不是很好。

from nodeclub.

fengmk2 avatar fengmk2 commented on July 16, 2024

won't do this.

from nodeclub.

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.