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

rn-generator

v1.0.1

Published

This is the file generator for react-native ( Redux ) application

Downloads

3

Readme

react-native-generator

Why use this when there are other generators?

There are different type of generator to help create react and redux based application. They are doing great job with action, enums and reducers generation, but based on exist experience we believe that module based structuring is more reliable way to go. This generator created in mind to provide efficient way for component, container, screens, actions, generator. You can create a project (React Native) structure fro 20 minutes, save your time :) . It's very simple and convenient for using.


Install

yarn  add -D rn-generator

or

npm install -D rn-generator

Open package json and add generate command within the scripts option

"scripts": {
    "generate:run": "generate"
}

Generators

The generator help to generate following components.

  • Component generator
    • Name: The name of the component. i.e (Button, LoginForm etc.)
    • Flow: The static type
    • Use PureComponent / Component
    • Component properties: choose the component properties i.e ( constructor, propTypes, default props ) or life cycles
    • life cycles
    • Tests
  • Container generator
    • Name: the name of the container, i.e. Awesome, which converts to: AwesomeContainer.
    • Component: you must select the component in list, that connects this container.
    • Module
    • Actions: set the action names
  • Redux store configuration generator
    • Create store config file

To run the generators with a list of options, run

yarn run generate

or

npm run generate

Note:

When you use the generator you need to use "redux-action", for actions and reducers. You can see it there

Configs

The generators output paths can be configured in two ways.

1. package.json

You just need create rnGenerator properties in package.json file and give relative paths

"rnGenerator": {
   "paths": {
     "componentsDir": "src/components/"
    }
}

2. .rnGenerator

Create ".rnGenerator" file in the root directory (where package.json is)

Set your custom configs there as json data

{
	"paths": {
		"rootReducerPath": "src/reducers/index.js",
	    "componentsDir": "src/components",
	    "containersDir": "src/containers",
	    "modulesDir": "src/modules",
	    "testRootDir": "./__test__",
	    "rootFile": "src/index.js",
	    "storePath": "src/store",
	    "appFile": "src/app.js,
	    "templatePath": "",
	}
}

Roadmap

  • [ ] Add custom generators

Licence

MIT