Giter Site home page Giter Site logo

watchn's People

Contributors

mkitt avatar timoxley avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

timoxley

watchn's Issues

Not monitoring directories for me

I was very excited to see this project. I setup a quick example and out of the box it isn't working for me when I monitor directories. If I watch a file then it works fine but the callback is not being fired when I watch directories.

Here is my quick example:

var cp = require('child_process');

module.exports.init = function(watchn) {

// watchn.watch('build', ['./modules/js/AlertGrid.js'], function(options) { <--- this works fine
watchn.watch('build', ['./modules/js/'], function(options) {

console.log(options);      // <------ doesn't execute when watching the directory

// File has changed
if (options.curr > options.prev) {

    console.log('');
    console.log('--------------------------------------');
    console.log('CHANGE DETECTED');
    console.log('--------------------------------------');
    console.log('');

    cp.exec('./build.sh -c', function(error, stdout, stderr) {

        if (error !== null) {
            console.log(stderr);
        } else {
            console.log(stdout);
        }
    })
}

})

}

Occasional random crashing

Occasionally watchn crashes when a task fails. It generally happens when editing a .scss file and that file contains errors when it is saved, but not always. It's rare and pure randomness. I've gone a few days without shutting watchn down and never see it. Not sure what the work around is since there doesn't seem to be a pattern related to it. For now, watchn should output a message or growl something to the user that its left the building

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.