wingsuit-designsystem / wingsuit

Twig for Storybook
GNU General Public License v2.0
91 stars 16 forks source link

What is initJsBehaviors('Drupal') for? #131

Closed mhlozek closed 2 years ago

mhlozek commented 3 years ago

Hi, I use wingsuit without Drupal (we develop own CMS with twig templates). So my question is - what is statement initJsBehaviors('Drupal'); for?

I have tried to remove this line, but I get some linting errors (initJsBehaviors is defined and never used or something like that). Are there any other options than "Drupal"?

And one more question (sorry :) I use cssMode: 'extract' mode in storybook app, so I can copy compiled css from dist folder to another project. Can I compile JS files from patterns folder in to dist folder in similar way?

Thank you very much for your great project!

christianwiedemann commented 3 years ago

This is the primary Function of all behaviors. For Drupal it is "Drupal".behaviors. So you can change them to "CustomName".behaviors.

The second part of your question is not clear for me. Do you need to deploy your scripts. You need a way to deploy your scripts?

mhlozek commented 3 years ago

Yes, exactly. I would like to deploy scripts from Wingsuit.

christianwiedemann commented 3 years ago

Hi @mhlozek I created a CMS boilderplate. Check #134. maybe we can merge your requirements with #134.

Thanks for feedback!