Warning
In late 2024 this document is obsolete. See
In 2022 Pursuit and the PureScript ecosystem are in the interstice between Bower and Registry. The PureScript package system was originally built on Bower, but Bower has been retired. The PureScript core team is working on a replacement package system called Registry, but it is not yet ready. In this post-Bower, pre-Registry era, we still need to publish packages to Pursuit.
These instructions provide a reasonable basic method for publishing to Pursuit in 2022. Most of this advice is only applicable in the year 2022 and will be obsolete after the whole Bower and Registry situation is sorted out.
For a development shell which can run all of these commands, we recommend the deluxe nix develop shell from easy-purescript-nix. Install the Nix package manager. To enter the shell, run this command:
nix develop github:justinwoo/easy-purescript-nix#deluxe
Then, in the package repo directory, issue the following commands.
-
git clean -xdffDelete
.pulp-cache,.spago,bower_components,output,node_modules, et cetera, for a totally clean build. -
spago bump-version --no-dry-run majorIf any package dependencies might have changed then we need to generate a new
bower.json. If we are sure that no package dependencies changed then we can skip this step.We don't really want to
spago bump-versionyet, what we want is forspagoto generate a newbower.jsonfor us, and this is the best way to get that. Commit the newbower.json. If it turns out that we didn't need a newbower.jsonthen this command may actually succeed, in which case it will create a new git tag, which we should delete. -
bower installpulpwill need the bower dependencies installed. -
pulp buildpulp docsIf these two commands succeed, then we know that the
pulp publishcommand later will succeed. -
spago testOne last time to be sure.
-
spago bump-version --no-dry-run majorFor real this time.
-
git push origin mainPush the main branch to Github. Make sure it passes CI.
-
git pushthe new tag. -
Publish to the Registry
https://github.com/purescript/registry#publish-a-package
The pacchettibotti will publish our package to Pursuit.