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

@pre_scripts/create-preui-nui

v0.1.4

Published

Scaffolds a FiveM NUI resource with preUI: npm create @pre_scripts/preui-nui

Readme

@pre_scripts/create-preui-nui

Scaffolds a ready FiveM NUI resource with preUI: Lua (fxmanifest.lua, client.lua) plus a Vite + React + Tailwind CSS v3 web UI built for Chromium 103, the engine inside FiveM.

npm create @pre_scripts/preui-nui@latest my-shop

npm create @pre_scripts/preui-nui runs this package (@pre_scripts/create-preui-nui). Without a name it asks for one (default my-nui).

Options

Pass options after --. Without it npm keeps them for itself: --no-theme is silently swallowed (you get the theme bridge anyway) and --lang en can make npm abort.

npm create @pre_scripts/preui-nui@latest my-shop -- --lang en --no-theme

| Option | Meaning | |---|---| | <name> | Resource name and folder: lowercase letters, digits, _ and -, starting with a letter or digit. | | --lang de\|en | Language of the UI texts, the demo data and the resource's README. Default de (du-form). | | --no-theme | Leave out the server-wide theme: no dependency 'preui_theme' / @preui_theme/bridge.lua in the manifest, no <NuiThemeBridge />. | | --force | Write into a non-empty folder (files with the same name are overwritten). | | --help | Usage. |

Without --force the starter refuses to write into an existing, non-empty folder.

What you get

my-shop/
  fxmanifest.lua     cerulean, lua54, ui_page 'web/dist/index.html' (+ preui_theme bridge unless --no-theme)
  client.lua         /my-shop toggles the UI (SetNuiFocus + setVisible), NUI callbacks close and getData
  README.md          structure, dev workflow, deploy, FiveM pitfalls
  .gitignore         node_modules and web/dist (build before deploying)
  web/
    package.json     react 19, @pre_scripts/preui, @pre_scripts/preui-nui, vite, tailwindcss 3
    vite.config.ts   target chrome103, base "./", dedupe react
    tailwind.config.js, postcss.config.js, tsconfig.json, index.html
    src/main.tsx     fonts + debugData mock (the UI opens in a normal browser)
    src/App.tsx      ThemeProvider storage={false}, NuiThemeBridge, useNuiVisibility, a window with Card, Tabs,
                     Item list, Badge, Button, KeybindHint; data from fetchNui('getData', undefined, mock)

Then:

cd my-shop/web
npm install
npm run dev        # develop in the browser with mock data
npm run build      # → web/dist, which FiveM loads

server.cfg: ensure preui_theme (unless --no-theme) and ensure my-shop; in game /my-shop opens the UI.

preui_theme is the example resource in the preUI repository (examples/fivem-theme), or any core resource implementing the theme protocol v1 of @pre_scripts/preui-nui.

Development

No dependencies: bin/create.mjs uses only Node built-ins (Node ≥ 18) and copies template/. In the template, __NAME__ is replaced with the resource name, __T_<KEY>__ with a text of the chosen language (table in bin/create.mjs), lines between @preui-theme:start / @preui-theme:end markers are dropped with --no-theme, README.<lang>.md becomes README.md and _gitignore becomes .gitignore (npm would drop a .gitignore).

# from the repository root
npx vitest run packages/create-preui-nui
node packages/create-preui-nui/bin/create.mjs my-test --lang en   # try it locally