lib/entries.js
function getEntryImports(dir, content, arr = []) {
	$C(content.split(eol)).forEach((line) => {
		if (!hasImport.test(line)) {
			return;
		}

		const
			url = RegExp.$2,
			nodeModule = isNodeModule(url);

		if (nodeModule && entriesDir.test(url) || insideEntry.test(url)) {
			const
				d = nodeModule ? lib : dir;

			let
				f = path.join(d, `${url}.js`);

			if (!fs.existsSync(f)) {
				f = path.join(d, url, 'index.js');
			}

			getEntryImports(path.dirname(f), fs.readFileSync(f, 'utf-8'), arr);

		} else {
			arr.push(nodeModule ? url : path.join(dir, url));
		}
	});

	return arr;
}
function getEntryImports(dir, content, arr = []) {
	$C(content.split(eol)).forEach((line) => {
		if (!hasImport.test(line)) {
			return;
		}

		const
			url = RegExp.$2,
			nodeModule = isNodeModule(url);

		if (nodeModule && entriesDir.test(url) || insideEntry.test(url)) {
			const
				d = nodeModule ? lib : dir;

			let
				f = path.join(d, `${url}.js`);

			if (!fs.existsSync(f)) {
				f = path.join(d, url, 'index.js');
			}

			getEntryImports(path.dirname(f), fs.readFileSync(f, 'utf-8'), arr);

		} else {
			arr.push(nodeModule ? url : path.join(dir, url));
		}
	});

	return arr;
}
function getEntryImports ( dir , content , arr = [ ] ) { $C ( content . split ( eol ) ) . forEach ( ( line ) => { if ( ! hasImport . test ( line ) ) { return ; } const url = RegExp . $2 , nodeModule = isNodeModule ( url ) ; if ( nodeModule && entriesDir . test ( url ) || insideEntry . test ( url ) ) { const d = nodeModule ? lib : dir ; let f = path . join ( d , ` ${ url } ` ) ; if ( ! fs . existsSync ( f ) ) { f = path . join ( d , url , 'index.js' ) ; } getEntryImports ( path . dirname ( f ) , fs . readFileSync ( f , 'utf-8' ) , arr ) ; } else { arr . push ( nodeModule ? url : path . join ( dir , url ) ) ; } } ) ; return arr ; }
Returns a list of imports from the specified entry file

@param {string} dir - entry directory
@param {string} content - file content
@param {!Array} [arr]
@returns {!Array<string>}
Returns a list of imports from the specified entry file