Code Monkey home page Code Monkey logo

node-purescript-bin's Introduction

logo

PureScript npm package

npm version Build Status 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.

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 a prebuilt binary is not 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 {exec} = require('child_process');
const purs = require('purescript'); //=> 'Users/you/example/node_modules/purescript/purs.bin'

exec(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 Shinnosuke Watanabe

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

node-purescript-bin's People

Contributors

chexxor avatar damncabbage avatar garyb avatar jqyu avatar kritzcreek avatar nwolverson avatar seanstrom avatar sectore avatar shinnn avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.