wingsuit-designsystem / wingsuit

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

yarn ws generate-component leads to useScss is not defined (beta.30) #108

Closed iuscare closed 3 years ago

iuscare commented 3 years ago

Describe the bug I am sorry, but following error appears after upgrading to wingsuit v.1.0.0-beta.30. Downgrading back to beta.29 fixes it. The error may not appear when choosing other options during the setup process (e.g. it did not appear when I selected a presentation template).

To Reproduce Steps to reproduce the behavior:

  1. Upgrade to wingsuit v.1.0.0-beta.30
  2. Run yarn ws generate-component
  3. Run through the setup process (storybook, components, wingsuit component(ui pattern), no css, no js, automatic mdx)
  4. See error:
    
    pascal@Pascals-iMac tg-storybook % yarn ws generate-component
    yarn run v1.22.4
    $ /Users/pascal/webdev/sites/tg-storybook/node_modules/.bin/ws generate-component
    Hi! This will help you build a component folder with assets. Templates for this are in: node_modules/@wingsuit-designsystem/cli/dist/generators/component
    ? Which app should be used? storybook
    ? Where would you like this new component? 03-components
    ? What shall we name it? test
    ? What type of component would you like to create? Wingsuit component (UI Pattern)
    ? Do you need a CSS file? No
    ? Do you need an javascript attach event handler? No
    ? How do you want to document your component? Automatic
    Error while creating component. /Users/pascal/webdev/sites/tg-storybook/node_modules/@wingsuit-designsystem/cli/dist/generators/component/templates/ds/base/index.js.ejs:5
    3|  */
    4| <% if (useCss) { %>import './<%= name %>.css';<% } %>
    >> 5| <% if (useScss) { %>import './<%= name %>.scss';<% } %><% if (useJs) { %>
    6| import './<%= name %>.behavior';
    7| <% } %>

useScss is not defined ✨ Done in 10.34s.



**Expected behavior**
A blank pattern should be generated
christianwiedemann commented 3 years ago

Fixed in beta31. Thanks for reporting.