2.1.0 • Published 6 months ago

generator-rn-caos v2.1.0

Weekly downloads
4
License
MIT
Repository
github
Last release
6 months ago

generator-rn-caos

React Native - CAOS (Coding An Organized Software)

Setup

npm install -g yo generator-rn-caos

Usage

Generate Login container/screen:

$ yo rn-caos
? Your screen/container name: Login
? Your screen/container path dir: App/Auth
? List input views (ex.: email, password): email,password
? List button actions: onLogin,onBack,onForgotPassword

Generated files:

   create src/containers/App/Auth/Login/index.tsx
   create src/containers/App/Auth/Login/styles.ts
   create src/containers/App/Auth/Login/tests/componentStates.tsx
   create src/containers/App/Auth/Login/tests/index.stories.ts
   create src/containers/App/Auth/Login/tests/index.test.tsx
   create src/screens/App/Auth/Login/index.tsx

Usage with YAML (RECOMMENDED)

YAML file:

App/Auth/Login:
  states: default,loading,error
  params: name
  inputs: email,password
  actions: onLogin,onBack,onForgotPassword
  screenParams: bananaScreenParams

Run:

yo rn-caos ./login.yml

Generated files:

   create src/containers/App/Auth/Login/index.tsx
   create src/containers/App/Auth/Login/styles.ts
   create src/containers/App/Auth/Login/tests/componentStates.tsx
   create src/containers/App/Auth/Login/tests/index.stories.ts
   create src/containers/App/Auth/Login/tests/index.test.tsx
   create src/screens/App/Auth/Login/index.tsx
   create src/screens/App/Auth/Login/index.test.tsx

Tests

To modificate the generator just run npm link on root. Now just go to the folder tests and run yo rn-caos ./login.yml to see your changes.

2.1.0

6 months ago

2.0.1

2 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.1

5 years ago

1.0.0

5 years ago