Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proper File Globbing with Recursive Imports #14

Open
RayBenefield opened this issue Nov 19, 2017 · 2 comments
Open

Proper File Globbing with Recursive Imports #14

RayBenefield opened this issue Nov 19, 2017 · 2 comments

Comments

@RayBenefield
Copy link

PR #10 introduced File Globbing, and shortly afterwards PR #11 introduced Recursive Imports. However the two features do not mesh properly together.

For example:

|- index.js
|- dir
    |- before_a.js
    |- c.js
    |- before_nested
        |- b.js

The following should be possible:

import * as Before from './dir/before_*';

console.log(Before.BeforeA()); // Whatever is in './before_a.js'
console.log(Before.BeforeNested.B()); // Whatever is in './before_nested/b.js'

@drgould does the above look right to you?

@drgould
Copy link
Contributor

drgould commented Nov 20, 2017

Yeah, that looks correct.

@rburnham52
Copy link

Wouldn't a recursive glob statement look like this?

import * as Before from './dir/**/before_*';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants