Skip to content
This repository has been archived by the owner on Jul 20, 2018. It is now read-only.

Provide abstract parent class to Transform #66

Open
srawlins opened this issue Oct 15, 2015 · 0 comments
Open

Provide abstract parent class to Transform #66

srawlins opened this issue Oct 15, 2015 · 0 comments

Comments

@srawlins
Copy link

It would be great if Barback provided its own general interface that Transform follows. This could be exactly Angular 2's AssetReader.

I have two reasons that this would be a great asset (hehe):

  1. The very reason Angular wrote it: you could also include a faking implementation, like Angular's TestAssetReader, which also implements AssetReader, and works great for tests where you want to read fake assets, or read data directly off the filesystem.
  2. For writing generalized tools that can take Transform assets as inputs, or files from the filesystem (they would thus take an "AssetReader" or "AssetProvider" or some such thing). Such a tool could be used in transformery implementations, or other code gen implementations, where it can read straight off the disk.

Currently and unfortunately, I am importing Angular 2's AssetReader in a project, only to use AssetReader. AssetReader is a class that is really so general that I think it could go into Barback, and wouldn't require much maintenance, as it is abstract.

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

No branches or pull requests

1 participant