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

Request: make BuildImporter a public API #41

Open
refi64 opened this issue Jun 19, 2018 · 5 comments
Open

Request: make BuildImporter a public API #41

refi64 opened this issue Jun 19, 2018 · 5 comments

Comments

@refi64
Copy link

refi64 commented Jun 19, 2018

I want to add Sass support to VueDart 0.4, and right now I'm importing this project's BuildImporter, even though it's technically private please don't kill me. However, I figured this might be something other projects may want, too, so I was wondering what the chances would be to make BuildImporter "officially" public...

@nshahan
Copy link
Collaborator

nshahan commented Jun 20, 2018

I'm not opposed to the idea, but I am more curious why you are not just using the exposed builder?

@refi64
Copy link
Author

refi64 commented Jun 20, 2018

The reason is that I'm compiling inline Sass inside of the Vue templates, e.g.:

<style scoped lang="scss">
/* etc */
</style>

@nshahan
Copy link
Collaborator

nshahan commented Jul 2, 2018

I am reluctant to expose it since it will legitimize adding a dependency on sass_builder for packages that only want to reuse the Importer.

By adding the dependency you are signalling to build_runner to automatically run sass_builder on your package during the build which might unnecessarily add to the build time.

auto_apply: dependents

I'm still thinking about how we should handle this. Maybe we should expose the Importer in a different package.

@nshahan
Copy link
Collaborator

nshahan commented Jul 7, 2018

I'm thinking for now that if we move it out of lib/src we just recommend that anyone depending on the package just to import that file should disable the sass_builder on their package. Does that make sense?

Something like:

targets:
  vue:
...
    builders:
      sass_builder|sass_builder:
        enabled: False

@refi64
Copy link
Author

refi64 commented Jul 7, 2018

Honestly, I think that would be entirely fine. Realistically I have no doubt that a bunch of VueDart projects will end up using Sass anyway...

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

2 participants