Skip to content

MeetLambda/2048

Repository files navigation

2048

Initial setup and first build

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

> nvm install --lts (14.15.0)
> 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 game should look like:

screenshot

You can play the game here [Note: it does require a keyboard to play at the moment]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published