GithubHelp home page GithubHelp logo

Comments (8)

amasad avatar amasad commented on May 28, 2024

It should still be there if you're using the NodeWatcher class. However, it's an internal property and maybe missing if you're using other watching backends (e.g. watchman)

from sane.

DavidSouther avatar DavidSouther commented on May 28, 2024

The property is there in NodeWatcher, but it only has directories, not the actual found files.

from sane.

DavidSouther avatar DavidSouther commented on May 28, 2024

Oh man... I just went through the history and realized how far behind my dependency actually was.

from sane.

DavidSouther avatar DavidSouther commented on May 28, 2024

I'd had to hack together a sane-specific implementation of Gaze's gaze.watched(cb) mechanism.

from sane.

DavidSouther avatar DavidSouther commented on May 28, 2024

My root and globs are

'~/devel/rupert/stassets/test/cascade', [
  '~/devel/rupert/stassets/test/assets/**/*template.{html,jade}',
  '~/devel/rupert/stassets/test/cascade/**/*template.{html,jade}' 
]

from sane.

DavidSouther avatar DavidSouther commented on May 28, 2024

Huh... If I completely remove the glob option, sane behaves as before. Perhaps sane should assume an empty options object?

from sane.

amasad avatar amasad commented on May 28, 2024

dirRegistery has always been about registries. Sane doesn't keep a record of files watched, because it doesn't watch files and that's part of what makes it performant. The only way to check if the file is watched, is to check if it's directory is in dirRegistery and then check if satisfies the globs. However, if you want this to be a supported feature and not break in the future, let's make it into a watched method.

from sane.

DavidSouther avatar DavidSouther commented on May 28, 2024

However, if you want this to be a supported feature and not break in the future, let's make it into a watched method.

I really do, an I do this at the moment in https://github.com/RupertJS/stassets/blob/master/lib/Watchers/Asset/mirror.coffee#L112-L142

The user story is that there is a glob of files which will immediately be compiled, and will be recompiled any time there is a change. I call it a mirror here, because watching the files isn't actually a useful thing. Having an always up to date list of the current files is the important piece.

from sane.

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.