widgetbook icon indicating copy to clipboard operation
widgetbook copied to clipboard

Question: How to configure the widgetbook builder

Open udiedrichsen opened this issue 2 years ago • 1 comments

Description It's not a bug. I just have a question regarding how to configure widgetbook in build.yaml

  widgetbook_builder:
    enabled: true
    generate_for:
      - "**/widgets/**.wb.dart"

Is something like that possible?

I want to use the watch command.

udiedrichsen avatar Mar 07 '22 15:03 udiedrichsen

Hi @udiedrichsen, thanks for raising the question, I've just talked to Lucas. I'm not exactly sure what you'd like to accomplish, but I'm assuming that you are aiming to disable the widgetbook_generator and/or only run the generator for specific files.

Can you please provide more information on what you are trying to do and why this feature would be relevant for you?

As discussed with Lucas, PRs are always welcome 💙

jenshor avatar Mar 11 '22 15:03 jenshor

Hello @udiedrichsen! You can customize the builder as follows. And you can find more configuration in the build_config package.

targets:
  $default:
    builders:
      widgetbook_generator:use_case_builder:
        generate_for:
          - lib/widgets/**

yousinix avatar Aug 04 '23 13:08 yousinix