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

bs-build-tool

v1.0.1

Published

A build tool for copying and renaming HTML files

Downloads

6

Readme

🛠️ BS Build Tool

A simple and efficient build tool for copying and renaming HTML files from your dist folder

npm version License: MIT

📋 Overview

BS Build Tool is a lightweight Node.js utility that simplifies the process of copying HTML files from your dist directory and organizing them in a separate bsdist folder with custom naming to load onto a brightsign player without using the BrightAuthor software. Perfect for build workflows where you need to process built assets for brightsign.

✨ Features

  • 🚀 Auto-configuration: Automatically adds scripts and config to your existing package.json
  • 📁 Smart file handling: Copies files from dist to bsdist with custom renaming
  • ⚙️ Configurable: Customize source filename, destination filename, and build commands
  • 🔧 Build integration: Optional build command execution before file processing
  • 🛡️ Error handling: Graceful handling of missing files and build failures
  • 📦 Zero dependencies: Lightweight with no external dependencies

🚀 Installation

Install the package in your project:

npm install bs-build-tool

Or use it directly with npx:

npx bs-build-tool

📖 Usage

Basic Usage

After installation, run the tool in your project directory:

npx bs-build

On first run, the tool will automatically:

  1. Add a bs-build script to your package.json
  2. Add configuration options to your package.json. You MUST include the correct destination file name before running the package.
  3. Copy and rename your file according to the configuration

Using the Added Script

After the initial setup, you can use the script that was added to your package.json:

npm run bs-build

Command Line Options

Skip the build step entirely:

npx bs-build --skip-build
# or
npx bs-build -s

⚙️ Configuration

The tool automatically adds a config section to your package.json. You can customize these settings:

{
  "config": {
    "filename": "index.html",
    "newfile": "bs",
    "buildCommand": ""
  }
}

📁 File Structure

The tool works with this file structure:

your-project/
├── dist/
│   └── index.html          # Source file
├── bsdist/                 # Created by the tool
│   └── bs                  # Renamed output file
└── package.json           # Auto-configured

🔄 Workflow

  1. Build Phase (optional): Runs the configured build command
  2. Copy Phase: Copies the specified file from dist/ folder
  3. Rename Phase: Renames the file to the configured new filename
  4. Output: File is available in bsdist/ folder

🚨 Requirements

  • Node.js (any recent version)
  • An existing package.json in your project
  • A dist folder with the source file

🐛 Troubleshooting

Common Issues

"No package.json found"

  • Make sure you're running the command in a directory with a package.json file

"Source file does not exist"

  • Check that your dist folder contains the specified filename
  • Verify the filename config matches your actual file

"Build command failed"

  • The tool will continue with file copying even if the build fails
  • Set buildCommand to "" to skip the build step entirely

Debug Mode

Run with more verbose output:

DEBUG=* npx bs-build

📝 Example

Here's a complete example of using bs-build-tool in a Vite project:

{
  "name": "my-project",
  "scripts": {
    "build": "vite build",
    "bs-build": "node node_modules/bs-build-tool/index.js"
  },
  "config": {
    "filename": "index.html",
    "newfile": "production",
    "buildCommand": ""
  }
}

Run the tool:

npm run bs-build

Result:

  • Copies dist/index.htmlbsdist/production

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

👨‍💻 Author

Jackb


Made with ❤️ for the people who have the unfortunate task of designing AV ui's that run on a BrightSign player.