Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

webpack-components-presenter

0.0.4 • Public • Published

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

Keywords

none

Install

npm i webpack-components-presenter

DownloadsWeekly Downloads

0

Version

0.0.4

License

ISC

Last publish

Collaborators

  • avatar