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

@quantcdn/quant-cli

v3.0.0

Published

Deploy tools for QuantCDN

Downloads

33

Readme

QuantCDN cli

Unit tests

Simplify deployments and interactions with the QuantCDN API by using the support cli tool.

Install

The preferred method for installation is via npm.

npm i -g @quantcdn/quant-cli

or locally to a project

npm i -D @quantcdn/quant-cli

Usage

$ quant <command>

Commands:
  quant crawl [domain]                               Crawl and push an entire domain
  quant delete <path>                                Delete a deployed path from Quant
  quant deploy [dir]                                 Deploy the output of a static generator
  quant file <file> <location>                       Deploy a single asset
  quant info                                         Give info based on current configuration
  quant init                                         Initialise a project in the current directory
  quant page <file> <location>                       Make a local page asset available via Quant
  quant proxy <path> <origin> [status]               Create a proxy to allow traffic directly to origin
  [basicAuthUser] [basicAuthPass]
  quant purge <path>                                 Purge the cache for a given url
  quant redirect <from> <to> [status] [author]       Create a redirect
  quant search <index|unindex|clear>                 Perform search index operations
  quant unpublish <path>                             Unpublish an asset

Options:
  --version       Show version number                                                      [boolean]
  --help          Show help                                                                [boolean]
  --clientid, -c  Project customer id for QuantCDN                                          [string]
  --project, -p   Project name for QuantCDN                                                 [string]
  --token, -t     Project token for QuantCDN                                                [string]
  --endpoint, -e  API endpoint for QuantCDN            [string] [default: "https://api.quantcdn.io"]

Get started

Please refer to the "get started" guide for more details on getting set up.

Quant accepts options or will ready configuration values from a quant.json file in the current directory.

$ quant init

An interactive walk-through for configuring your API connection.

$ quant info

Endpoint: https://api.quantcdn.io/v1
Customer: quant
Project: dev-docs
Token: ****
✅✅✅ Successfully connected to dev-docs

Manage search index

Basic usage

  • Use quant search status to retrieve index size and basic configuration.
  • Use quant search unindex --path=/url/path to remove an item from the index.
  • Use quant search clear to clear the entire index.

Create and update records

You may index new content or update existing content in the search index directly. Simply provide one or multiple records in JSON files. For example, consider a search-records.json file containing the following:

[
    {
        "title": "This is a record",
        "url": "/blog/page",
        "summary": "The record is small and neat.",
        "content": "Lots of good content here. But not too much!",
    },
    {
        "title": "Fully featured search record",
        "url": "/about-us",
        "summary": "The record contains all the trimmings.",
        "content": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras id dolor facilisis, ornare erat et, scelerisque odio. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.",
        "image": "https://www.example.com/images/about.jpg",
        "categories": [ "Blog", "Commerce", "Jamstack" ],
        "tags": [ "Tailwind" , "QuantCDN" ]
    }
]

To post these records to the search index:

quant search index --path=./search-records.json

Note: The path may either refer to an individual file or a path on disk containing multiple JSON files.

Testing

Automated via CodeFresh for all PRs and mainline branches.

$ npm run lint
$ npm run test

Contributing

Issues and feature requests are managed via Github and pull requests are welcomed.