psc-package icon indicating copy to clipboard operation
psc-package copied to clipboard

[Question] Guidance about the purescript tool set chain

Open PierreR opened this issue 8 years ago • 9 comments

My understanding so far is that psc-package is meant to replace bower . On the other hand pulp is still useful. Is that correct ? Is it possible to use psc-package together with purs without requiring a third tool ?

PureScript by Example does not mention psc-package at all and would suggest the use of bower to tackle dependencies. Does it mean that psc-package is not ready for broad user consumption yet ?

At this point, I have found the psc-package story quite confusing. What seems to be missing is a section about simple usage patterns. I have managed to build a project with psc-package but it is still unclear to me if I should bundle using purs or pulp.

Thanks for your help.

PierreR avatar Oct 18 '17 07:10 PierreR

I have found out that one thing that works well is the combo pulp & psc-package. I don't know if this is the idiomatic way but if it is would you be open to a PR that add the mention of pulp in the README ?

PierreR avatar Oct 18 '17 19:10 PierreR

I think pulp already supports psc-package according to https://github.com/purescript-contrib/pulp#dependency-management.

kritzcreek avatar Oct 18 '17 19:10 kritzcreek

@kRITZCREEK Yep it does and it works pretty well for me so far. I am just saying that if I knew I had to use psc-package together with pulp it would have save me hours of troubleshooting. Somehow the fact that one of the goal of the project is to remove the need of node has been a source of confusion as well (as I then assume pulp + psc-package was not the way to go).

Anyhow mentioning pulp on the README or some other directions about how psc-package is meant to be used with other tools seems like a good idea.

PierreR avatar Oct 18 '17 19:10 PierreR

You don't need to use Pulp, but a documentation fix to mention it briefly would be a good idea, yes.

paf31 avatar Oct 18 '17 21:10 paf31

@paf31 What would be the replacement for pulp build -O --to output.js in a psc-package setting without pulp ?

PierreR avatar Oct 19 '17 11:10 PierreR

You would use psc-package build followed by purs-bundle on the output.

paf31 avatar Oct 20 '17 01:10 paf31

How do I use purs-bundle on the output? I tried psc-package sources | xargs purs bundle, but that didn't work. Why there is no psc-package bundle in the first place?

arrowd avatar Sep 22 '19 19:09 arrowd

@arrowd You should probably be using spago instead of psc-package. spago more or less succeeds psc-package (see spacchetti/spago#423). Then, you could use spago bundle-app or spago bundle-module depending on what you want to do.

As for your question, I don't know because I don't use that tool anymore.

JordanMartinez avatar Sep 22 '19 20:09 JordanMartinez

@JordanMartinez Thanks for the pointer, I'll try this out.

It would be nice, BTW, if psc-package or spago would be mentioned in https://github.com/purescript/documentation/blob/master/guides/PureScript-Without-Node.md

arrowd avatar Sep 23 '19 06:09 arrowd