INTERNAL DEVELOPER GUIDE
React Native Navigation Crawler
Introduction
This package will crawl react native packages looking for screens - it will then optionally output a simple HTML site that will allow you to see the different screens relations and open files directly.
Usage
npx @tkc-fe/react-native-navigation-crawler <route-input> <html-output>
Usage Example
npx @tkc-fe/react-native-navigation-crawler ./src/stacks/Drawer.tsx ./crawl-output
Installation
yarn add @tkc-fe/react-native-navigation-crawler
or
npm i @tkc-fe/react-native-navigation-crawler
Example 📕
import ReactRouteCrawler from '@tkc-fe/react-native-navigation-crawler'
const crawler = new ReactRouteCrawler()
const screens = crawler.getComponentScreens(
'./src/stacks/RootStack.tsx',
true
)
Config ⚙️
const crawler = new ReactRouteCrawler({
configPath: './tsconfig.json',
sourceFilesGlob: './src/**/*.tsx'
})