@compgen/rna
v0.3.8
Published
A robust generator for generating complete [react native](https://reactnative.dev/) project.
Downloads
20
Readme
@compgen/rna
A robust generator for generating complete react native project.
Micro Generators Included
- @compgen/rna-min
- @compgen/editor-config
- @compgen/eslint
- @compgen/stylelint
- @compgen/prettier
- @compgen/git-hooks
CLI
I highly recommend using npx
so that you don't have to install anything globally, and you can always get the latest version from npm.
- optional
--path=target_folder
npx @compgen/rna
Programmatically
You have to generate JSON schema and use execute
function from @compgen/core
:
// src/index.ts
import { execute, askProjectName, toAlphanumeric } from '@compgen/core'
import { askNavigationType } from '@compgen/rna-min'
import { createSchema } from '@compgen/rna'
const generate = async () => {
const { projectFolder } = await askProjectName()
const navigationType = await askNavigationType()
const schema = createSchema({
projectFolder: toAlphanumeric(projectFolder),
navigationType,
})
await execute(schema, toAlphanumeric(projectFolder))
}
generate()
Now all you have to do is run:
ts-node src/index.ts