@sonardigital/cli
v2.1.1
Published
To make it easy for you to get started with GitLab, here's a list of recommended next steps.
Readme
Templates CLI
This repository contains the SonarDigital Templates CLI, a tool to quickly scaffold files for React, React Native, and Node projects from pre-defined templates.
Getting started
To make it easy for you to get started with this CLI, here’s a list of recommended next steps.
Already know how it works? Just run the commands below and start generating your modules.
Add your files
- [ ] Clone this repository or install it via npm
- [ ] Run the CLI to generate code from templates
- [ ] Example command:
npx sonardigital react package myLibThis will create:
/myLib
useMyLib.ts
useMyLibContext.ts
index.tsIntegrate with your tools
- [ ] Use in React, React Native, or Node projects
- [ ] Add new templates under
/templates/<scope>/<template> - [ ] Placeholders (
template,Template,TEMPLATE) are replaced automatically
Collaborate with your team
- [ ] Publish this CLI as an npm package (
@sonardigital/templates) - [ ] Invite teammates to run it using:
npx sonardigital <scope> <template> <name>- [ ] Add new templates together by extending the
/templatesfolder
Test and Deploy
- [ ] Run locally with:
npm link- [ ] Publish to npm with:
npm publish --access public- [ ] Use in any project with:
npx sonardigital react provider authThis generates:
/auth
useAuth.ts
useAuthContext.ts
AuthWrapper.tsx