# purescript-installer

> Installs the PureScript compiler

Latest version **0.3.5** (published 2023-04-26) · ISC license · 0 weekly downloads

## Install

```sh
npm install purescript-installer
pnpm add purescript-installer
yarn add purescript-installer
bun add purescript-installer
```

Provides the command `install-purescript`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.3.5 |
| Published | 2023-04-26 |
| First published | 2019-06-08 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=12 |
| Dependencies | 18 |
| Unpacked size | 430.4 KB |
| Known vulnerabilities | 0 (+12 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 10 |
| Author | Watanabe Shinnosuke |
| Maintainers | hdgarrood, f-f, purefunctor, jalexm, thomashoneyman, purescript-npm |
| Keywords | purescript, compiler, installer |

## Links

- npm: https://www.npmjs.com/package/purescript-installer
- Repository: https://github.com/purescript/npm-installer
- Homepage: https://github.com/purescript/npm-installer#readme
- Issues: https://github.com/purescript/npm-installer/issues
- npm.io page: https://npm.io/package/purescript-installer

## Dependencies (18)

- [ms](https://npm.io/package/ms.md) ^2.1.2
- [tar](https://npm.io/package/tar.md) ^6.1.11
- [once](https://npm.io/package/once.md) ^1.4.0
- [chalk](https://npm.io/package/chalk.md) ^2.4.2
- [execa](https://npm.io/package/execa.md) ^2.0.3
- [which](https://npm.io/package/which.md) ^1.3.1
- [byline](https://npm.io/package/byline.md) ^5.0.0
- [rimraf](https://npm.io/package/rimraf.md) ^2.6.3
- [semver](https://npm.io/package/semver.md) ^7.3.7
- [cacache](https://npm.io/package/cacache.md) ^11.3.2
- [filesize](https://npm.io/package/filesize.md) ^4.1.2
- [minimist](https://npm.io/package/minimist.md) ^1.2.0
- [env-paths](https://npm.io/package/env-paths.md) ^2.2.0
- [log-update](https://npm.io/package/log-update.md) ^4.0.0
- [log-symbols](https://npm.io/package/log-symbols.md) ^3.0.0
- [is-plain-obj](https://npm.io/package/is-plain-obj.md) ^2.0.0
- [zen-observable](https://npm.io/package/zen-observable.md) ^0.8.14
- [make-fetch-happen](https://npm.io/package/make-fetch-happen.md) ^10.0.0

## 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.3.5 (latest) — 2023-04-26
- 0.3.4 — 2023-04-25
- 0.3.3 — 2022-12-06
- 0.3.1 — 2022-06-11
- 0.2.6 — 2022-04-26
- 0.2.5 — 2019-07-09
- 0.2.4 — 2019-07-09
- 0.2.3 — 2019-07-09
- 0.2.1 — 2019-07-07
- 0.2.0 — 2019-06-19
- 0.1.0 — 2019-06-08

## README

# purescript-installer

A command-line tool to install [PureScript](https://github.com/purescript/purescript) to the current working directory

1. First, it checks if a PureScript binary has been already cached in a disk, and restores that if available
2. The second plan: if no cache is available, it downloads a prebuilt binary from [the PureScript release page](https://github.com/purescript/purescript/releases).
3. The last resort: if no prebuilt binary is provided for the current platform or the downloaded binary doesn't work correctly, it downloads [the PureScript source code](https://github.com/purescript/purescript/tree/master) and compile it with [Stack](https://docs.haskellstack.org/).

*In most cases users don't need to install this CLI directly, but would rather use the [`purescript` npm package](https://npmjs.com/package/purescript).*

## Installation

[Use](https://docs.npmjs.com/cli/install) [npm](https://docs.npmjs.com/about-npm/).

```
npm install purescript-installer
```

## CLI

Once this package is installed to the project directory, users can execute `install-purescript` command inside [npm scripts](https://docs.npmjs.com/misc/scripts#description).

```
Usage:
install-purescript [options]

Options:
--purs-ver <string> Specify PureScript version
--name     <string> Change a binary name
                        Default: 'purs.exe' on Windows, 'purs' on others
                        Or, if the current working directory contains package.json
                        with `bin` field specifying a path of `purs` command,
                        this option defaults to its value
--help,             Print usage information
--version           Print version

Also, these flags are passed to `stack install` command if provided:
--dry-run
--pedantic
--fast
--only-snapshot
--only-dependencies
--only-configure
--trace
--profile
--no-strip
--coverage
--no-run-tests
--no-run-benchmarks
```

## Developer Guide

If you'd like to contribute to this project, here are instructions for testing your changes locally:

Checkout code and create global link to PS installer package:
```
git clone https://github.com/purescript/npm-installer.git
cd npm-installer
npm link
```

Create another project for testing, and add linked PS installer:
```
cd ..
mkdir test-installer
cd test-installer
npm init -y
npm link purescript-installer
```

Test PS installer. You may re-run this command without repeating any of the above steps to pick-up new PS installer changes.
```
npx install-purescript
```

## License

[ISC License](./LICENSE) © 2017 - 2019 Watanabe Shinnosuke

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