From 85f9207e67c26bf0ad155f10d1cf29239a106188 Mon Sep 17 00:00:00 2001 From: Ruslan Hrabovyi Date: Mon, 28 Dec 2020 01:42:28 +0200 Subject: [PATCH] wip: hande default re-exports --- index.js | 41 +++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/index.js b/index.js index 078daf00..a22dab9e 100644 --- a/index.js +++ b/index.js @@ -46,23 +46,32 @@ module.exports = { // `import { clickable } from 'ember-cli-page-object/test-support';` // // which is a default behavior in ember-cli - const reexportsTree = mergeTrees([ - 'index', - 'extend', - 'macros', - 'adapter', - 'adapters', - 'adapters/acceptance-native-events', - 'adapters/acceptance', - 'adapters/integration-native-events', - 'adapters/integration', - 'adapters/rfc268', - ].map(publicModuleName => - writeFile( - `/${this.moduleName()}/${publicModuleName}.js`, - `export * from '${this.moduleName()}/test-support/${publicModuleName}';` + const reexportsTree = mergeTrees( + [ + 'index', + 'extend', + 'macros', + 'adapter', + 'adapters', + ].map(publicModuleName => + writeFile( + `/${this.moduleName()}/${publicModuleName}.js`, + `export * from '${this.moduleName()}/test-support/${publicModuleName}';` + ) + ), + [ + 'adapters/acceptance-native-events', + 'adapters/acceptance', + 'adapters/integration-native-events', + 'adapters/integration', + 'adapters/rfc268', + ].map(publicModuleName => + writeFile( + `/${this.moduleName()}/${publicModuleName}.js`, + `export { default } from '${this.moduleName()}/test-support/${publicModuleName}';` + ) ) - )); + ); return mergeTrees([ testSupportTree,