@raisenow/tamaro-cli v1.1.8
Getting started
It’s a command-line interface for all operations with Tamaro customer configurations and Tamaro Core.
You don’t need to install it manually. The recommended way to run it is by using the npx command, which comes along with NPM.
Usage
To see an overview of all possible commands just run the following command without any arguments.
npx -y @raisenow/tamaro-cliTo see the information about some particular command (for example dev command), prepend help before the command name:
npx -y @raisenow/tamaro-cli help devSubstitute dev with the command you want to get information about.
Commands
Available commands:
dev
Runs the local development server for Tamaro Core or a particular customer configuration.
Options
- --local-core– Load Tamaro Core from localhost:1234 instead of the CDN
- --https– Let local web server serve Tamaro with SSL encryption
- --port <port>– Web server port (default: 1234)
- --env <env>– Environment (dev, stage, prod)
Run local server using Tamaro Core from CDN
Run the local development server for the example-02-typical-customisations customer configuration. You will be able to access Tamaro on http://localhost:1234 (port may differ, see console output).
cd /path/to/tamaro-configurations/configs/example-02-typical-customisations
npx -y @raisenow/tamaro-cli devRun local server using a locally running Tamaro Core
- Run the local development web server for Tamaro Core in the first terminal tab. You will be able to access a default configuration of Tamaro on http://localhost:1234 (port may differ, see console output). - cd /path/to/tamaro-core npx -y @raisenow/tamaro-cli dev
- Run the local development web server for the example-02-typical-customisations customer configuration in the second terminal tab. After running this command, you will able to access the configuration on http://localhost:1235 (port may differ, see console output). - cd /path/to/tamaro-configurations/configs/example-02-typical-customisations npx -y @raisenow/tamaro-cli dev --local-core
Use Transport Level Security (HTTPS)
You might want to the local web server to serve Tamaro over HTTPS, for example for testing wallet payments over Google Pay. For that, you have to install mkcert, then generate a local certificate and key file and install it into your local trust stores using this command in the root directory of the Tamaro configuration repository (or Tamaro Core):
Install mkcert:
brew install mkcertGenerate certificate:
mkcert -install -cert-file localhost.crt -key-file localhost.key localhost 127.0.0.1 0.0.0.0 ::1You will see that the certificate and key files are created. Keep them for yourself. Do not share them or commit them. (They should be ignored by Git.)
You can then use the flag --https with the CLI. If you are using the local Tamaro Core, you also have to serve that over HTTPS. Certificate and key files must be copied to Tamaro Core folder as well.
build
Build an optimised (minified) bundle of Tamaro Core or a customer configuration.
Options
- --local-core– Load Tamaro Core from localhost:1234 instead of the CDN
- --analyze– Generate bundle statistics to- reportsfolder
- --serve– Run the generated bundle with a local web server
- --https– Let local web server serve Tamaro with SSL encryption
- --port <port>– Web server port (default: 1234)
- --env <env>– Environment (dev, stage, prod)
- --deploy– Deploy Tamaro Core or a customer configuration bundle to AWS S3
- --tag <tag>– Tag which should be used for the deployment of the bundle (default: "latest")
Build and deploy a customer configuration
Build and deploy an optimised (minified) bundle of the example-02-typical-customisations customer configuration.
cd /path/to/tamaro-configurations/configs/example-02-typical-customisations
npx -y @raisenow/tamaro-cli build --deployAs a result, the bundle should be deployed to: https://tamaro.raisenow.com/example-02-typical-customisations/latest/
Build and deploy a customer configuration with a specific tag
Build and deploy an optimised (minified) bundle of the example-02-typical-customisations customer configuration with the tag WEB-123.
cd /path/to/tamaro-configurations/configs/example-02-typical-customisations
npx -y @raisenow/tamaro-cli build --deploy --tag WEB-123As a result, the bundle should be deployed to: https://tamaro.raisenow.com/example-02-typical-customisations/WEB-123/
Build and serve a customer configuration
Build and serve an optimised (minified) bundle of the example-02-typical-customisations customer configuration.
After running this command, a local web server should be running on http://localhost:1234 (port may differ, see console output).
cd /path/to/tamaro-configurations/configs/example-02-typical-customisations
npx -y @raisenow/tamaro-cli build --serveserve
Run a local web server for pre-built bundle.
Example
- Build an optimised (minified) bundle of the example-02-typical-customisations customer configuration - cd /path/to/tamaro-configurations/configs/example-02-typical-customisations npx -y @raisenow/tamaro-cli build
- Serve it. After running this command, web-server should be running on http://localhost:1234 (port may differ, see console output). - npx -y @raisenow/tamaro-cli serve
deploy
Deploy a pre-built Tamaro Core or customer configuration bundle to AWS S3.
Options
- --tag <tag>– Tag which should be used for the deployment of the bundle (default: "latest")
Make sure you have built the bundle before deploying it with this command, otherwise you may mistakenly deploy the bundle from a previous build.
Example
- Build an optimised (minified) bundle of the example-02-typical-customisations customer configuration - cd /path/to/tamaro-configurations/configs/example-02-typical-customisations npx -y @raisenow/tamaro-cli build
- Deploy it - npx -y @raisenow/tamaro-cli deploy
- Optionally, deploy it with the WEB-123 tag - npx -y @raisenow/tamaro-cli deploy --tag WEB-123
list-deployed
List deployments of Tamaro Core or a particular customer configuration.
Options
- --config <config>– Configuration name (default: current customer configuration)
Example
cd /path/to/tamaro-configurations/configs/example-02-typical-customisations
npx -y @raisenow/tamaro-cli list-deployeddeploy-email-config
Deploy a widget’s email configuration to AWS S3.
Example
cd /path/to/tamaro-configurations/configs/example-02-typical-customisations
npx -y @raisenow/tamaro-cli deploy-email-configDevelopment
Make sure you have installed and activated the proper node and npm versions.
- node: ">= 16"
- npm: ">= 8"
Clone the repository and install its dependencies:
git clone git@bitbucket.org:raisenow/tamaro-cli.git
cd tamaro-cli
npm ciLink package source to be able to run its local version:
npm link .Run the build:watch script to watch source files and automatically rebuild on changes. It must be running during the Tamaro CLI development process.
npm run build:watchTo use the locally linked version of Tamaro CLI, use it without @raisenow/ scope, -y flag is also not needed:
npx tamaro-cli dev5 months ago
11 months ago
12 months ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
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
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago