open-index/open-npm huggingface dataset:
npm package: @jcbhmr/deno
Description: CLI wrapper for Deno, a secure runtime for JavaScript and TypeScript
Author: Yoshiya Hinosawa
Latest version: 1.39.1-2

# deno-bin ![npm](https://img.shields.io/npm/v/deno-bin?color=green)

> Use [Deno][] via npm

You can use [deno][] via npm or npx.

Note: This module installs deno at `node_modules/deno-bin/bin/deno`, and you can use it via npx or npm's run-script.

# Usage via npx

`npx deno-bin` works like `deno` executable. For example, you can run a deno script `https://deno.land/std/examples/welcome.ts` like the below:

```shellsession
$ npx deno-bin run https://deno.land/std/examples/welcome.ts
Welcome to Deno!
```

You can also start repl:

```shellsession
$ npx deno-bin
Deno 1.1.0
exit using ctrl+d or close()
>
```

You can also use deno tools:
```
npx deno-bin fmt             # Formats script
npx deno-bin lint --unstable # Checks lint rules
```

# Usage via run-scripts

Use in `scripts` in package.json.

First install `deno-bin`:

```sh
npm i --save-dev deno-bin
```

(Note: This installs `deno` executable at `node_modules/deno-bin/bin/deno` internally.)

Then use `deno` in your "scripts".

package.json:

```json
{
  ...
  "scripts": {
    "foo": "deno run some-script.ts"
  },
  ...
}
```

Then hit the command `npm run foo`, and it executes `deno run some-script.ts` with locally installed deno.

# Ideas of usages

## Use `deno lint` in your node.js project

You can format your scripts with `deno lint` which is faster than prettier. (`deno lint` uses [dprint][] internally, which is mostly compatible with prettier and is implemented in Rust.)

```json
{
  "scripts": {
    "fmt": "deno fmt src"
  }
}
```

## Run some utility scripts

When you need some utility scripts in your repository, you can use deno for it. Because Deno can run typescript out of the box, you can skip any settings about typescript.

```json
{
  "scripts": {
    "task": "deno run ./tools/some-task.ts"
  }
}
```

# About the version of deno

`deno-bin` downloads the same version of `deno` executable as its own version number. For example, if you install `deno-bin@1.8.1`, you'll get deno `v1.8.1`.

# License

MIT

# History

- 2021-04-26 Windows support [#4](https://github.com/kt3k/deno-bin/pull/4)

[deno]: https://deno.land
[dprint]: https://dprint.dev/
npm package: @jcbhmr/exec
Description: 🐧 Ergonomic exec(3) for JavaScript
Author: Jacob Hummer
Latest version: 1.0.1

# `exec(3)` for JavaScript

🐧 Ergonomic `exec(3)` for JavaScript

<table align=center><td>

```js
// Replaces the current process with a new one.
exec("node", ["--version"], {
  cwd: "/home/someone_else/projects",
  env: { HELLO: "WORLD" },
  uid: 1234,
});
```

</table>

🐧 Works on Linux, macOS, BSDs, and more \
🛑 **Does not work** on Windows \
👶 Same arguments as `node:child_process` `spawn`

## Installation

![npm](https://img.shields.io/badge/npm-CB3837?style=for-the-badge&logo=npm&logoColor=FFFFFF)
![pnpm](https://img.shields.io/badge/pnpm-222222?style=for-the-badge&logo=pnpm&logoColor=F69220)
![Deno](https://img.shields.io/badge/Deno-222222?style=for-the-badge&logo=Deno&logoColor=70FFAF)
![Bun](https://img.shields.io/badge/Bun-000000?style=for-the-badge&logo=Bun&logoColor=FFFFFF)

```sh
npm install @jcbhmr/exec
```

⚠️ This package requires a Unix-like OS (Linux, macOS, etc.). Windows is not supported. For an isomorphic cross-platform solution, consider using [`@jcbhmr/cross-exec`](https://www.npmjs.com/package/@jcbhmr/cross-exec).

## Usage

![macOS](https://img.shields.io/badge/macOS-000000?style=for-the-badge&logo=macOS&logoColor=FFFFFF)
![Linux](https://img.shields.io/badge/Linux-222222?style=for-the-badge&logo=Linux&logoColor=FCC624)
![Node.js](https://img.shields.io/badge/Node.js-5FA04E?style=for-the-badge&logo=Node.js&logoColor=FFFFFF)
![Deno](https://img.shields.io/badge/Deno-222222?style=for-the-badge&logo=Deno&logoColor=70FFAF)
![Bun](https://img.shields.io/badge/Bun-000000?style=for-the-badge&logo=Bun&logoColor=FFFFFF)

```js
// Unix-like operating systems ONLY.
import exec from "@jcbhmr/exec";

exec("node", ["--version"]);
```

## Development

![macOS](https://img.shields.io/badge/macOS-000000?style=for-the-badge&logo=macOS&logoColor=FFFFFF)
![Linux](https://img.shields.io/badge/Linux-222222?style=for-the-badge&logo=Linux&logoColor=FCC624)
![Node.js](https://img.shields.io/badge/Node.js-5FA04E?style=for-the-badge&logo=Node.js&logoColor=FFFFFF)
![Deno](https://img.shields.io/badge/Deno-222222?style=for-the-badge&logo=Deno&logoColor=70FFAF)
![Bun](https://img.shields.io/badge/Bun-000000?style=for-the-badge&logo=Bun&logoColor=FFFFFF)

If you're on Windows you **must** use WSL to develop this package.

TODOs

- Implement fd rearrangement according to the stdio options. Right now it just inherits.
- When Deno adds `process.execve()` support, use that instead of FFI. https://github.com/denoland/deno/issues/29017
- When Bun adds `process.execve()` support, use that instead of FFI.