Technology moves fast! ⚑ Don't get left behind.🚢 Subscribe to our mailing list to keep up with latest and greatest in open source projects! πŸ†


Subscribe to our mailing list

trypurescript

PureScript in the browser

Subscribe to updates I use trypurescript


Statistics on trypurescript

Number of watchers on Github 47
Number of open issues 13
Average time to close an issue 4 months
Main language PureScript
Average time to merge a PR about 20 hours
Open pull requests 9+
Closed pull requests 6+
Last commit over 1 year ago
Repo Created over 5 years ago
Repo Last Updated about 1 year ago
Size 6.21 MB
Homepage http://try.puresc...
Organization / Authorpurescript
Latest Releasev0.11.7
Contributors3
Page Updated
Do you use trypurescript? Leave a review!
View open issues (13)
View trypurescript activity
View on github
Fresh, new opensource launches πŸš€πŸš€πŸš€
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating trypurescript for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)

PureScript API

Build Status

Very basic web service which wraps the PureScript compiler.

Client code

API

Compile PureScript code

POST /compile

  • Request body: PureScript code
  • Response body: Either { js: "..." } or { error: "..." }
  • Status code: 200 (success)

The response does not use error codes, to make it easier to use the API from another domain using CORS.

The output code will contain references to preloaded modules using require calls. To run these files in the browser, it is necessary to either use a require shim (such as require1k), or replace these calls and deploy a bundle of precompiled modules (the Try PureScript client uses the second approach).

Configuration

The application takes the following arguments on the command line:

  • port number
  • a list of input source files

Example

dist/build/trypurescript/trypurescript 8081 'bower_components/purescript-*/src/**/*.purs'

Development

1. Client setup

git clone git@github.com:purescript/trypurescript.git
cd trypurescript
git co gh-pages

bower install
npm run build
npm run bundle

httpserver 8080 #eg with: alias httpserver='python -m SimpleHTTPServer'
open http://localhost:8080

2. Work with local compile server

git clone git@github.com:purescript/trypurescript.git
cd trypurescript

stack build

# use one of the backends
cd staging/core
# get the sources of the deps
psc-package update

# note: globs like **/src/** do not work
stack exec trypurescript 8081 ".psc-package/psc-0.11.6/*/*/src/**/*.purs" "src/*.purs"
# should output that is is compiling the sources (first time)
# then: Setting phasers to stun... (port 8081) (ctrl-c to quit)

3. Point client to local compile server

(instead of the ones at try.purescript.org)

# edit API.purs

  , compile: compile "http://localhost:8081"
  , getBundle: getDefaultBundle "http://localhost:8081"

trypurescript open issues Ask a question     (View All Issues)
  • over 2 years Allow testing purescript-drawing code
  • over 2 years Scrolling past the end
  • about 3 years Further interaction with Gists
  • about 3 years Structured error format
  • about 3 years Add foreign module editor
trypurescript open pull requests (View All Pulls)
  • 0.9 client changes
  • Updates for 0.9 (core libraries)
  • Adding options to generate JS and view modes
  • 0.10 changes to client
  • 0.10 Updates
  • Type search
  • Match stack resolver from pursuit and purescript-0.11.7
  • feat(client): add social metas
  • Added tryHalogen backend
trypurescript list of languages used
trypurescript latest release notes
v0.11.7 v0.11.7

Update to 0.11.7 (@Thimoteus)

v0.11.6.1 v0.11.6.1

Return warnings from API

v0.11.6 v0.11.6

Updates for the v0.11.6 compiler

Other projects in PureScript