node-open-mining-portal icon indicating copy to clipboard operation
node-open-mining-portal copied to clipboard

Fix node-watch warning

Open cryptozeny opened this issue 6 years ago • 7 comments

zone117x/node-open-mining-portal#649

(node:4020) DeprecationWarning: (node-watch) First param in callback function is replaced with event name since 0.5.0, use (evt, filename) => {} if you want to get the filename

cryptozeny avatar Oct 08 '19 17:10 cryptozeny

@streetcrypto7 image

Hi, your reference was z-nomp. Its already well known source. You are not invented. https://github.com/z-classic/z-nomp/blob/104dcf33f649090c2dd6acda6b4aa37ea68c8f55/libs/website.js#L100

    // if an html file was changed reload it
    /* requires node-watch 0.5.0 or newer */
    watch(['./website', './website/pages'], function(evt, filename){
        var basename;
        // support older versions of node-watch automatically
        if (!filename && evt)
            basename = path.basename(evt);
        else
            basename = path.basename(filename);
        
        if (basename in pageFiles){
            readPageFiles([basename]);
            logger.special(logSystem, 'Server', 'Reloaded file ' + basename);
        }
    });

But since its not matched well with current NOMP#dev, and I suggested some changes, but you did not. So I made a new PR to dev branch. image

I cannot steal your commit, and your opinion is totally nonsense. Whats your problem?

cryptozeny avatar Oct 08 '19 23:10 cryptozeny

@streetcrypto7 even your commit was not same as mine. image

cryptozeny avatar Oct 08 '19 23:10 cryptozeny

@streetcrypto7 thanks

cryptozeny avatar Oct 09 '19 22:10 cryptozeny