https://github.com/ecliptic/purescript-npm
An experimental attempt to bring the PureScript ecosystem to npm
https://github.com/ecliptic/purescript-npm
Last synced: 11 months ago
JSON representation
An experimental attempt to bring the PureScript ecosystem to npm
- Host: GitHub
- URL: https://github.com/ecliptic/purescript-npm
- Owner: ecliptic
- License: mit
- Created: 2017-04-11T18:07:06.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-01T04:21:20.000Z (about 9 years ago)
- Last Synced: 2025-04-10T14:17:20.608Z (over 1 year ago)
- Language: JavaScript
- Size: 43 KB
- Stars: 19
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# purescript-npm
Traditionally, the PureScript ecosystem has used the [Bower](https://bower.io/) package manager to manage packages. Harry Garrood explained the reasons why in a great [blog post](http://harry.garrood.me/blog/purescript-why-bower/). This tool came from the JavaScript community as an alternative to [npm](https://www.npmjs.com/), which was typically used only for backend Node packages at the time and used nested dependencies, which psc can't handle.
In the broader JavaScript community, however, Bower has fallen out of favor. The community has begun to coalesce on npm, with tools like [Yarn](https://yarnpkg.com/en/) and [Lerna](https://lernajs.io/) springing up to help manage larger or more complex packaging workflows. The `--flat` option for Yarn avoids the PureScript community's issue with nested dependencies by preventing them altogether.
This project is an attempt to pull the PureScript ecosystem effectively into npm, publishing mirrors of common PureScript packages through the [@purescript](https://www.npmjs.com/org/purescript) organization on npm. If you'd like to help maintain packages, let [@bkonkle](https://github.com/bkonkle) know!
## Usage
To use these packages, you'll need to include `node_modules` in your build sources. Examples are below.
### purs-loader
Add `'node_modules/@purescript/*/src/**/*.purs'` and `'node_modules/purescript-*/src/**/*.purs'`to the `src` loader option:
```js
{
test: /\.purs$/,
loader: 'purs-loader',
query: {
psc: 'psa',
src: [
'node_modules/@purescript/*/src/**/*.purs',
'node_modules/purescript-*/src/**/*.purs',
'src/**/*.purs'
]
}
}
```
### psc
Include the `node_modules` dependencies on your `psc` command line.
```sh
$ psc src/Main.purs 'node_modules/@purescript/*/src/**/*.purs' 'node_modules/purescript-*/src/**/*.purs'
```
## Available Packages
[The full list of available packages!](https://www.npmjs.com/org/purescript)
## Development
Adding a package:
```sh
$ git submodule add https://github.com/$GHUSER/purescript-$PROJECT.git packages/$PROJECT
$ scripts/refresh.js $PROJECT
```