@gdi/cli v0.5.0
Installation
Note: make sure you have all the prerequisites prepared before installation
Install the CLI
Run:
npm install -g @gdi/cliand rebuild the CLI's commands index:
gdi rebuildCreate a new site
gdi create site [site-name]Note: this clones the template and installs dependencies and may take a few moments
A new project with two main packages was created:
gdi-admin: holds the admin UIgdi-site: holds the public facing site
Change your cwd to your newly created root folder:
cd [site-name]and install the project's dependencies:
npm ior:
yarnConnect Firebase
Bootstrap the project:
gdi bootstrapNote: Before bootstrapping make sure you have firebase-tools installed: npm install -g firebase-tools
Running the Admin UI
In the project's root run:
gdi startNavigate to http://localhost:3000
Setting the admin user
Log in to the Admin UI with your Google Account.
Then, in the project's root run:
gdi setAdminDeploying
In the project's root run:
gdi deployNote: this will deploy both the
Admin UIand theSite
After a successful deployment, the Admin UI will be served from the /admin path.
Note: change your site's favIcons and meta tags before deployment
CLI commands
| Command | Description |
|---|---|
| gdi create site site-name | Creates a new gDI repo with admin + site packages |
| gdi bootstrap | Bootstraps the project, runs these command: connect + apps |
| gdi start | Starts gdi-admin in development mode |
| gdi setAdmin | Choose an admin for the current site |
| gdi deploy | Builds & deploy both gdi-admin and gdi-site |
| gdi connect | Validates and links site to Firebase |
| gdi list projects | Shows Firebase projects. A wrapper for firebase projects:list |
| gdi preview | Starts gdi-site in development mode |
| gdi apps | Scans for new apps and sets up the vite and tsconfig files |
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago