
Product
Redesigned Repositories Page: A Faster Way to Prioritize Security Risk
Our redesigned Repositories page adds alert severity, filtering, and tabs for faster triage and clearer insights across all your projects.
purescript
Advanced tools
PureScript binary wrapper that makes it seamlessly available via npm
This package makes maximum use of postinstall
script, so please make sure that ignore-scripts
npm-config is not enabled before installation.
$ npm config get ignore-scripts
false
npm install purescript
Once the command above is executed,
1. First, it checks if a PureScript binary has been already cached, 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 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.
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.');
});
You can use it via CLI by installing it globally.
npm install --global purescript
purs --help
ISC License © 2017 - 2019 Watanabe Shinnosuke
0.15.15
New features:
Add --exclude-file
to more commands (#4530 by @JordanMartinez)
This CLI arg was added to the compile
command, but not to other commands
where such a usage would be relevant (e.g. docs
, repl
, graph
, and ide
).
Enable passing source input globs via --source-globs-file path/to/file
(#4530 by @JordanMartinez)
--source-globs-file
support has been added to the following commands:
compile
, docs
, graph
, ide
, and publish
.
Due to a shell character limitation on Windows where a large list of
source globs cannot be passed (e.g. purs compile ... glob1000/src/**/*.purs
),
source globs can be stored in a file according to the format below
and the file is passed in instead via purs compile ---source-globs-file path/to/file
.
# Lines starting with '#' are comments.
# Blank lines are ignored.
# Otherwise, every line is a glob.
.spago/foo-1.2.3/src/**/*.purs
.spago/bar-2.3.3/src/**/*.purs
my-package/src/**/*.purs
my-package/tests/**/*.purs
--source-globs-file
is an optional argument. Mixing it with the normal source globs is fine.
Assuming .spago/source-globs
contains src/**/*.purs
, each command below will use
the same input globs:
purs compile src/**/*.purs
purs compile --source-globs .spago/source-globs
purs compile --source-globs .spago/source-globs src/**/*.purs
In the command...
purs compile inputGlob1 inputGlob2 --source-globs-file fileWithMoreGlobs --exclude-files excludeGlob1
the files passed to the compiler are: all the files found by
inputGlob1
, inputGlob2
, and all the globs listed in fileWithMoreGlobs
minus the files found by excludeGlob1
.
FAQs
PureScript wrapper that makes it available as a local dependency
The npm package purescript receives a total of 1,619 weekly downloads. As such, purescript popularity was classified as popular.
We found that purescript demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 11 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Our redesigned Repositories page adds alert severity, filtering, and tabs for faster triage and clearer insights across all your projects.
Security News
Slopsquatting is a new supply chain threat where AI-assisted code generators recommend hallucinated packages that attackers register and weaponize.
Security News
Multiple deserialization flaws in PyTorch Lightning could allow remote code execution when loading untrusted model files, affecting versions up to 2.4.0.