velppa / 2048-cljs

Sunday project to implement 2048 game using ClojureScript and Reagent

Home Page:https://velppa.github.io/2048-cljs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

2048 game in ClojureScript

An attempt to build 2048 game in ClojureScript.

Bootstrapping

We’re going to need these things to start coding:

  • ClojureScript
  • Tailwind
  • CIDER for development

First attempt that didn’t work

Use create-reagent-app template like this:

clj -Sdeps '{:deps {seancorfield/clj-new {:mvn/version "1.1.264"}}}' \
  -X clj-new/create \
  :template '"https://github.com/pavel-popov/create-reagent-app@v0.0.1"' \
  :name pvlpp/game2048

Note, make sure you don’t have URL overwrite in your git configuration (~/.gitconfig, like I did, so needed to comment out this block:

[url "ssh://git@github.com/"]
   insteadOf = https://github.com/

Second attempt using repository template

I created a new repo from a template shadow-cljs-template and adjusted packages to latest versions.

To start an app for the first time so it would download all packages and build it run:

npm install

Building CSS with Tailwind

Production build with all unused styles removed:

NODE_ENV=production npm run tw

About

Sunday project to implement 2048 game using ClojureScript and Reagent

https://velppa.github.io/2048-cljs/


Languages

Language:Clojure 82.7%Language:Makefile 10.3%Language:HTML 3.3%Language:JavaScript 3.1%Language:CSS 0.6%