# tscpl

> Port of @RJmsG's ACPL to TypeScript

Latest version **2023.6.7** (published 2023-06-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install tscpl
pnpm add tscpl
yarn add tscpl
bun add tscpl
```

Provides the command `tscpl`.

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2023.6.7 |
| Published | 2023-06-08 |
| First published | 2023-02-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 34.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | M.D. Walters |
| Maintainers | mdwalters |

## Links

- npm: https://www.npmjs.com/package/tscpl
- Repository: https://github.com/mdwalters/TSCPL
- Homepage: https://github.com/mdwalters/TSCPL#readme
- Issues: https://github.com/mdwalters/TSCPL/issues
- npm.io page: https://npm.io/package/tscpl

## Dependencies (2)

- [chalk](https://npm.io/package/chalk.md) ^4.1.2
- [yargs](https://npm.io/package/yargs.md) ^17.7.2

## Recent versions

- 2023.6.7 (latest) — 2023-06-08
- 2023.4.17 — 2023-04-18
- 1.2.7 — 2023-04-04
- 1.2.6 — 2023-03-05
- 1.2.5 — 2023-02-26
- 1.2.4 — 2023-02-26
- 1.2.3 — 2023-02-22
- 1.2.2 — 2023-02-18
- 1.2.1 — 2023-02-17
- 1.2.0 — 2023-02-16
- 1.1.0 — 2023-02-15

## README

# TSCPL
TSCPL (**T**ype**S**cript **C**ompiled **P**rogramming **L**anguage) is a port of ACPL. The original ACPL compiler compiles ACPL files to C, but TSCPL can compile ACPL files to TypeScript and even run ACPL files after compilation.
## Installation
```bash
npm install -g tscpl
```
## Compiling and Running ACPL files
### Compiling
To compile a ACPL file, you just need to run the following command:
```bash
tscpl [ACPL file here]
```
### Running
Since version 1.1.0, TSCPL can run ACPL files automatically after the file is compiled. To do this, run the following command:
```bash
tscpl [ACPL file here] --run
```
## Output files
TSCPL compiles ACPL files to TypeScript in the file format of `[original ACPL file name].ts`. Since version 1.2.0, you can use the `--output` flag to output the compiled ACPL file to any file name you want! Please note that this doesn't change the output language. To do this, run the following command:
```bash
tscpl [ACPL file here] --output [compiled ACPL file name here]
```
# libtscpl
Since version 1.2.0, libtscpl is the backend for TSCPL written in TypeScript. It provides TSCPL with it's core functions, such as compiling ACPL files.
## Documentation
### `compile()`
Compiles a ACPL file.
## Example script
```
# main.acpl
outln "Hello from libtscpl!"
```

```ts
// index.ts
import { compile } from "tscpl";

try {
    compile("main.acpl", "main.acpl.ts");
} catch(e) {
    console.error(e);
}
```

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