npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

rehearse

v1.6.1

Published

React.js Live Development in Zen Mode

Downloads

12

Readme

rehearse

live react components development in zen mode.

Home Page

alt tag

alt tag

React live editing (a.k.a hot reload) made easy -> Let Rehearse do the compiling and browser refreshing for you.

★ Hot reload on css/less change

★ Hot reload on react component change

★ Hot reload on props/scenario change

★ Support Scenarios

★ Isolated or interdependent props

★ Babel Loader built in

★ Auto find all components in configured folder

★ Customise additional loaders and plugins and more

1 Install as a npm module

npm i rehearse -D

2 Configure: create a rehearse.config.js at your root folder (working dir).

const path = require('path');
const config = {
    webpack: {
        //loaders: [], default: [] (rehearse already has babel-loader that reads .babelrc at your working directory)
        //plugins: [], default: []
        //entry: [], additonal entry. default: []
        //devtool: 'source-map',  default:'cheap-module-eval-source-map'
        //port: 3001,  default:3000
        //modulesDirectories: [], default: [],
        //overrideLoaders,  default:false
        //overridePlugins,  default: false
        port: 3001
    },
    props: path.join(__dirname, 'example/props/props.js'),//path of the props file, mandatory

    componentsPath: path.join(__dirname, 'example/components'),//absolute path of components, mandatory

    statics: [
        'css/theme.css',
        'css/theme2.less',
        'js/lib.js'
    ],//list of strings to be included in the header of rehearse page,
    // e.g. css/bootstrap.css etc, they should be direct children of appPath

    appPath: path.join(__dirname, 'example'), //absolute path of client folder, mandatory if statics is not empty
    port: 9001,  //port of the rehearse server
    open: true //auto open browser?
};

module.exports = config;

3 Create a .babelrc at your root folder (working dir). e.g.

{
  "presets": [
    "react",
    "es2015"
  ]
}

4 Customise component props and scenarios

5 Run

Add rehearse to your package.json npm scripts

{
    "scripts": {
        "rehearse": "rehearse" // [--config ./example/rehearse.config.js]
    }
}
npm run rehearse

Ready to go!

Q&A:

How to setup props and scenarios?

This example demos how to setup default props and scenarios.

No auto refresh when change props.js?

Please pay attention that the page you should visit is browser-synced one, usually localhost:3000 as logged in your console(root level config port).

No props found even though I have added them in props.js?

Please make sure props are named export, names of which are the same as the component FILE name.