# mlscript

> mlscript

Latest version **0.0.1-beta.5** (published 2023-09-15) · MIT license · 0 weekly downloads

## Install

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

## Health

**Score 35/100 (D)** — status: abandoned.

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

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.0.1-beta.5 |
| Published | 2023-09-15 |
| First published | 2022-08-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 12.2 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 237 |
| Author | HKUST TACO Lab |
| Maintainers | chengluyu, neilkleistgao |
| Keywords | functional-programming, type-inference |

## Links

- npm: https://www.npmjs.com/package/mlscript
- Repository: https://github.com/hkust-taco/mlscript
- Homepage: https://github.com/hkust-taco/mlscript#readme
- Issues: https://github.com/hkust-taco/mlscript/issues
- npm.io page: https://npm.io/package/mlscript

## Dependencies (3)

- [json5](https://npm.io/package/json5.md) ^2.2.3
- [chokidar](https://npm.io/package/chokidar.md) ^3.5.3
- [typescript](https://npm.io/package/typescript.md) ^4.7.4

## Recent versions

- 0.0.1-beta.5 (latest) — 2023-09-15
- 0.0.1-beta.4 — 2023-07-27
- 0.0.1-beta.3 — 2023-07-20
- 0.0.1-beta.2 — 2023-07-20
- 0.0.1-beta.1 — 2023-07-20
- 0.0.1-beta.0 — 2023-07-20
- 0.0.1-alpha.0 — 2022-08-17

## README

# MLscript

**This is a pre-release of MLscript.**

## Quick Start
To install MLscript, you can use `npm`:
```shell
npm i mlscript
```

The newest version is recommended: there may be lots of bugs in the previous versions.

To watch the project directory, you can use TypeScript(recommended)/JavaScript:
```ts
import mlscript from "mlscript"

// filename: string, workDir: string, outputDir: string, tsconfig: string, commonJS: boolean, expectTypeError: boolean
mlscript.watch("./mlscript/Main.mls", "./", "./js/", "./tsconfig.json", false, true)
```

The path must start with `./`, or it will be treated as `node_modules` paths.

If you need to interoperate with TypeScript, you must provide the path of `tsconfig.json` file.
Otherwise, it is optional.

You can choose to use CommonJS or ES modules(recommended).

Since Mlscript is still under development, type inferences are not fully supported.
If there is a type error but it is correct, please set the `expectTypeError` flag to `true`.
To get the type error messages, please check the corresponding `.mlsi` files in `.interfaces`.

For more details, you can check the demo [here](https://github.com/NeilKleistGao/mlscript-driver-demo).

## Project Structure
The MLscript uses `git` to track the file changes.
Please make sure your project locates in a git repo.

Though not necessary, we still recommend you organize the project in this structure:
- `.interfaces`: temporary interface files generated by MLscript.
- `mlscript`: directory for MLscript files.
- `node_modules`: third-party libraries in TypeScript.
- `ts`: directory for TypeScript files.
- configuration files: `package.json` and `tsconfig.json` should locate in the root directory.

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