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

@hoast/hoast

v3.1.0

Published

A set of simple and modular packages for build automation.

Downloads

4

Readme

@hoast/hoast

The core package of hoast responsible for managing and running the other packages.

Install

npm install @hoast/hoast

Usage

Configuration file

See the config example for more detail on how to configure and use the core package.

Command line interface

Run hoast help or hoast h to see information on how to use command line interface.

Usage
% @hoast/hoast [command] [...options]

Commands
  h, help     Display help
  r, run      Run from file (default command)
  v, version  Display version

Options for run
  --concurrency-limit  {Number}  Maximum amount of items to process at once. (Default: 4)
  --directory-path     {String}  Directory to run the command from. (Default: '.')
  --file-path          {String}  File path to config or script file. (Defaults: 'hoast.js' and 'hoast.json')
  --log-level          {Number}  Log level given to the logger. (Default: 2 (Errors and warnings))
  --watch                        Re-build automatically when a file changes.
  --watch-ignore       {String}  Glob patter or paths to exclude from watching. (Default: 'node_modules/**')

API

  • constructor Create Hoast instance.
    • @params {Object} options Options object which can contain the following keys.
      • {Number} logLevel = 2 Log level given to the logger.
      • {Number} concurrencyLimit = 4 Maximum amount of items to process at once.
      • {String} directory = process.cwd() Directory path to build from. Relative paths are resolved with process.cwd().
    • @params {Object} meta = {} Global metadata that can be picked up by process packages.
    • @returns {Object} Hoast instance.

Variables

  • meta {Object} Global metadata that can be picked up by process packages.

Functions

Collections

  • addCollection Add collection to collections.
    • @param {Object} collection Collection to add.
    • @returns {Object} The hoast instance.
  • addCollections Add multiple collections to collections.
    • @param {Array} collections Collections to add.
    • @returns {Object} The hoast instance.

Meta collections

  • addMetaCollection Add collection to meta collections.
    • @param {Object} collection Collection to add.
    • @returns {Object} The hoast instance.
  • addMetaCollections Add multiple collections to meta collections.
    • @param {Array} collections Collections to add.
    • @returns {Object} The hoast instance.

Processes

  • registerProcess Register process.
    • @param {String} name Name of process.
    • @param {Object} process Process object.
    • @returns {Object} The hoast instance.
  • registerProcesses Register multiple processes.
    • @param {Object} processes Process objects by name as key.
    • @returns {Object} The hoast instance.

Process

  • async process Process collections.
Access
  • addAccessed Mark a file as accessed by the given source, this will allow the watcher to rebuild effectively.
    • @params {String} source A unique identifier of the source.
    • @params {String} ...filePaths File paths accessed by the source.
  • clearAccessed Clears information of file paths accessed by the given source.
    • @params {String} source A unique identifier of the source.

Changes

  • getChanged Get the list of changed file since the last build.
    • @returns {Array<String>} List of absolute file paths.
  • hasChanged Check whether any files that the source uses have changed.
    • @params {String} source A unique identifier of the source.
    • @returns {Boolean} Whether a file the source uses has changed.
  • setChanged Marks the given set of file paths as changed files.
    • @params {Array<String>} filePaths = null A list of absolute file paths.

Options

  • getOptions Get the options.
    • @returns {Object} The options.

Watching

  • isWatching Get whether the watcher is running.
    • @returns {Boolean} Whether the watcher is running.
  • setWatching Set whether the watcher is running.
    • @params {Boolean} isWatching Whether the watcher is running.