skatejs/generator-skatejs

Generated code broken?

gweax opened this issue · 4 comments

gweax commented

I'm currently evaluating several frameworks to create a styleguide using web components. Skate.js looks very nice. However, when trying to setup a project with the yeoman generator, I encountered several problems.

I created an empty directory, cd'ed in and ran yo skatejs. This step went fine (though I wonder why do you need my email address and why do you ask what to call me).

Without changing anything in the generated files, I ran yarn storybook. The server started, however in the browser I see a big red error message exports is not defined followed by a stacktrace. I have no idea what the problem is. A broken webpack configuration maybe?

I then tried something else. I ran yarn test, but that failed as well

ERROR in ./test/components/my-button-test.js
Module parse failed: Unexpected token (6:17)

The given line and column seem to imply that JSX is unsupported. But shouldn't the generator generate working code and tooling?

This step went fine (though I wonder why do you need my email address and why do you ask what to call me).

Just to fill out the package.json fields.

RE the other problems, there's a good chance there's been changes to dependencies that make it incompatible with the current Storybook setup. The whole thing is quite a bit of a hack, unfortunately.

Part of the issue might be that Skate 5 has changed quite a bit since I wrote these tools. I can definitely update to the latest API, but I'm not sure that's actually the problem (since I tried moving to the new API, but the problems didn't go away.

I'm seeing the same exports is not defined error in Storybook, but the stack trace isn't particularly useful. I also don't use this project at all anymore, so if you are able to help diagnose the problem at all @gweax, that would be really useful.

gweax commented

Thank you for the work you did and the effort you put into trying to fix it.

I will put some time into diagnosing the problem, but not too much. If I had already decided on using Skate, I would gladly dig deeper into it, but since I'm still in the evaluating phase, the time is limited.

I'll let you know if I find something relevant.

Sure thing. Flip side of the coin — I’d love to hear what you arrive on as the ideal tool for a WC styleguide!