wavemaker-rn-cli
v1.0.1
Published
A command-line tool to scaffold new pages in your WaveMaker project quickly. This CLI generates a new page folder under `src/pages` with boilerplate files and automatically updates configuration files.
Readme
WaveMaker ReactNative CLI
A command-line tool to scaffold new pages in your WaveMaker project quickly. This CLI generates a new page folder under src/pages with boilerplate files and automatically updates configuration files.
Features
Folder & File Generation:
Creates a new folder for your page (e.g.src/pages/NewPage) and generates the following files with default boilerplate code:NewPage.component.jsNewPage.script.jsNewPage.style.jsNewPage.variables.js
Configuration Updates:
Automatically updates:src/pages/pages.config.jsto register the new page component.src/app.variables.jsto add a new navigation action (e.g.goToPage_NewPage).
Installation
Ensure you have Node.js and npm installed. Then install the CLI globally:
npm install -g wavemaker-rn-cliUsage
Once installed, run the command followed by the desired page name at the root of wavemaker rn project:
create-page <PageName>For example, to create a page called NewPage:
create-page NewPageThis will:
Create a folder at src/pages/NewPage.
Generate boilerplate files inside that folder.
Update the pages.config.js and app.variables.js files with new entries for the page.
Development
To test changes locally, clone this repository and then run:
npm install
npm linkThis will link your local CLI so you can run create-page from anywhere within your system.
Publishing
To publish your updates to npm:
Update the version in package.json (e.g. using npm version patch).
Log in using:
npm loginPublish the package:
npm publishContributing
Contributions, bug reports, and feature requests are welcome! Please fork the repository and submit a pull request.
License
This project is licensed under the MIT License.
