Skip to content
PureScript npm package: `npm install [--global] purescript`
Branch: master
Clone or download
Latest commit 1677406 Apr 15, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
media update depenencies and devDependencies Apr 8, 2019
.editorconfig update dependencies and devDependencies May 27, 2018
.gitattributes add screencasts and a project logo Aug 31, 2017
.gitignore introduce install-purescript-cli Aug 30, 2017
.npmrc introduce install-purescript-cli Aug 30, 2017
.travis.yml test on macOS Mojave Apr 8, 2019
LICENSE update depenencies and devDependencies Apr 8, 2019
README.md
index.js ensure the binary exists before exposing its path Nov 13, 2018
package.json
prepublish.js update dependencies and devDependencies May 27, 2018
test.js update devDependencies Nov 13, 2018

README.md

logo

PureScript npm package

npm version Build Status

PureScript binary wrapper that makes it seamlessly available via npm

Installation

Use npm.

npm install purescript

Note that this package makes maximum use of postinstall script, so please make sure that ignore-scripts npm-config is not enabled before installation.

Once the command above is executed,

1. First, it checks if a PureScript binary has been already cached in your machine, and restores that if available.

2. The second plan: if no cache is available, it downloads a prebuilt binary from the PureScript release page.

screencast: downloading a binary

3. The last resort: if no prebuilt binary is provided for your platform or the downloaded binary doesn't work correctly, it downloads the PureScript source code and compile it with Stack.

screencast: compile a source

API

require('purescript')

Type: string

An absolute path to the installed PureScript binary, which can be used with child_process functions.

const {execFile} = require('child_process');
const purs = require('purescript'); //=> '/Users/you/example/node_modules/purescript/purs.bin'

execFile(purs, ['compile', 'input.purs', '--output', 'output.purs'], () => {
  console.log('Compiled.');
});

CLI

You can use it via CLI by installing it globally.

npm install --global purescript

purs --help

License

ISC License © 2017 - 2019 Shinnosuke Watanabe

The artwork is a derivative of PureScript logo by Gareth Hughes used under CC BY 4.0, and it is also licensed under CC BY 4.0 by Shinnosuke Watanabe.

You can’t perform that action at this time.