Skip to content

Commit

Permalink
wip: hande default re-exports
Browse files Browse the repository at this point in the history
  • Loading branch information
ro0gr committed Dec 27, 2020
1 parent 45ae273 commit 85f9207
Showing 1 changed file with 25 additions and 16 deletions.
41 changes: 25 additions & 16 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 85f9207

Please sign in to comment.