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

@es-exec/api

v0.0.5

Published

An esbuild plugin to run a script after building a package.

Downloads

8

Readme

ES Exec Api

An api that builds and runs a program.

Installation

npm

npm install --save-dev @es-exec/api

yarn

yarn add --dev @es-exec/api

Usage

import esexec from '@es-exec/api';

/** @type import('es-exec/api').ESExecOptions */
const options = {
    ..., // Any es-exec option.
    buildOptions: {
        ... // Any esbuild option.
    }
};

esexec(options)

Options

All fields are optional, but either buildOptions or esbuildConfig should be set with at least one entrypoint file in order to properly build the project.

| Name | Type | Description | | --------------- | ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | | buildOptions | BuildOptions | Esbuild options to use when building the project. Will overwrite all values in the specified esbuildConfig. | | clean | boolean | Cleans the outdir folder. | | env | NodeJS.ProcessEnv | Environment variables to pass onto the child process that starts the project. | | esbuildConfig | string | The esbuild configuration file to use to build the project. | | lint | boolean | If true, lints the project files using @es-exec/esbuild-plugin-eslint. | | lintFix | boolean | If true, will fix lint problems found in the project. | | main | string | The file to run in a child process using @es-exec/esbuild-plugin-serve. If no main is set, will serve the outfile from the esbuild options. | | script | string | CLI script to run after the package is build. If set, will use @es-exec/esbuild-plugin-start to run the script. | | singleLint |boolean | If true, runs@es-exec/esbuild-plugin-eslintin single mode. | |useExternal |boolean | If true, uses dependencies and peer dependencies in node_modules as external. | |verbose |boolean | Useful for debugging. | |watch |boolean` | Defaults to true. If false, will not run esbuild in watch mode. If true or not set, will run esbuild in watch mode. |