Coder Social home page Coder Social logo

pchr-srf / storybook-starterkit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from liip/storybook-starterkit

0.0 0.0 0.0 873 KB

A starterkit to create styleguides with Storybook and Twig.

License: MIT License

JavaScript 36.08% HTML 3.60% CSS 60.32%

storybook-starterkit's Introduction

Storybook Starterkit

Installation

Prerequisites: Node.js >=8.10.0

Inside the directory of your choice, install a copy of the starterkit with:

$ curl -L https://github.com/liip/storybook-starterkit/archive/master.tar.gz | tar zx --strip 1

Then install the npm dependencies with:

$ npm install

Getting Started

To start the development server, run:

$ npm start

You can now access your styleguide at localhost:3000.

You're all set, start to:

  • Create components as .twig (Twig) files inside the src directory
  • Create Storybook stories as .stories.js alongside .twig components inside the src directory
  • Write some styles inside assets/css/main.scss
  • Write JavaScript inside assets/js/styleguide.js
  • Put some .svg icons in the assets/icons directory
  • Write documentation as .stories.mdx (Markdown and JSX) files inside the docs directory.

Formatting and Linting

The documenation has not yet be written.

Testing

The documenation has not yet be written.

Build

You can build a static version of the styleguide to deploy it wherever you like by running:

$ npm run build

The generated files go to the dist directory.

Release

The documenation has not yet be written.

Deploy

The documenation has not yet be written.

Browser Support

The documenation has not yet be written.

Theming

You can customize Storybook interface with the following files:

  • .storybook/theme.js for styles that are natively supported by Storybook
  • .storybook/manager-head.html for overriding styles that are not supported by the theme.js
  • .storybook/parameters.js for showing/hiding parts of the Storybook interface

Note: You can find the storySort function to sort stories and stories kinds in the tree view (sidebar) in the ./storybook/parameters.js file. You can add, remove or change the order of appearance by changing the rootOrder array.

Example:

storySort: (a, b) => {
  // ...

  // Sort by root names, using the ordering specified in rootOrder array.
  const rootOrder = ["Atoms", "Molecules", "Organisms", "Docs"];

  // ...
};

storybook-starterkit's People

Contributors

bpeab avatar lebenleben avatar pchr-srf avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.