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-rf

v0.6.9

Published

RF: a React/Flux webapp generator with webpack, dialects and some good stuffs

Downloads

9

Readme

generator-rf Build Status Gitter

RF: a React/Flux generator with webpack, dialects and some good stuffs.

What's inside

What 'RF' stands for

No, not the boring abbreviation of "React" and "Flux". It's actually the suffix of rm -rf. Now it sounds dangerous and cooler, doesn't it?

Installation

Prerequisites

Note: Jest doesn't work on io.js & node v0.11 ~ v0.12, if you like to have jest works, make sure you use node.js 4.0 above or v0.10

Install Yeoman

npm install -g yo

Install RF generator

npm install -g generator-rf

Getting Started

Intiate Project

For example, to create a project named "myapp", just type:

yo rf myapp

Run it up

cd myapp && npm run dev

Then Open http://localhost:8080 in the browser and have fun!

Run the test suit

Don't forget to test your project by:

npm test

Build for deploy

npm run build

What RF generates:

.
└── myapp *
    ├── build
    │   └── index.html
    ├── package.json
    ├── preprocessor.js
    ├── node_modules
    ├── src
    │   ├── assets
    │   │   ├── images
    │   │   └── stylesheets
    │   │       └── style.sass **
    │   └── scripts
    │       ├── actions
    │       │   └── __tests__
    │       ├── components
    │       │   ├── App.js **
    │       │   └── __tests__
    │       ├── constants
    │       │   └── __tests__
    │       ├── dispatcher
    │       │   ├── AppDispatcher.js **
    │       │   └── __tests__
    │       ├── main.js **
    │       ├── mixins
    │       │   └── __tests__
    │       └── stores
    │           └── __tests__
    ├── webpack.dev.config.js
    └── webpack.prod.config.js
  • * Won't create root directory if your current directory is identical with your project name. Check --skip-root section for detail.
  • ** Varied by your choices of the dialect and stylesheet syntax

What npm run build gives:

.
└── myapp
    ├── build
    │   ├── bundle.js
    │   ├── some bootstrap stuffs (if include)
    │   └── ...
    └── ...

Options

--d: Dialect

By default, RF will generate codes in ES6, using Babel. If you don't like it, use --d flag to change the dialect to generate.

Example:

yo rf myapp --d=ls

--s: Stylesheet Syntax

RF generate SASS (indented syntax) by default. Use --s flag to change it.

  • scss for SCSS (Sassy CSS)
  • less for LESS
  • stylus for Stylus
  • or css for CSS.

Example:

yo rf myapp --s=scss

--skip-bootstrap: Don't include Bootstrap framework stuffs

RF includes Bootstrap settings in the real Webpack way. Turn them off by --skip-bootstrap flag.

Example:

yo rf myapp --skip-bootstrap

--skip-root: Don't create root directory

RF creates a root directory if current directory name is different from your appname, or generate files in current directory if they have same name. But if you're intentionally have them with different name, use --skip-root to generate files right in the current directory.

Example:

yo rf trueName --skip-root

--skip-test: Don't create __tests__ directories

For every sub-directories in src/scripts, RF will create a __tests__ directory within. Use skip-test to skip that.

Example:

yo rf myapp --skip-test

--skip-install: Skip automatic package installation

Example:

yo rf myapp --skip-install

Contribute

  • Fork this project
  • run npm install && npm test and make sure all test are pass
  • Make your changes with a bit of test
  • For commit message of pull request, please check these useful tips ahead.

TODO

  • PostCSS support
  • Actions w/Constants, Store
  • Custom template folder
  • Component and Mixin generate command
  • Isomorphic server script(?)

License

MIT