JSPM

  • Created
  • Published
  • Downloads 5627
  • Score
    100M100P100Q139935F
  • License MIT

PureScript wrapper that makes it seamlessly available as a local dependency

Package Exports

  • purescript

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (purescript) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

PureScript wrapper for Node

NPM version Build Status Coverage Status Dependency Status devDependency Status

PureScript binary wrapper that makes it seamlessly available via npm

Installation

Use npm after making sure your development environment satisfies the requirements.

npm install purescript

Release candidate version

Specify next tag on installation.

npm install purescript@next

Usage

const {execFile} = require('child_process');
const paths = require('purescript');

// On POSIX
paths.psc; //=> '/path/to/proj/node_modules/purescript/vendor/psc'
paths['psc-bundle']; //=> '/path/to/proj/node_modules/purescript/vendor/psc-bundle'
paths['psc-docs']; //=> '/path/to/proj/node_modules/purescript/vendor/psc-docs'
paths['psc-publish']; //=> '/path/to/proj/node_modules/purescript/vendor/psc-publish'
paths.psci; //=> '/path/to/proj/node_modules/purescript/vendor/psci'

execFile(psc, ['input.purs', '--output', 'output.purs'], err => {
  if (err) {
    throw err;
  }

  console.log('Compiled.');
});

API

require('purescript').psc

Type: String

The path to psc binary

require('purescript')['psc-bundle']

Type: String

The path to psc-bundle binary

require('purescript')['psc-docs']

Type: String

The path to psc-docs binary

require('purescript')['psc-publish']

Type: String

The path to psc-publish binary

require('purescript').psci

Type: String

The path to psci binary

CLI

You can use it via CLI by installing it globally.

npm install -g purescript

psc --help
psc-bundle --help
psc-docs --help
psc-publish --help
psci --help

License

Copyright (c) 2015 Shinnosuke Watanabe

Licensed under the MIT License.