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

Barrelsby as an plugin/extension to the TypeScript compiler's module resolution #47

Closed
bencoveney opened this issue Nov 25, 2017 · 2 comments

Comments

@bencoveney
Copy link
Owner

bencoveney commented Nov 25, 2017

There are a couple of aspects of Barrelsby that I think could be improved by the ability to hook into they TypeScript compiler's module resolution.

  • Generating lots of barrels can help simplify your real code but contribute some level of noise to the codebase.
  • There may be a delay while barrelsby includes new .ts files before the TypeScript compiler can start compiling them as part of your application.

It would be great if we could hook into the TypeScript compiler's module resolution so that:

  • The barrel files could be "virtual" and not exist on disk.
  • There is no delay for the TypeScript compiler in accessing barrels or the files they contain.

Potentially this could be achieved using one of the following methods:

Distributing an extended TypeScript compiler may come with its own issues:

  • Keeping up with TypeScript's release schedule so that Barrelsby users get new TypeScript versions.
  • Not all build tools for TypeScript compilation may allow use of a custom TypeScript compiler.
  • Our extended compiler may prevent people using a TypeScript compiler extend in other ways.
@github-actions
Copy link

No activity has been seen recently, marking as stale. If this is a mistake please reach out to a collaborator

@zaguiini
Copy link

Just want to say that I actually made this idea a reality: https://github.com/zaguiini/typescript-virtual-barrel.

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

No branches or pull requests

2 participants