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

docs/examples: build_to missing from cssBuilder #3674

Open
ewann opened this issue Apr 26, 2024 · 1 comment
Open

docs/examples: build_to missing from cssBuilder #3674

ewann opened this issue Apr 26, 2024 · 1 comment

Comments

@ewann
Copy link

ewann commented Apr 26, 2024

Off the back of https://www.youtube.com/watch?v=ngUiuIdcGjk I was reviewing the examples. After longer than I would have liked, I noticed this omission.

Happy to raise a pr, but didn't easily find contrib rules so decided to file here in the first instance - hopefully if nothing else happens it will at least be on a next persons search results.

diff --git a/example/build.yaml b/example/build.yaml
index 6d18b367..0b9831fe 100644
--- a/example/build.yaml
+++ b/example/build.yaml
@@ -24,6 +24,7 @@ builders:
     import: "package:example/builder.dart"
     builder_factories: ["cssBuilder"]
     build_extensions: {"$package$": ["web/generated.css"]}
+    build_to: source
     auto_apply: root_package
 
   textBuilder:
@jakemac53
Copy link
Contributor

jakemac53 commented Apr 29, 2024

This isn't a required field - the result of leaving it empty just means that it doesn't build to "source" it builds to "cache" (under .dart_tool/build/generated/...).

The main difference is whether it is checked into the repo by default or not (or for a package, whether it is published with the package or not). For this example, it probably doesn't particularly matter which option is chosen. We should maybe have an explicit choice though, with a comment about what it means?

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