Skip to content
Permalink
Browse files

fix: Parse inner modules by checking package.json

  • Loading branch information...
iamthes committed Nov 13, 2017
1 parent bb324ec commit 256bd91f5e199eda35b46c017cc780667ba6f968
Showing with 3 additions and 6 deletions.
  1. +1 −1 package.json
  2. +2 −5 src/module.ts
@@ -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"
@@ -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) {

0 comments on commit 256bd91

Please sign in to comment.
You can’t perform that action at this time.