UNPKG

637 BPlain TextView Raw
1#!/usr/bin/env node
2/**
3 * Script to check for latest modules configured by ensure-latest
4 */
5var fs = require('fs'),
6 path = require('path'),
7 lib = path.join(__dirname,'..','node_modules','ensure-latest'),
8 git = path.join(__dirname,'..','.git');
9
10// on do this if we're running locally
11// we will only have a .git folder when we're running locally
12// since npm will remove it when published
13if (fs.existsSync(git) && fs.existsSync(lib)) {
14 var spawn = require('child_process').spawn;
15 var child = spawn(process.execPath, [lib], {stdio:'inherit'});
16 child.on('close', function(ec){
17 process.exit(ec);
18 });
19}
20else {
21 process.exit(0);
22}
\No newline at end of file