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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@xh/hoist-dev-utils

v11.0.1

Published

Utilities for configuring builds of Hoist-React client applications.

Downloads

359

Readme

🛠️ Hoist Dev Utils

Tooling for building and deploying web applications built on the Hoist React platform. This repository is made available as the @xh/hoist-dev-utils package on npm for import and use by applications.

Shared development dependencies

The package.json file in this repository specifies a set of development dependencies required for building Hoist React applications. Those applications can specify @xh/hoist-dev-utils as a dev dependency and transitively bring in libs for Webpack and all associated plugins used in app builds, including Webpack Dev Server, Babel, and other essential loaders.

While Hoist Dev Utils provides most essential dev dependencies for Hoist React, apps typically also include:

  • husky + lint-staged for pre-commit linting and other actions, such as running tsc.
  • prettier + eslint-config-prettier for opinionated code formatting.
  • stylelint + stylelint-config-standard-scss for SASS/SCSS linting.
  • typescript + relevant @types definitions, specifically @types/react + @types/react-dom.

See the Toolbox package.json for examples of these libraries in action.

Webpack configuration

The configureWebpack.js module exports a single configureWebpack() method that can be used to output a complete Webpack configuration. This includes support for transpiling and bundling multiple client application entry points with preconfigured loaders for JS code (Babel), styles (CSS/SASS/PostCSS) and HTML index file generation. See the docs within configureWebpack.js for supported arguments and additional details.

The generated Webpack configuration also sets the value of several XH globals within the built JS code, via the Webpack DefinePlugin. These include XH.appCode and XH.appName (both required), XH.appVersion (typically set as part of the build) and similar.

The intention is to reduce application webpack config files to a minimal and manageable subset of options. An example of such a file would be:

const configureWebpack = require('@xh/hoist-dev-utils/configureWebpack');

module.exports = (env = {}) => {
    return configureWebpack({
        appCode: 'myApp',
        appName: 'My Application',
        appVersion: '1.0-SNAPSHOT',
        favicon: './public/favicon.svg',
        devServerOpenPage: 'app/',
        ...env
    });
};

Note that additional env variables can be provided at build time, so the application file can specify initial defaults (such as appVersion above, checked in as a SNAPSHOT) that are then overridden for particular builds (e.g. via webpack --env prodBuild --env appVersion=1.2.3 to cut a versioned 1.2.3 release).

See the Hoist React docs for step-by-step details on the build process.

Favicons

To include a favicon with your app, provide the favicon option to configureWebpack(). This can be either a png or an svg file:

return configureWebpack({
    ...,
    favicon: './public/favicon.svg',
    ...
});

If your app is intended to be used on mobile devices, you may want to also include a wider variety of favicons. The following files will be automatically bundled in your app's manifest.json if they are found in your project's /client-app/public folder:

  • favicon-192.png (192px x 192px)
  • favicon-512.png (512px x 512px)
  • apple-touch-icon.png (180px x 180px)

Generating favicons via svg-favicon.sh

You can use the svg-favicon.sh script included in this repo to automatically create these favicons from a square SVG. Note that this script requires inkscape to be installed. Download the latest version from https://inkscape.org/ or install on Mac via Homebrew with brew install inkscape.

Inkscape includes a command-line interface which is leveraged by the script. In order for the script to be able to use it, you must first symlink Inkscape to /usr/local/bin. (Note this step is not required if you have installed via Homebrew.)

# Not required if installed via Homebrew!
ln -s /Applications/Inkscape.app/Contents/MacOS/inkscape \
/usr/local/bin/inkscape

Then run the script, passing a path to the SVG file as the argument. The command below assumes that you have hoist-dev-utils checked out as a sibling of your top-level project directory, and that you are running the command from within $projectDir/client-app/public:

../../../hoist-dev-utils/svg-favicon.sh favicon.svg

ESLint Configuration

✨ This package includes a development dependency on the @xh/eslint-config package. That package exports an eslint configuration object with XH's recommended coding conventions and best practices for Hoist React based development.

Applications that already have @xh/hoist-dev-utils as a dependency can use these rules for their own ESLint config with an eslint.config.js file similar to:

const {defineConfig, globalIgnores} = require('eslint/config'),
    xhEslintConfig = require('@xh/eslint-config'),
    prettier = require('eslint-config-prettier');

module.exports = defineConfig([
    {
        extends: [xhEslintConfig, prettier]
    },
    globalIgnores(['build/**/*', '.yarn/**/*', 'node_modules/**/*'])
]);

This example file:

  • Requires and specifies XH's recommended presets.
  • Overlays with Prettier-specific linter rules (assuming the project is using Prettier)
  • Ignores build outputs, bundled .yarn (if included in your project) and node_modules.

If required, rules and other settings extended from this base configuration can be overridden at the app level.

Hoist Dev Utils Development

To develop improvements to this library, clone its repo into your workspace alongside a project that uses Hoist-React, like Toolbox. Then follow the instructions for yarn link to symlink to this repo.


☎️ [email protected] | https://xh.io

Copyright © 2025 Extremely Heavy Industries Inc.