lib/utils/require.js
function projectOrHereRequire(id,root) {
	try {
		return resolve.sync(id, {
			package: path.join(root,'package.json'),
			paths: [root],
			basedir:root
		});
	} catch(ex) {
		// console.error(ex);
	}

	var here = path.join(__dirname,'..','..');
	try {
		var p = resolve.sync(id, {
			package: path.join(here,'package.json'),
			paths: [here],
			basedir:here
		});
		return p;
	} catch(ex) {
		// console.error(ex);
	}
}
function projectOrHereRequire(id,root) {
	try {
		return resolve.sync(id, {
			package: path.join(root,'package.json'),
			paths: [root],
			basedir:root
		});
	} catch(ex) {
		// console.error(ex);
	}

	var here = path.join(__dirname,'..','..');
	try {
		var p = resolve.sync(id, {
			package: path.join(here,'package.json'),
			paths: [here],
			basedir:here
		});
		return p;
	} catch(ex) {
		// console.error(ex);
	}
}
function projectOrHereRequire ( id , root ) { try { return resolve . sync ( id , { package : path . join ( root , 'package.json' ) , paths : [ root ] , basedir : root } ) ; } catch ( ex ) { // console.error(ex); } var here = path . join ( __dirname , '..' , '..' ) ; try { var p = resolve . sync ( id , { package : path . join ( here , 'package.json' ) , paths : [ here ] , basedir : here } ) ; return p ; } catch ( ex ) { // console.error(ex); } }
return path to found, project first
return path to found project first