You can also add "/package" at the end of the module name, which will work for other modules as well
var pkg = require( 'my-module/package' ); console.log( 'v' + pkg.version ); On Sunday, July 29, 2012 1:40:59 PM UTC-5, azer wrote: > > Hi all, > > I'm looking for a library to print out the current version of my > application, like following; > > var currentVersion = require('current-version'); > > currentVersion(function(error, v){ > > console.log( 'v'+ v); > > }); > > Azer > -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en