bencoveney / barrelsby

Automatic TypeScript barrels (index.ts files) for your entire code base

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multiple directories not working as expected

bruceharrison1984 opened this issue · comments

For the following config file:

{
    "directory": [
        "components",
        "hooks"
    ],
    "delete": true,
    "location": "all",
    "name": "barrel",
    "structure": "flat",
    "verbose": true,
    "include": [
        ".tsx$",
        ".ts$"
    ],
    "exclude": [
        ".stories.tsx$",
        ".props.ts$"
    ]
}

barrels are only generated in components and not hooks. Swapping their order results in hooks getting barrels, and not components. This is easy to work around by using the root directory, and adding exclusions, but seems like an oversight.

Thanks for the bug report. I think this one might be a duplicate of #175

Looks like it is, I should've checked!