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

frontend-monorepo-cli

v1.0.18

Published

This project is a CLI to setup a monorepo and create various types of packages.

Downloads

2

Readme

CICD NPM version

How to setup

This project is a CLI to setup a monorepo and create various types of packages.

npm install -g frontend-monorepo-cli

CI/CD

Create a new Environment ou you GitHub project named cicd. Add now the following secrets:

  • GIT_PUBLISHER_EMAIL: email of the publisher
  • NPM_TOKEN: token for the npm registry

How to's

How to generate the monorepo

Before you can use the CLI, you need to create a new repository. Once done, you enter the repo and run the following command:

generate-monorepo

This setups the monorepo structure.

How to add a React application package to the monorepo

You just need to execute the following command from the root of the monorepo:

create-react-app <app-name> --o=<owner-name> --d=<app-description>

PS: options are optional.

How to add a Typescript library package to the monorepo

You just need to execute the following command from the root of the monorepo:

create-ts-library <library-name> --o=<owner-name> --d=<library-description>

PS: options are optional.

How to setup the CICD

Github Actions is the CICD system. To make it working, you need to create a new environment at repository level. The name of the environment is cicd. Once done, you should add the following secrets to the cicd environment:

  • CF_API_KEY = The Cloudflare global API key
  • CF_API_TOKEN = The Cloudflare global API token
  • CF_EMAIL = The Cloudflare global email
  • CF_ZONE_ID = The Cloudflare zone id to deploy the application
  • NPM_TOKEN = Your npm token (with publishing rights)
  • GIT_PUBLISHER_EMAIL = The email of your gihub repo contributor, which will be used as the publisher of new versions

When you open a PR on github, the code will be checked (linted, tested and built). When a PR is merged to the main branch, every TS libary will be deployed to NPM, and every React app will be deployed to Cloudflare (to a staging site). When you create a Github release, and every React app will be deployed to Cloudflare (to the production site).

How to get the Cloudflare secrets

  • CF_ZONE_ID = You can find it on the Cloudflare dashboard homepage, clicking on the website you want to deploy to, and you find it on the right side of the page.
  • CF_EMAIL = The email of the Cloudflare account owner
  • CF_API_KEY = You can generate one from your profile page > API Tokens > Global API Key
  • CF_API_TOKEN = You can generate one from your profile page > API Tokens > Create Token > Edit Cloudflare Workers