Skip to content
This repository has been archived by the owner on Jun 15, 2020. It is now read-only.

Commit

Permalink
fix: Parse inner modules by checking package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
unlight committed Nov 13, 2017
1 parent bb324ec commit 256bd91
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"build": "tsc",
"clean": "rimraf lib",
"prerelease": "npm run clean",
"release": "npm run build",
"release": "standard-version",
"prepublishOnly": "npm run build",
"setup": "npm i -g commitizen standard-version && commitizen init cz-conventional-changelog --save-dev",
"commit": "git-cz"
Expand Down
7 changes: 2 additions & 5 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,8 @@ export function module(name: string, options: ModuleOptions = {}): Promise<Entry
done([]);
}
items.forEach(item => {
stat(resolvePath(dirpath, item), (err, stats) => {
if (err) {
return reject(err);
}
if (stats.isDirectory()) {
stat(resolvePath(dirpath, item, 'package.json'), (err, stats) => {
if (stats && stats.isFile()) {
submodules.push(`${name}/${item}`);
}
if (--count === 0) {
Expand Down

0 comments on commit 256bd91

Please sign in to comment.