mothership
Version:
Helps a module find its package.json mothership.
14 lines (10 loc) • 344 B
JavaScript
;
var mothership = require('../')
, path = require('path');
var res = mothership.sync(
path.join(__dirname, 'uno', 'dos', 'tres')
, function ismothership (pack) {
return !!(pack.dependencies && pack.dependencies.unodep);
}
)
console.log('found mothership', res.path); // => [..]/example/uno/package.json