GithubHelp home page GithubHelp logo

Comments (5)

rtfpessoa avatar rtfpessoa commented on May 26, 2024 2

Ok I think I got it.

I do not think removing any files by default it a good idea since some people might want to see them.

Still I can see two solutions for your problem. The quickest is excluding the files you want in the diff like this git diff -- . ':(exclude)package-lock.json' | diff2html -i stdin. The other would be like you described collapsing files with a lot of lines changed and that would be a nice feature.

If you think you would be willing to implement the second here are some ideas:

from diff2html-cli.

alamothe avatar alamothe commented on May 26, 2024 1

It would be great to collapse huge files, and only load them on user click

diff2html can hang for minutes for files which are over 10k lines

from diff2html-cli.

rtfpessoa avatar rtfpessoa commented on May 26, 2024 1

Any PRs are welcome.

from diff2html-cli.

rtfpessoa avatar rtfpessoa commented on May 26, 2024

This project uses yarn so instead of npm install you should do yarn.

Still if you want to ignore that file feel free to send a PR.

from diff2html-cli.

whyboris avatar whyboris commented on May 26, 2024

Thank you for the quick response. Sorry if I've described the scenario poorly.

When using diff2thtml-cli on (for example) an Angular project where package.json was recently updated and npm install was run, diff2html-cli correctly shows the diff between the old and the updated package-lock.json files.

The problem arises that it's a large file with changes that are useless to (I assume pretty much) any developer. If it was collapsed by default in the HTML view that would be great (but that would require extra functionality to be added to the diff2html-cli & it would still slow down the experience - having to write and possibly render all the contents). The other option is that diff2html-cli simply ignores the file when creating the html diff view.

I am open to creating a PR to implement this feature (provided I find enough time and figure out how to do it). I certainly would want to confirm with you before working on this (fore me) time-consuming task that it would be a welcome improvement to the diff2html-cli rather than an unacceptable change.

Cheers!

from diff2html-cli.

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.