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

@jorsek/content-portal-configs

v4.0.6

Published

This repository contains all of the tenant configurations. There is a github action that triggers off merges into to the `main` branch.

Downloads

23

Readme

Tenant Configuration repo.

This repository contains all of the tenant configurations. There is a github action that triggers off merges into to the main branch.

That action will compile the configurations into a JSON Object string and push those configurations into Firebase Remote-Config.

Diagram

Firebase Remote-Config

Firebase Trigger function

GCP Pub/Sub

Setup

Clone the repo by using this command or cloning it using github Desktop.

git clone [email protected]:Jorsek/content-portal-configs.git

install node.js and yarn on MacOS

brew install node
npm install yarn -g

install node.js and yarn on Windows

Download & install the LTS version of node.js https://nodejs.org/en/download/. Then, open a command window and type:

npm install yarn -g

install project dependencies and run the project

cd $PROJECTPATH
yarn

Tenant config

The configuration for each tenant are located in the $PROJECTPATH/src/tenants directory where folders named by tenant id such as "jorsek"

+-- package.json
+-- src
|   +-- tenants
|       +-- org-name
|           +-- i18n <- translations
|               +-- index.ts <- exports supported language customized strings
|               +-- en-US.json <- a supported language custom string overrides.
|           +-- index.ts <- the exported configuration
|           +-- theme.ts <- the exported jss/material ui theme overrides.
|       +-- jorsek
|       +-- org-name1
|       +-- org-name2
|       +-- default.ts <- default configuration that the custom configurations all extend from.
|       +-- index.ts <- exports and merges the configurations.

I18n translated strings

+-- i18n 
|   +-- index.ts <- exports the i18n translated strings for languages we support
|   +-- en-US.json <- a supported language file that contains all the static application strings
|   +-- pl-PL.json <- a supported language file that contains all the static application strings

Exporting a config

Run the following command to export a config

./src/ezd-config.ts {path-to-config} > {output-file}

Example:

./src/ezd-config.ts tenants/viewpoint/index.ts > viewpoint-8-4-21.json

Adding a new Tenant

You will need:

  • A deployment ID. This can be obtained from the deployments page in the CMS.
  • API key. This can be obtained from the Content API page in the CMS. Create a Simple API Key.
  • Name of the tenant.

To add a tenant, a folder for the tenant is created within this repository, and that change is committed to the main branch in Github through a pull request. A few minutes after the change is merged, the tenant should be available. If the tenant is not available, it is possible the build had an error. Look at [Github Actions] (https://github.com/Jorsek/content-portal-config/actions) to determine the issue.

Steps to add a tenant:

  1. In this repository, copy the tenant_template/customer_name folder into the tenants/ folder.
  2. Rename the customer_name folder you just copied to the name of the tenant.
    1. Note: This is typically the org id, but can be anything. The value should be all lower case, and may contain underscores. This value will determine the portal's URL. For example, if the tenant's name is my_example_tenant, the portal's URL will be my_example_tenant.portal.heretto.com.
  3. In the index.ts and i18n/en-us.json files, replace everything in square brackets:
    1. In index.ts:
      1. title: The title of site, typically something like {tenant-name} Help Site`.
      2. env.EZD_ORG: The org id used by the deploy API. Typically the same org ID from the CMS.
      3. env.EZD_HOSTNAME: The domain of the deploy API. For example, content-dev2.easydita.com
      4. env.EZD_TOKEN: The deploy API API key. This is the token obtained from the Content API page in the CMS.
      5. env.EZD_DEPLOYMENT_ID: The deployment ID obtained from the Deployment page in the CMS.
    2. In i18n/en-us.json:
      1. label.tenant: Typically a label for the tenant. For example, Heretto.
  4. Commit changes and submit a PR.