# @ainc/script

> Script compiler for typescript

Latest version **0.1.22** (published 2022-01-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install @ainc/script
pnpm add @ainc/script
yarn add @ainc/script
bun add @ainc/script
```

Provides the command `esc`.

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.22 |
| Published | 2022-01-08 |
| First published | 2019-11-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 13 |
| Unpacked size | 183.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | edonet |
| Maintainers | absock, edonet |
| Keywords | script, complier, typescript, run, execute |

## Links

- npm: https://www.npmjs.com/package/@ainc/script
- Repository: git@absock.net:repo/ainc/script
- npm.io page: https://npm.io/package/@ainc/script

## Dependencies (13)

- [@ainc/fs](https://npm.io/package/@ainc/fs.md) ^0.1.15
- [chokidar](https://npm.io/package/chokidar.md) ^3.5.2
- [typescript](https://npm.io/package/typescript.md) ^4.5.4
- [@babel/core](https://npm.io/package/@babel/core.md) ^7.16.7
- [@ainc/stdout](https://npm.io/package/@ainc/stdout.md) ^0.0.1
- [@babel/helper-plugin-utils](https://npm.io/package/@babel/helper-plugin-utils.md) ^7.16.7
- [@babel/plugin-proposal-decorators](https://npm.io/package/@babel/plugin-proposal-decorators.md) ^7.16.7
- [@babel/plugin-transform-react-jsx](https://npm.io/package/@babel/plugin-transform-react-jsx.md) ^7.16.7
- [@babel/plugin-transform-typescript](https://npm.io/package/@babel/plugin-transform-typescript.md) ^7.16.7
- [@babel/plugin-proposal-dynamic-import](https://npm.io/package/@babel/plugin-proposal-dynamic-import.md) ^7.16.7
- [@babel/plugin-proposal-class-properties](https://npm.io/package/@babel/plugin-proposal-class-properties.md) ^7.16.7
- [@babel/plugin-transform-modules-commonjs](https://npm.io/package/@babel/plugin-transform-modules-commonjs.md) ^7.16.7
- [@babel/plugin-proposal-export-namespace-from](https://npm.io/package/@babel/plugin-proposal-export-namespace-from.md) ^7.16.7

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 0.1.22 (latest) — 2022-01-08
- 0.1.21 — 2022-01-01
- 0.1.20 — 2022-01-01
- 0.1.19 — 2021-11-14
- 0.1.18 — 2021-08-14
- 0.1.17 — 2021-08-12
- 0.1.16 — 2021-08-11
- 0.1.15 — 2021-08-09
- 0.1.14 — 2021-06-14
- 0.1.13 — 2021-06-10
- 0.1.12 — 2021-06-05
- 0.1.11 — 2021-06-05
- 0.1.10 — 2021-06-03
- 0.1.9 — 2021-05-29
- 0.1.8 — 2021-05-29
- … 30 more at https://npm.io/package/@ainc/script/versions

## README

# @ainc/script
Script compiler for typescript

## Install
``` shell
$ yarn global add @ainc/script
```

## Usage
``` sh
# execute file
$ esc script.ts

# run code
$ esc -r 'console.log(process.cwd());'
```

## VS Code
``` json
{
    "name": "Launch Script",
    "type": "node",
    "request": "launch",
    "autoAttachChildProcesses": true,
    "runtimeExecutable": "esc",
    "args": [
        "${file}"
    ]
}
```

## API
``` javascript
import Script from '@ainc/script';

// create Script
const script = new Script();

// run code
script.run('console.log("run script")');

// execute file
script.execute('./script.ts');

// dependenise file
console.log(script.files);
```

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