From 9d5889def7ad8d5aea5aaf5e0805872daeacd71e Mon Sep 17 00:00:00 2001 From: Levi Thomason Date: Fri, 1 Jun 2018 10:09:53 -0700 Subject: [PATCH] fix(getComponentInfo): subcomponents from js files (#2862) --- gulp/plugins/util/getComponentInfo.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gulp/plugins/util/getComponentInfo.js b/gulp/plugins/util/getComponentInfo.js index 630dda87bd..863ab79596 100644 --- a/gulp/plugins/util/getComponentInfo.js +++ b/gulp/plugins/util/getComponentInfo.js @@ -43,7 +43,7 @@ const getComponentInfo = (filepath) => { info.subcomponents = info.isParent ? fs .readdirSync(dir) - .filter(file => !/(index\.js|d\.ts)$/.test(file)) + .filter(file => /^(?!index).*\.js$/.test(file)) .filter(file => dirname !== path.basename(file, path.extname(file))) .map(file => path.basename(file, path.extname(file))) : null