Skip to content

gcsolaroli/simpleCalculator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Calculator

Initial setup and first build

Compiling the purescript code, supposing nvm is already installed, is as simple as typing:

> nvm install --lts (12.16.1)
> npm install -g [email protected]
> npm install -g [email protected]
> npm install -g [email protected]
> npm install -g [email protected]
> npm install -g [email protected]
> yarn clean; yarn build
> yarn docs
> yarn develop-app

VSCode integration

To support editing Purescript files, there are two useful VSCode plugins:

In order to have errors highlighted directly into VSCode, you need to set one option into the "PureScript IDE" module:

  • "purescript.editorMode": true (Editor Mode: Whether to set the editor-mode flag on the IDE server)

To build the application just execute yarn build; if you want to cleanup the workarea of all temporary files, yarn clean will do it.

To run the application, just type the following two commands in two different terminal windows:

  • yarn develop-purs # this is only required if your editor is not integrated with the purs compiler
  • yarn develop-app # this command will not build the application; it'll just bundle resources to be loaded by the browser

The first command will invoke spago to continuosly compile the PureScript files, while the second will start a web server to serve the application on a local port, reported by ParcelJS logs:

>> starting...
Server running at http://localhost:1234 
✨  Built in 2.36s.

This is what the calculator should look like: screenshot

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PureScript 82.9%
  • CSS 9.8%
  • Dhall 3.1%
  • HTML 2.7%
  • JavaScript 1.5%