An attempt to build 2048 game in ClojureScript.
We’re going to need these things to start coding:
- ClojureScript
- Tailwind
- CIDER for development
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/
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
Production build with all unused styles removed:
NODE_ENV=production npm run tw