purescript-contrib/node-purescript

Name: node-purescript

Owner: PureScript Contrib

Description: PureScript npm package: `npm install [--global] purescript`

Created: 2015-03-22 05:15:54.0

Updated: 2018-05-24 03:52:07.0

Pushed: 2018-05-22 11:37:56.0

Homepage: https://github.com/purescript/purescript

Size: 6869

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

logo

PureScript npm package

npm version Build Status Build status

PureScript binary wrapper that makes it seamlessly available via npm

Installation

Use 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.

screencast: restoring a cache

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.

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

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

CLI

You can use it via CLI by installing it globally.

install --global purescript

 --help
License

ISC License © 2017 - 2018 Shinnosuke Watanabe

The original PureScript logo is included in purescript/purescript repository which is licensed under the 3-Clause BSD License.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.