Skip to content

Latest commit

 

History

History
34 lines (24 loc) · 857 Bytes

README.md

File metadata and controls

34 lines (24 loc) · 857 Bytes

set iterm2 badge

Thanks to @sel-fish

Usage

Use it in your Webpack config, Gulpfile.js, Express app or other Node project to set a distinct infomation on the right up corner of Iterm2.

pure nodejs integration

var setIterm2Badge = require('set-iterm2-badge');
var port = '8088';
setIterm2Badge(port);

browser-sync integration

var setIterm2Badge = require('set-iterm2-badge');
var bs = require('browser-sync').create();
bs.init({
    port: "8080"
}, function(err, bs) {
    // The actual port may not be the passed in "8080"
    //  as bs ensures listen a empty port inside
    setIterm2Badge(bs.options.getIn(['port']));
})

Result Preview

result