1.0.5 • Published 4 years ago

rctr v1.0.5

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

rx

CLI for React projects built with Parcel.

Install

npm i -g rctr

Commands

Below are the avilable commands you can run with the rx cli.

new

rx new my-app

rx new scaffolds a new app with support for SSR, lazyloading, i18n, SCSS, and more. We chose the kitchen sink approach.

For an example of what gets scaffolded, see react-starter.

generate

rx generate scaffolds code snippets in the directory the command is run.

npm.io

Here is a list of arguments the rx generate command will take.

typefile
fn-component, fcpure function component
arrow-fn-component, afcarrow function component
component, cclass component
view, vclass component with imported styles, test
ssrserver-side rendered view
test, tspec file
state, sstate with reducer
context , ctxcontext

Example

rx generate view Map

  • Map.tsx created
  • Map.spec.tsx created
  • Map.scss created

Some generators support optional arguments --routing and --lazy.

rx g ssr About --routing --lazy

  • About.tsx created
  • About.spec.tsx created
  • About.scss created
  • App.tsx has new routes

The first argument --routing adds a route to the nearest implementation of React Router.

<Route exact={true} path="/about" render={() => <About />} />

The second argument --lazy optionally lazyloads the component.

const About = importComponent(() => import("./view/about/About"));

Development

If you want to contribute fork this repo, make your changes and submit a pull request.

To get started with development run yarn install and yarn link.

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago