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

extbuild

v1.0.5

Published

Command line tool for packaging browser extensions

Downloads

4

Readme

Extension Builder

A command line tool to help package browser extensions for different browsers and manifest versions.

Features

  • Set project-specific configurations
  • Sync files between source and target directories
  • Package (zip) targets for distribution
  • Create temporary target directories
  • Prevent version overwrite
  • Clean manifest.json

Installation

To use extbuild in the terminal, install with the -g option

npm install -g extbuild

Usage

Navigate the current working directory to where build_config.json is an immediate child, then run

extbuild

Configuration

{
  "project_name_short": "extbuild",
  "enforce_version_control": true,
  "clean_manifest": true,
  "default_actions": ["copy"],
  "release_directory": "../releases",
  "source": {
    "directory": "../src/chrome",
    "platform": "chrome"
  },
  "targets": [
    {
      "directory": "../src/firefox",
      "platform": "firefox",
      "manifest_version": 2,
      "patch": [],
      "temp": true
    }
  ],
  "git_messages": {
    "directory_sync": "automated directory sync",
    "packages": "automated package build"
  },
  "debug": false
}

project_name_short

The extension's short/abbreviated name.

Example

dad, pur, or extbuild.

enforce_version_control

If set to true, the program will check if a package already exists for the extension's current version. You can temporarily override this by using the --force option.

clean-manifest

If true, the program will remove any empty fields in the manifest, including empty objects, arrays, and strings.

default_actions

An array of actions that will run on every invocation.

Options

copy

This will sync the target (excluding temp enabled) directories with the source directory, adjusting any patch files and manifest fields.

package

This will create packages for the source and target (including temp enabled) directories.

git

This will push to GitHub after every action with automated messages configured in build_config.json.

release_directory

The relative path of the release directory, where packages will be created. If the directory does not exist, it will be created.

source

An object containing information on the source directory.

directory

The relative path of the source directory. This path must exist and contain a manifest.json file.

platform

The platform of the source directory. Supports chrome and firefox.

targets

An array of objects containing information on the build targets.

directory

The relative path of the source directory. If temp is true, this will be the relative path of the temporary directory. If the directory does not exist, one will be created.

platform

The platform of the target. Supports chrome, firefox, opera, and edge.

manifest_version

The manifest version of the target.

patch

Array of files to patch. Patches version and platform-specific methods, including changing chrome to browser for Firefox and browserAction to action for sync between manifest V2 and V3.

manifest.json files will be synced by default, it does not need to be included in patch.

temp

If true, the target directory will only be created if the package action is invoked, in which the directory will be removed after the process has finished.

git_messages

Commit messages used when the git action is invoked.

debug

Extra console output

scripts_directory

If invoking the script via npm, this field is required to point the program to the .sh scripts.