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

generator-pauls-easy-react-webpack

v0.1.4

Published

A generator to create a simple React project with Webpack

Downloads

3

Readme

generator-pauls-easy-react-webpack NPM version

This is a generator to create a simple React 16 project with Webpack

Installation

Obvious dependencies: Yeoman and node.js.

If you've already have those, install the generator:

npm install -g generator-pauls-easy-react-webpack

Then generate your new project:

mkdir myAwesomeProject
cd myAwesomeProject
yo pauls-easy-react-webpack

About the generator

This generator is aimed towards my personal preferences when creating React apps, so maybe it will not be really useful to you, but here are some of its features:

  • React 16 and Material-UI as the main tools for development.
  • Babel for ES6 and React.
  • Webpack with webpack-dev-server, css-loader and style-loader for dev and extract-text-webpack-plugin for production.
  • ESLint with a lot of settings for React and ES6 "best practices".
  • Directory structure pretty similar to the one described in this Medium article
  • Basic component generation

Important Notice: As you can see in the webpack config files, the entry option is set to APP_DIR + '/scenes/App/App.jsx' instead of the usual index.js. This is because I usually just start the app from the main component, so there's no need for an index.js. I will surelly add an option to the generator in order to make this customizable, but for the moment you may change it by hand.

Future features:

  • New generators to create components and similar scaffolding elements.
  • Support for Redux (maybe...).

How to run your project

I use yarn in these examples, but this obviously works too for npm.

Running webpack dev server:

yarn dev

Building for production:

yarn build

Creating Components

You can create a really basic component by running

yo pauls-easy-react-webpack:component

on the root directory of your project.

The generator is going to ask you if you need a component or a scene and it will use the dir src/components or src/scenes, respectively. For the moment, it just creates a basic component inside one of these directories. It will be able to create sub-components in future releases.

Collaborating

Feel free to open issues, send me a pull request or contact me

License

MIT