Giter VIP home page Giter VIP logo

Comments (10)

wooorm avatar wooorm commented on May 20, 2024

Closest to this is the --watch argument on the CLI (unified-args)

This is pretty interesting, but not doable easily. E.g., what is a “change”?

  • Is that a change in the contents of a file?
  • Or a different file path (file.path !== file.history[0])
  • Should we start supporting stats, and track changes to mode, mtime, and the like?

I think this would be roughly related to GH-22 too.

from unified-engine.

StarpTech avatar StarpTech commented on May 20, 2024

Yes, it's a change in the original file when I use output: true

from unified-engine.

StarpTech avatar StarpTech commented on May 20, 2024

Why it should be related to a cache?

from unified-engine.

wooorm avatar wooorm commented on May 20, 2024

It doesn’t have to be, but my above three points are also what’s needed for caching. Albeit that “changed” files, as described above, relate to comparing a file before processing to after processing, whereas caching compares them between processes.

from unified-engine.

StarpTech avatar StarpTech commented on May 20, 2024

OK I got but for clarification my issue is only about to list which files are touched. Touch means as soon as I change the original content of the file (option: output).

from unified-engine.

wooorm avatar wooorm commented on May 20, 2024

Wait, are you talking about written files, instead of “changed” files?

from unified-engine.

StarpTech avatar StarpTech commented on May 20, 2024

No, I'm talking about updated files. List all written files is already supported but it doesn't help because it shows all found files based on the pattern.

from unified-engine.

wooorm avatar wooorm commented on May 20, 2024

Well, that’s hard. And then we need a definition of changed, and my proposal in my first comment is that I believe?

from unified-engine.

StarpTech avatar StarpTech commented on May 20, 2024

Yes. My proposal: changed means when source content != content (after processing). It doesn't matter if the content is saved to a different location when the content was changed.

from unified-engine.

wooorm avatar wooorm commented on May 20, 2024

First what we need to figure out is how to check if file.contents (string or buffer) equals a file on disk. I’m thinking node-stream-equal could work, if file.contents was made into a stream.
Any other thoughts?

Next steps would be to wrap that in a vfile-matches-file-on-disk utility (which obviously needs a better name). And then to filter the files here using that utility if a flag is set.

from unified-engine.

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.