Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a living styleguide generator for Angular 2, much like styleguidist for React?

For React, there exist a couple of living styleguide generators, like styleguidist, that take components, sass and some extra editable text and automatically generate a styleguide for a particular app out of this, depending on where the styleguide task is inserted into the build process, with every repeat of that process. Does anything similar exist for Angular 2+?

Caveat: I do not mean a coding styleguide, but a living styleguide that pretty much automatically documents layout (sass/css)styles, fonts, icons, colours, font sizes, and components with their parameters, amongst others. Those things happen to be called styleguides too, sorry about that, but I did not invent the name.

like image 663
yogibimbi Avatar asked Apr 28 '17 14:04

yogibimbi


2 Answers

Storybook is also a good solution, but you also need to write code to define your different scenarios. Storybook has been originally developed for React but is now also compatible with Angular.

like image 95
Nicolas Forney Avatar answered Nov 15 '22 16:11

Nicolas Forney


UI-jar is a drop in module that automatically create a living style guide based on the test you write for your components in Angular (2.x and above). A beta is available at https://www.npmjs.com/package/ui-jar

With UI-jar it's also possible to develop your components isolated, without the need of the rest of your app.

You also get documentation about your components.

like image 28
Nording Avatar answered Nov 15 '22 16:11

Nording