Skip to content
This repository has been archived by the owner on Dec 12, 2022. It is now read-only.

Starts webpack-dev-server that finds and serves components demos

Notifications You must be signed in to change notification settings

andykog/webpack-components-presenter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

webpack-components-presenter

CLI utility, that works just like webpack-dev-server. But it automatically finds all the files inside you context folder, containing __demo__ in their names and serves list of them, so you can run demonstration of your ui components. Each component should render itself in #root:

npm install --save-dev webpack-components-presenter

/* NiceButton__demo__.jsx */
import React, { Component } from 'react';
import { render } from 'react-dom';
import NiceButton from './NiceButton';

export default class NiceButtonDemo extends Component {
  render() {
    return (
      <div>
        <NiceButton />
      </div>
    );
  }
}

if (target) render(<NiceButtonDemo />, document.querySelector('#root'));

Just run:

components-presenter

About

Starts webpack-dev-server that finds and serves components demos

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published