The JavaScript blog.


libraries node email modules network notifications vm automation

Node Roundup: watch-network, MailDev, node-notifier

Posted on .


If you use something like Docker or Vagrant and want to listen for file notifications over the network, then watch-network (GitHub: efacilitation/watch-network, License: MIT, npm: watch-network) by Johannes Becker might come in handy. It can be used with Gulp, so you could run Gulp tasks when a specific network notification comes in.

Here's a basic example:

var watch = WatchNetWork({  
  configs: [{
    patterns: 'lib/*.coffee',
    tasks: 'something:important',
    onLoad: true

watch.task('something:important', function(changedFiles) {  
  // ..


Here's the use-case that Johannes described:

Scenario: You use Vagrant/VirtualBox in your workflow to have services and configurations in an encapsulated environment. For developing purposes you now sync a local directory into the VM using vboxfs, nfs, rsync or similar. In your VM you want to use watcher facilities for developing-concerns, but for some reason triggering inotify over the network seems to be troublesome or unreliable.



If you've ever felt like handling emails in web applications is messy, and you don't feel like your emails are as good as they could be, then you're not alone! I always feel like emails are annoying to develop, so I thought MailDev (GitHub: djfarrelly/maildev, License: MIT, npm: maildev) looked interesting. This module helps you test your project's generated emails during development with a responsive web interface. It has a Node API, and there's even a REST API so you could integrate it with other services.

Emails are displayed with WebSockets, so you don't have to keep refreshing, and it'll show HTML, text, and attachments.

I currently send all the generated emails to a temporary directory, then open them up when I need to. MailDev seems like a much better solution.


Mikael Brevik sent in node-notifier (GitHub: mikaelbr/node-notifier, License: MIT, npm: node-notifier), in response to the recent mention of trayballoon. Node-notifier tries to smooth out the differences between each platform, so you can use notification features that are present on all platforms more easily. It also supports actions on notifications.

Mikael notes that it works with node-webkit, which is cool if you're making Node desktop apps, and it supports the following notification systems:

  • Mac: Notification Center, Growl
  • Windows: Toasters, trayballoon
  • Linux: notify-osd

Here's an example:

var notifier = require('node-notifier');  
  'title': 'My notification',
  'message': 'Hello, there!'


jquery ui plugins databinding notifications

jQuery Roundup: Flex, jquery-binddata, jquery.notification

Posted on .

Note: You can send your plugins and articles in for review through our contact form or @dailyjs.


jQuery Flex

Flex (GitHub: jasonenglish / jquery-flex, License: MIT) by Jason English displays an animated grid with expanding panels.

The author has based the effect on a design originally implemented with Flash. He was compelled to write the plugin after he found a discussion on Stack Overflow that suggested creating the effect with JavaScript would be impossible.


jquery-binddata is a new plugin created by "jdavidw13" that helps bind form fields to simple JavaScript data models. If you're used to working with MVC frameworks and want to carry across some of the related data binding techniques to a smaller jQuery project, then this plugin might do the trick.

The basic usage is to provide the plugin with an object to bind and a form element:

var data = { field: 'value' };  

QUnit tests have been included, and the plugin is currently only about 200 lines long.


jquery.notification (License: MIT) by Mikhail Davydov is a wrapper around the WebKit Notifications API. I've seen quite a few of these plugins, but I don't think I've actually seen them used effectively in the wild.

If you're looking for such a thing, the plugin looks like this:

var notification = $.notification(options, function(isNotificationsAllowed) {  
  if (isNotificationsAllowed) {