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

v1.0.5

Published

Code generators for Clean React Native architecture by Factorial Complexity.

Downloads

3

Readme

generator-cleanrn NPM version Dependency Status

Code generators for Clean React Native architecture by Factorial Complexity.

Installation

First, install Yeoman and generator-cleanrn using npm (we assume you have pre-installed node.js).

npm install -g yo
npm install -g generator-cleanrn

Usage

Generate a boilerplate project in the current directory:

yo cleanrn

Parameters:

  • User-friendly name - will be used as is for display purpose. Feel free to use spaces. This name will be used to generate more strict names for items like project name, some folders etc.
  • Package identifier - this is an identifier in a reverse domain notation (like com.example.test). It will be used as Android package name and iOS bundle identifier.

Other Generators

This project provides additional generators to speed up writing common boilerplate. Sub-generators should normally be called inside the project root directory. However, if you scaffold the project with this generator, it will put .yo-rc.json file into the project, which will enable a proper calling sub-generators from any sub-folder.

Domain Module

yo cleanrn:domain

A generic single-file module intended for domain logic will be created in src/domain directory. Parameters:

  • Name - name for the module in a camel-case (like anotherCoolModule).

Presentation Flow Module

yo cleanrn:flow

Generate a presentation module with a separate navigator and a root screen. Parameters:

  • Name - name of the module in a camel-case. An informal convention is too add suffix Flow to the modules like this (e.g. someFlow).
  • Add dependency on StoreManager? - if yes the module will have a dependency on StoreManager. Regular presentation modules doesn't need it, however, there are certain case when it might be required. For example, if you want to connect your navigation to the Redux state.
  • Navigator - one of the navigator types provided by react-navigation to be used as a root navigator for the project.
  • Navigator base name - name to use for the navigator class. Suffix Navigator will be auto-appended.
  • First screen base name - name to use for the root screen classes. All suffices will be auto-appended.

Screen

yo cleanrn:screen

According to Clean React native approach a code for a regular screen is typically shared between 3 files:

  • View - a "dumb" React component, which is not aware neither of the global state, nor of the navigation.
  • Container - normally a result of connect() call. It is tasked with mapping Redux state to View's props.
  • Navigation - component that wraps Container and encapsulates the navigation and other similar logic, which has to do with how the screen is integrated into the rest of the application.

This generator will create this three files in the specified presentation module, assuming the default file structure of the presentation module is preserved. Parameters:

  • Presentation module - pick a presentation module to add screen to.
  • Screen base name - screen base name without any suffices in Pascal-case (e.g. FancyList).

License

Unlicense © Vitaliy Ivanov