Skip to content

alexjv89/storybook-ejs

Repository files navigation

storybook-ejs - About

Links - Docs, Website

This is a alternative to storybook. This helps you write documentation and map out scenarios for your ejs templates.

The concept of writing UI components in react and independantly testing them is a great idea. It makes sense. However for projects that uses ejs for templating, the idea of createing components is not easy. Its possible, but not easy. Javascript written in a EJS component is not localised. It can intefere with other components.

So it might be obvious that ejs may or maynot be suited for large projects. But for projects where you want to use EJS, there is no good tooling to create EJS components. This is a story boook for EJS components. This was designed with sailjs in mind but it can be implemented in any project.

EJS components

Write the template and the javascript associated with the component in the same component. This is not as elegant as React, but it sure does work.

Installation

Pull code

Use degit to pull this code into your repo.

degit github:alexjv89/storybook-ejs .storybook

we suggest installing this into a folder called .storybook.

Add script to package.json

Add this to your main repo's package.json

	"storybook":"node .storybook/index.js",
	"storybook:update":"degit github:alexjv89/storybook-ejs .storybook --force",

Install dependencies

cd .storybook && npm install

Run storybook

npm run storybook

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published