# @hisystems/snowpack-plugin-build-script

> A Snowpack plugin to build files in your application using any CLI tool. This plugin passes matching files as input to a custom CLI command and returns the output response as the build result. This is useful for connecting a custom CLI or when no Snowpack

Latest version **2.0.7** (published 2020-08-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install @hisystems/snowpack-plugin-build-script
pnpm add @hisystems/snowpack-plugin-build-script
yarn add @hisystems/snowpack-plugin-build-script
bun add @hisystems/snowpack-plugin-build-script
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.7 |
| Published | 2020-08-24 |
| First published | 2020-08-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 3.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | caiusrsm |

## Links

- npm: https://www.npmjs.com/package/@hisystems/snowpack-plugin-build-script
- npm.io page: https://npm.io/package/@hisystems/snowpack-plugin-build-script

## Dependencies (2)

- [execa](https://npm.io/package/execa.md) ^4.0.3
- [npm-run-path](https://npm.io/package/npm-run-path.md) ^4.0.1

## Recent versions

- 2.0.7 (latest) — 2020-08-24
- 2.0.5 — 2020-08-21

## README

# @snowpack/plugin-build-script

A Snowpack plugin to build files in your application using any CLI tool. This plugin passes matching files as input to a custom CLI command and returns the output response as the build result. This is useful for connecting a custom CLI or when no Snowpack plugin exists for a favorite build tool.

Note: All Snowpack < v2.6 `build:*` scripts now use this plugin behind the scenes.

Usage:

```bash
npm install @snowpack/plugin-build-script
```

Then add the plugin to your Snowpack config:

```js
// snowpack.config.js

module.exports = {
  plugins: [
    [
      '@snowpack/plugin-build-script',
      {
        input: ['.tsx'], // files to watch
        output: ['.tsx'], // files to export
        cmd: 'babel --filename $FILE', // cmd to run
      },
    ],
  ],
};
```

## Plugin Options

| Name     |    Type    | Description                                                                 |
| :------- | :--------: | :-------------------------------------------------------------------------- |
| `input`  | `string[]` | Array of extensions to watch for.                                           |
| `output` | `string[]` | Array of extensions this plugin will output.                                |
| `cmd`    |  `string`  | Command to run on every file matching `input`. Accepts the `$FILE` env var. |

---
_Source: https://npm.io/package/@hisystems/snowpack-plugin-build-script · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
