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

piral-cli-xbuild

v1.0.0

Published

Provides debug and build capabilities for pilets and Piral instances using npm scripts.

Readme

Piral Logo

Piral CLI xBuild · GitHub License npm version tested with jest Gitter Chat

This plugin enables using npm scripts for building and debugging Piral instances & pilets.

Installation

Use your favorite package manager for the installation (e.g., npm):

npm i piral-cli-xbuild --save-dev

Note: The plugin has to be installed to tell the piral-cli to use xbuild as the default bundler.

Using

Standard commands such as piral build or pilet debug will now work against shell scripts defined via special sections in the package.json.

Environment variables available for all commands:

| Name | Description | | ---------------------------------- | ----------------------------------------------------------------- | | PIRAL_ROOT | The root directory where the package.json of the project is. | | PIRAL_LOG_LEVEL | The log level (1-5) set for the piral-cli. | | PIRAL_TARGET | The directory where the source files of the project are. |

piral build

Used section in package.json: piral:build

Example:

{
  "name": "my-piral-instance",
  //...
  "scripts": {
    "build": "piral build"
  },
  "piral:build": {
    "command": "create-react-app",
    "outputDir": "lib"
  }
}

Options for running:

| Name | Description | | ---------------------------------- | ----------------------------------------------------------------- | | command (required) | The command to run to building the Piral instance. | | outputDir (required) | The directory where the generated files can be found. | | mainFile (required) | The name of the created HTML file (usually index.html). |

Environment variables:

| Name | Description | | ---------------------------------- | ----------------------------------------------------------------- | | PIRAL_PUBLIC_URL | The public path of the application. | | PIRAL_EMULATOR | If the current build is for an emulator package. | | PIRAL_CONTENT_HASH | If a hash should be placed in the file name (true or false). | | PIRAL_SOURCE_MAPS | Indicates of source maps should be used (true or false). | | PIRAL_MINIFY | Indicates of the code should be minifed (true or false). | | PIRAL_ENTRY_FILE | The path of the entry file. | | PIRAL_EXTERNALS | The comma separated packages that are shared. |

piral debug

Used section in package.json: piral:debug

Example:

{
  "name": "my-piral-instance",
  //...
  "scripts": {
    "start": "piral debug"
  },
  "piral:debug": {
    "command": "create-react-app",
    "outputDir": "lib"
  }
}

Options for running:

| Name | Description | | ---------------------------------- | ----------------------------------------------------------------- | | command (required) | The command to run to building the Piral instance. | | outputDir (required) | The directory where the generated files can be found. | | mainFile (required) | The name of the created HTML file (usually index.html). | | watchLine (optional) | If set waits for a certain text to be seen in the command output. |

Environment variables:

| Name | Description | | ---------------------------------- | ----------------------------------------------------------------- | | PIRAL_PUBLIC_URL | The public path of the application. | | PIRAL_EMULATOR | If the current build is for an emulator package. | | PIRAL_CONTENT_HASH | If a hash should be placed in the file name (true or false). | | PIRAL_SOURCE_MAPS | Indicates of source maps should be used (true or false). | | PIRAL_MINIFY | Indicates of the code should be minifed (true or false). | | PIRAL_ENTRY_FILE | The path of the entry file. | | PIRAL_EXTERNALS | The comma separated packages that are shared. |

pilet build

Used section in package.json: pilet:build

Example:

{
  "name": "my-pilet",
  //...
  "scripts": {
    "build": "pilet build"
  },
  "pilet:build": {
    "command": "create-react-app",
    "outputDir": "lib",
    "mainFile": "index.js"
  }
}

Options for running:

| Name | Description | | ---------------------------------- | ----------------------------------------------------------------- | | command (required) | The command to run to building the pilet. | | outputDir (required) | The directory where the generated files can be found. | | mainFile (required) | The name of the created JS file (usually index.js). | | skipTransform (optional) | If set to true assumes that the provided command makes a pilet. |

Making a pilet implies that the pilet is fully valid, e.g., has the format as specified via the --schema command line flag. By default, the pilet build command will transform the output into a valid pilet.

Environment variables:

| Name | Description | | ---------------------------------- | ----------------------------------------------------------------- | | PILET_NAME | The name of the pilet package. | | PILET_REQUIRE_REF | Contains the require reference for the window. | | PILET_CONTENT_HASH | If a hash should be placed in the file name (true or false). | | PILET_SOURCE_MAPS | Indicates of source maps should be used (true or false). | | PILET_MINIFY | Indicates of the code should be minifed (true or false). | | PILET_ENTRY_MODULE | The path of the entry module. | | PILET_EXTERNALS | The comma separated external packages. | | PILET_IMPORTMAP | The JSON string with the importmap. | | PILET_SCHEMA | The version of used schema, e.g., v2. | | PILET_PIRAL_INSTANCES | The JSON string with the used piral instances. |

pilet debug

Used section in package.json: pilet:debug

Example:

{
  "name": "my-pilet",
  //...
  "scripts": {
    "start": "pilet debug"
  },
  "pilet:debug": {
    "command": "create-react-app",
    "outputDir": "lib",
    "mainFile": "index.js"
  }
}

Options for running:

| Name | Description | | ---------------------------------- | ----------------------------------------------------------------- | | command (required) | The command to run to building the pilet. | | outputDir (required) | The directory where the generated files can be found. | | mainFile (required) | The name of the created JS file (usually index.js). | | watchLine (optional) | If set waits for a certain text to be seen in the command output. | | skipTransform (optional) | If set to true assumes that the provided command makes a pilet. |

Making a pilet implies that the pilet is fully valid, e.g., has the format as specified via the --schema command line flag. By default, the pilet build command will transform the output into a valid pilet.

Environment variables:

| Name | Description | | ---------------------------------- | ----------------------------------------------------------------- | | PILET_NAME | The name of the pilet package. | | PILET_REQUIRE_REF | Contains the require reference for the window. | | PILET_CONTENT_HASH | If a hash should be placed in the file name (true or false). | | PILET_SOURCE_MAPS | Indicates of source maps should be used (true or false). | | PILET_MINIFY | Indicates of the code should be minifed (true or false). | | PILET_ENTRY_MODULE | The path of the entry module. | | PILET_EXTERNALS | The comma separated external packages. | | PILET_IMPORTMAP | The JSON string with the importmap. | | PILET_SCHEMA | The version of used schema, e.g., v2. | | PILET_PIRAL_INSTANCES | The JSON string with the used piral instances. |

License

Piral is released using the MIT license. For more information see the license file.