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 🙏

© 2026 – Pkg Stats / Ryan Hefner

sliftutils

v1.2.2

Published

A build system and utility library for MobX + Preact projects.

Readme

sliftutils

A build system and utility library for MobX + Preact projects.

Getting Started

1. Setup

The first thing you should do is call the setup function. They will give you a lot of boilerplate code which you can delete or keep (I recommend commiting first, so you can pick which boilerplate changes you want):

npx slift-setup
# or
npx sliftsetup

2. Build or Watch

After setup, you can either build your project or watch for changes:

Build Commands

npx build-nodejs      # Build Node.js application
npx build-web         # Build web application
npx build-extension   # Build browser extension
npx build-electron    # Build Electron application

Watch Commands

npx slift-watch --port 9876 "nodejs/*.ts" "nodejs/*.tsx" "yarn build-nodejs"
npx slift-watch --port 9877 "web/*.ts" "web/*.tsx" "yarn build-web"
npx slift-watch --port 9878 "extension/*.ts" "extension/*.tsx" "yarn build-extension"
npx slift-watch --port 9879 "electron/*.ts" "electron/*.tsx" "yarn build-electron"

3. Run

After building, you can call the run functions:

node ./build-nodejs/server.js     # Run built Node.js app
node ./builders/webRun.js         # Run web application
node ./node_modules/electron/cli.js ./build-electron/electronMain.js  # Run Electron app

Or you can add your own scripts with special parameters if you want.

Hot Reloading

Optional Hot Reloading Function

You can optionally call the hot reloading function in your code if you want automatic reloading during development:

import { enableHotReloading } from "sliftutils/builders/hotReload";

async function main() {
    await enableHotReloading();
    // Your application code here
}

main().catch(console.error);

Running Node.js Scripts Directly

Node.js scripts can be called directly with typenode without needing to bundle them:

typenode ./nodejs/server.ts

When you call scripts directly with typenode, you can use hot reloading which allows you to hot reload per file by setting the module.hotreload flag or adding a hotreload.flag file.

Per-File Hot Reloading

To enable hot reloading for specific files, set the module.hotreload flag at the top of your file:

// Either set this flag on the files you want to hot reload
module.hotreload = true;

export function exampleFunction() {
    return "Hello from exampleFile.ts";
}

Alternatively, you can add a file called hotreload.flag in a folder, and everything in that folder and all child files will hot reload.

See nodejs/exampleFile.ts for an example of how to use the hot reload flag.

Utilities

This package includes many utilities for MobX + Preact projects. To see what utilities are available, read the index.d.ts file in the package. The utilities will work with any MobX + Preact type projects.

License

MIT