4.2.0 • Published 5 years ago

r3-cli v4.2.0

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

R3-CLI

Create React applications with server-side rendering using Redux and Router v4. Simple and very fast!

Installation

Run the command below, to have the module installed globally:

npm install -g r3-cli

For old structure

For the old structure please use R3-CLI version 3 or before.

npm install -g r3-cli@^3.0.6

Usage

To see commands avaliable, run a single command with argument:

r3-cli --help

To create a new Project, run the command:

r3-cli

or

r3-cli -c my-app

It will create a directory called my-app inside the current folder.

You will found the initial Project structure:

my-app
├── .gitignore
├── package.json
├── README.md
├── node_modules
└── source
    ├── actions
    │   └── IndexActions.js
    │
    ├── assets
    │   ├── fonts
    │   ├── images
    │   └── styles
    │
    ├── client
    │   ├── index.ejs
    │   ├── index.html
    │   └── index.js
    │
    ├── config
    │   ├── index.js
    │   ├── config.env.json
    │   └── response.status.json
    │
    ├── reducers
    │   └── IndexReducer.js
    │
    ├── server
    │   ├── excludesExtensions.js
    │   ├── index.js
    │   ├── server.js
    │   └── template.js
    │
    ├── views
    │   ├── web
    │   │   ├── components
    │   │   ├── controller
    │   │   ├── pages
    │   │   │   └── index
    │   │   │       ├── __test__
    │   │   │       ├── Index.js
    │   │   │       └── IndexContainer.js
    │   │   │
    │   │   ├── templates
    │   │   │   ├── In.js
    │   │   │   ├── Out.js
    │   │   │   └── PageNotFound.js
    │   │   │
    │   │   └── Imports.js
    │   │
    │   └── mobile (future feature)
    │
    ├── Reducers.js
    ├── Routes.js
    └── Store.js

Running your new Project

Inside the newly created Project, you need to set a Node version:

Requisite

NVM

To easily switch Node versions for your Project, You can use NVM command:

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
source ~/.bashrc
nvm install
nvm use

Running

Afterward you can run some built-in commands:

npm start

or

yarn start

Your Project is ready to be accessed. Your can run the command npm ls or yarn ls to view available commands.

Creating a new Route

To create a new route on your Project run the command bellow:

r3-cli --route

A new route and view will automatically be created. It will be created the files:

./source/views/web/page/newView

NewView.jsx
NewViewContainer.jsx

./source/actions

NewViewActions.js

./source/reducers

NewViewReducer.js

So, enjoy the plugin and Thank you for use it!

Reginaldo Morais

4.2.0

5 years ago

4.1.3

5 years ago

4.1.2

5 years ago

4.1.1

5 years ago

4.1.0

5 years ago

4.0.1

5 years ago

4.0.0

5 years ago

3.0.6

5 years ago

3.0.5

6 years ago

3.0.4

6 years ago

3.0.3

6 years ago

3.0.2

6 years ago

3.0.1

6 years ago

3.0.0

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago