rnautomate CLI
CLI to automate some commom tasks in React Native
using rnautomate you can create pages or components automatically
Commmands
rnautomate create:page
Create a page inside src/pages with the template You can create how many pages you want, by passing the names, for example:
rnautomate create:page <Page 1> <Page 2> <Page 3>
rnautomate create:component
Create a component inside src/components with the template You can create how many components you want, by passing the names, for example:
rnautomate create:page <Component 1> <Component 2> <Component 3>
Template
The template used to create the pages and the components:
import React, { useState } from 'react'
import {
StyleSheet,
Text,
View,
TouchableOpacity,
Alert,
StatusBar
} from 'react-native'
export default function <%= props.name %>() {
return (
<View style={styles.container}>
<Text><%= props.name %></Text>
</View>
)
}
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
justifyContent: 'center'
}
})