npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@raisenow/tamaro-cli

v1.1.7

Published

It’s a command-line interface for all operations with Tamaro customer configurations and _Tamaro Core_.

Downloads

124

Readme

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-cli

To see the information about some particular command (for example dev command), prepend help before the command name:

npx -y @raisenow/tamaro-cli help dev

Substitute 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 dev

Run local server using a locally running Tamaro Core

  1. 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
  2. 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 mkcert

Generate certificate:

mkcert -install -cert-file localhost.crt -key-file localhost.key localhost 127.0.0.1 0.0.0.0 ::1

You 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 reports folder
  • --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 --deploy

As 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-123

As 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 --serve

serve

Run a local web server for pre-built bundle.

Example

  1. 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
  2. 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

  1. 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
  2. Deploy it

    npx -y @raisenow/tamaro-cli deploy
  3. 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-deployed

deploy-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-config

Development

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 [email protected]:raisenow/tamaro-cli.git
cd tamaro-cli
npm ci

Link 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:watch

To use the locally linked version of Tamaro CLI, use it without @raisenow/ scope, -y flag is also not needed:

npx tamaro-cli dev