PureScript binary wrapper that makes it seamlessly available via 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.
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.
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.');
});
You can use it via CLI by installing it globally.
npm install --global purescript
purs --help
ISC License © 2017 Shinnosuke Watanabe
The original PureScript logo is included in purescript/purescript repository which is licensed under the 3-Clause BSD License.