├── .gitattributes ├── .gitignore ├── README.md ├── UNLICENSE ├── classes └── .gitignore ├── cljs.clj ├── deps.edn ├── dev-resources ├── deps.cljs └── externs.js ├── dev.clj ├── graphics ├── file-clj.svg ├── file-cljc.svg ├── file-cljs.svg ├── file-java.svg ├── file.svg ├── logo_launcher.svg └── logo_splash.svg ├── package-lin.sh ├── package-win.bat ├── package ├── linux │ └── Nightcode.png ├── macosx │ └── Nightcode.icns └── windows │ └── Nightcode.ico ├── prod.clj ├── project.clj ├── resources ├── boot-2.7.2.jar ├── dark.css ├── dir.fxml ├── editor.fxml ├── home.fxml ├── images │ ├── file-clj.png │ ├── file-cljc.png │ ├── file-cljs.png │ ├── file-java.png │ ├── file.png │ ├── logo_launcher.png │ ├── logo_splash.png │ ├── player_walk1.png │ ├── player_walk2.png │ └── player_walk3.png ├── leiningen │ └── new │ │ ├── console.clj │ │ ├── console │ │ ├── README.md │ │ ├── core.clj │ │ ├── gitignore │ │ └── project.clj │ │ ├── edna.clj │ │ ├── edna │ │ ├── README.md │ │ ├── boot.properties │ │ ├── build.boot │ │ ├── core.clj │ │ ├── core.cljs │ │ ├── gitignore │ │ ├── index.html │ │ └── main.cljs.edn │ │ ├── graphics.clj │ │ ├── graphics │ │ ├── README.md │ │ ├── core.clj │ │ ├── gitignore │ │ └── project.clj │ │ ├── play_cljc.clj │ │ ├── play_cljc │ │ ├── core.cljc │ │ ├── gitignore │ │ ├── index.html │ │ ├── move.cljc │ │ ├── music.clj │ │ ├── project.clj │ │ ├── start.clj │ │ ├── start.cljs │ │ ├── start_dev.clj │ │ └── utils.cljc │ │ ├── web.clj │ │ └── web │ │ ├── README.md │ │ ├── boot.properties │ │ ├── build.boot │ │ ├── core.clj │ │ ├── core.cljs │ │ ├── gitignore │ │ ├── index.html │ │ └── main.cljs.edn.txt ├── main.fxml ├── project.fxml └── public │ ├── cheatsheet-full.html │ ├── cheatsheet_files │ ├── jquery.js │ ├── jquery.tipTip.js │ ├── style.css │ └── tipTip.css │ ├── fonts │ ├── FiraCode-Bold.otf │ ├── FiraCode-Light.otf │ ├── FiraCode-Medium.otf │ ├── FiraCode-Regular.otf │ └── FiraCode-Retina.otf │ ├── modal.css │ ├── paren-soup-dark.css │ ├── paren-soup-light.css │ ├── paren-soup.html │ └── paren-soup.js ├── screenshot.png └── src ├── clj └── nightcode │ ├── builders.clj │ ├── controller.clj │ ├── core.clj │ ├── editors.clj │ ├── git.clj │ ├── lein.clj │ ├── process.clj │ ├── projects.clj │ ├── shortcuts.clj │ ├── spec.clj │ ├── start.clj │ ├── state.clj │ └── utils.clj └── cljs └── nightcode └── paren_soup.cljs /.gitattributes: -------------------------------------------------------------------------------- 1 | resources/* linguist-vendored 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | hs_err_pid*.log 2 | pom.xml 3 | pom.xml.asc 4 | target/ 5 | .* 6 | !.gitignore 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![screenshot](screenshot.png) 2 | 3 | ## Introduction 4 | 5 | Nightcode is a simple IDE for Clojure and ClojureScript. See [the website](https://sekao.net/nightcode/) for more information. 6 | 7 | ## Development 8 | 9 | * Install JDK 11 or above 10 | * Install [the Clojure CLI tool](https://clojure.org/guides/getting_started#_clojure_installer_and_cli_tools) 11 | * To develop: `clj -A:dev` 12 | * To build the ClojureScript files: `clj -A:cljs` 13 | * To build the uberjar for each OS: 14 | * `clj -A:prod uberjar windows` 15 | * `clj -A:prod uberjar macos` 16 | * `clj -A:prod uberjar linux` 17 | 18 | ## Licensing 19 | 20 | All files that originate from this project are dedicated to the public domain. I would love pull requests, and will assume that they are also dedicated to the public domain. 21 | -------------------------------------------------------------------------------- /UNLICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /classes/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /cljs.clj: -------------------------------------------------------------------------------- 1 | (require 2 | '[cljs.build.api :as api] 3 | '[leiningen.core.project :as p :refer [defproject]] 4 | '[leiningen.clean :refer [clean]]) 5 | 6 | (defn read-project-clj [] 7 | (p/ensure-dynamic-classloader) 8 | (-> "project.clj" load-file var-get)) 9 | 10 | (-> (read-project-clj) 11 | p/init-project 12 | clean) 13 | 14 | (println "Building paren-soup.js") 15 | (api/build "src" {:main 'nightcode.paren-soup 16 | :optimizations :advanced 17 | :output-to "resources/public/paren-soup.js" 18 | :output-dir "target/public/paren-soup.out"}) 19 | 20 | -------------------------------------------------------------------------------- /deps.edn: -------------------------------------------------------------------------------- 1 | {:paths ["src/clj" "src/cljs" "resources" "classes"] 2 | :deps {org.clojure/clojure {:mvn/version "1.10.1"} 3 | leiningen {:mvn/version "2.9.0" :exclusions [leiningen.search]} 4 | ring {:mvn/version "1.7.1"} 5 | hawk {:mvn/version "0.2.11"} 6 | eval-soup {:mvn/version "1.5.0" :exclusions [org.clojure/core.async]} 7 | org.eclipse.jgit/org.eclipse.jgit {:mvn/version "4.6.0.201612231935-r"} 8 | org.openjfx/javafx-base {:mvn/version "13.0.1"} 9 | org.openjfx/javafx-fxml {:mvn/version "13.0.1"} 10 | org.openjfx/javafx-graphics {:mvn/version "13.0.1"} 11 | org.openjfx/javafx-web {:mvn/version "13.0.1"}} 12 | :aliases {:cljs {:extra-deps {org.clojure/clojurescript {:mvn/version "1.10.597"} 13 | paren-soup {:mvn/version "2.16.0"}} 14 | :extra-paths ["dev-resources"] 15 | :main-opts ["cljs.clj"]} 16 | :dev {:extra-deps {orchestra {:mvn/version "2018.12.06-2"} 17 | expound {:mvn/version "0.7.2"}} 18 | :main-opts ["dev.clj"]} 19 | :prod {:main-opts ["prod.clj"]} 20 | :windows {:extra-deps {org.openjfx/javafx-graphics$win {:mvn/version "13.0.1"} 21 | org.openjfx/javafx-web$win {:mvn/version "13.0.1"}}} 22 | :macos {:extra-deps {org.openjfx/javafx-graphics$mac {:mvn/version "13.0.1"} 23 | org.openjfx/javafx-web$mac {:mvn/version "13.0.1"}}} 24 | :linux {:extra-deps {org.openjfx/javafx-graphics$linux {:mvn/version "13.0.1"} 25 | org.openjfx/javafx-web$linux {:mvn/version "13.0.1"}}}}} 26 | -------------------------------------------------------------------------------- /dev-resources/deps.cljs: -------------------------------------------------------------------------------- 1 | {:externs ["externs.js"]} 2 | -------------------------------------------------------------------------------- /dev-resources/externs.js: -------------------------------------------------------------------------------- 1 | window.java = {}; 2 | window.java.onload = function(){}; 3 | window.java.onautosave = function(){}; 4 | window.java.onchange = function(){}; 5 | window.java.onenter = function(){}; 6 | window.java.oneval = function(){}; 7 | -------------------------------------------------------------------------------- /dev.clj: -------------------------------------------------------------------------------- 1 | (require 2 | '[orchestra.spec.test :as st] 3 | '[expound.alpha :as expound] 4 | '[clojure.spec.alpha :as s]) 5 | 6 | (st/instrument) 7 | (alter-var-root #'s/*explain-out* (constantly expound/printer)) 8 | 9 | (-> "classes" java.io.File. .mkdir) 10 | (compile 'nightcode.lein) 11 | (compile 'nightcode.core) 12 | (require '[nightcode.core :refer [dev-main]]) 13 | (dev-main) 14 | 15 | -------------------------------------------------------------------------------- /graphics/file-clj.svg: -------------------------------------------------------------------------------- 1 | 2 | 19 | 21 | 22 | 24 | image/svg+xml 25 | 27 | 28 | 29 | 30 | 31 | 51 | 53 | 55 | 59 | 63 | 64 | 66 | 70 | 74 | 75 | 77 | 81 | 85 | 86 | 88 | 92 | 96 | 97 | 99 | 103 | 107 | 108 | 117 | 127 | 136 | 146 | 154 | 165 | 166 | 171 | 176 | 181 | 185 | 190 | 195 | 200 | 205 | 210 | 211 | 212 | -------------------------------------------------------------------------------- /graphics/file-cljc.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /graphics/file-cljs.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /graphics/file-java.svg: -------------------------------------------------------------------------------- 1 | 2 | 19 | 21 | 22 | 24 | image/svg+xml 25 | 27 | 28 | 29 | 30 | 31 | 51 | 53 | 55 | 59 | 63 | 64 | 66 | 70 | 74 | 75 | 77 | 81 | 85 | 86 | 88 | 92 | 96 | 97 | 99 | 103 | 107 | 108 | 117 | 127 | 136 | 146 | 154 | 165 | 166 | 171 | 176 | 181 | 185 | 190 | 195 | 200 | 205 | 210 | 215 | 220 | 225 | 226 | 227 | -------------------------------------------------------------------------------- /graphics/file.svg: -------------------------------------------------------------------------------- 1 | 2 | 19 | 21 | 22 | 24 | image/svg+xml 25 | 27 | 28 | 29 | 30 | 31 | 51 | 53 | 55 | 59 | 63 | 64 | 66 | 70 | 74 | 75 | 77 | 81 | 85 | 86 | 88 | 92 | 96 | 97 | 99 | 103 | 107 | 108 | 117 | 127 | 136 | 146 | 154 | 165 | 166 | 171 | 176 | 181 | 182 | -------------------------------------------------------------------------------- /graphics/logo_launcher.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 19 | 37 | 39 | 41 | 42 | 44 | image/svg+xml 45 | 47 | 48 | 49 | 50 | 51 | 55 | 63 | 64 | 69 | N 81 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /graphics/logo_splash.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 19 | 37 | 39 | 41 | 42 | 44 | image/svg+xml 45 | 47 | 48 | 49 | 50 | 51 | 55 | 63 | 64 | 69 | N 81 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /package-lin.sh: -------------------------------------------------------------------------------- 1 | set -e 2 | 3 | jpackage --type deb --name Nightcode --app-version $1 --input target --main-jar Nightcode-$1-linux.jar --icon package/linux/Nightcode.png --copyright "Public Domain" --linux-shortcut --linux-app-category Development 4 | 5 | jpackage --type app-image --name Nightcode --app-version $1 --input target --main-jar Nightcode-$1-linux.jar --icon package/linux/Nightcode.png --copyright "Public Domain" 6 | 7 | echo "#!/bin/sh 8 | 9 | cd \"\$(dirname \"\$0\")\" 10 | ./bin/Nightcode" >> Nightcode/AppRun 11 | 12 | chmod +x Nightcode/AppRun 13 | 14 | echo "[Desktop Entry] 15 | Name=Nightcode 16 | Exec=/bin/Nightcode 17 | Icon=/lib/Nightcode 18 | Terminal=false 19 | Type=Application 20 | Categories=Development;" >> Nightcode/nightcode.desktop 21 | 22 | appimagetool Nightcode 23 | -------------------------------------------------------------------------------- /package-win.bat: -------------------------------------------------------------------------------- 1 | jpackage --type app-image --name Nightcode --app-version %1 --input target --main-jar Nightcode-%1-windows.jar --icon package/windows/Nightcode.ico --copyright "Public Domain" 2 | 3 | jpackage --type exe --name Nightcode --app-version %1 --input target --main-jar Nightcode-%1-windows.jar --icon package/windows/Nightcode.ico --copyright "Public Domain" --win-menu --win-per-user-install 4 | -------------------------------------------------------------------------------- /package/linux/Nightcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oakes/Nightcode/2e112c59cddc5fdec96059a08912c73b880f9ae8/package/linux/Nightcode.png -------------------------------------------------------------------------------- /package/macosx/Nightcode.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oakes/Nightcode/2e112c59cddc5fdec96059a08912c73b880f9ae8/package/macosx/Nightcode.icns -------------------------------------------------------------------------------- /package/windows/Nightcode.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oakes/Nightcode/2e112c59cddc5fdec96059a08912c73b880f9ae8/package/windows/Nightcode.ico -------------------------------------------------------------------------------- /prod.clj: -------------------------------------------------------------------------------- 1 | (require 2 | '[clojure.string :as str] 3 | '[leiningen.core.project :as p :refer [defproject]] 4 | '[leiningen.clean :refer [clean]] 5 | '[leiningen.install :refer [install]] 6 | '[leiningen.deploy :refer [deploy]] 7 | '[leiningen.uberjar :refer [uberjar]]) 8 | 9 | (defn read-project-clj [] 10 | (p/ensure-dynamic-classloader) 11 | (-> "project.clj" load-file var-get)) 12 | 13 | (defn read-deps-edn [aliases-to-include] 14 | (let [{:keys [paths deps aliases]} (-> "deps.edn" slurp clojure.edn/read-string) 15 | deps (->> (select-keys aliases aliases-to-include) 16 | vals 17 | (mapcat :extra-deps) 18 | (into deps) 19 | (map (fn parse-coord [coord] 20 | (let [[artifact info] coord 21 | s (str artifact)] 22 | (if-let [i (str/index-of s "$")] 23 | [(symbol (subs s 0 i)) 24 | (assoc info :classifier (subs s (inc i)))] 25 | coord)))) 26 | (reduce 27 | (fn [deps [artifact info]] 28 | (if-let [version (:mvn/version info)] 29 | (conj deps 30 | (transduce cat conj [artifact version] 31 | (select-keys info [:exclusions :classifier]))) 32 | deps)) 33 | [])) 34 | paths (->> (select-keys aliases aliases-to-include) 35 | vals 36 | (mapcat :extra-paths) 37 | (into paths))] 38 | {:dependencies deps 39 | :source-paths [] 40 | :resource-paths paths})) 41 | 42 | (defmulti task first) 43 | 44 | (defmethod task :default 45 | [_] 46 | (let [all-tasks (-> task methods (dissoc :default) keys sort) 47 | interposed (->> all-tasks (interpose ", ") (apply str))] 48 | (println "Unknown or missing task. Choose one of:" interposed) 49 | (System/exit 1))) 50 | 51 | (defmethod task "uberjar" 52 | [[_ os-name]] 53 | (when-not (#{"windows" "macos" "linux"} os-name) 54 | (throw (ex-info "Invalid OS name provided" {}))) 55 | (let [project (-> (read-project-clj) 56 | (merge (read-deps-edn [(keyword os-name)])) 57 | (assoc 58 | :aot '[nightcode.start nightcode.core nightcode.lein] 59 | :main 'nightcode.start) 60 | p/init-project)] 61 | (clean project) 62 | (uberjar project)) 63 | (System/exit 0)) 64 | 65 | (defmethod task "install" 66 | [_] 67 | (-> (read-project-clj) 68 | (merge (read-deps-edn [])) 69 | p/init-project 70 | install) 71 | (System/exit 0)) 72 | 73 | (defmethod task "deploy" 74 | [_] 75 | (-> (read-project-clj) 76 | (merge (read-deps-edn [])) 77 | p/init-project 78 | (deploy "clojars")) 79 | (System/exit 0)) 80 | 81 | ;; entry point 82 | 83 | (task *command-line-args*) 84 | 85 | -------------------------------------------------------------------------------- /project.clj: -------------------------------------------------------------------------------- 1 | (defproject nightcode "2.8.4-SNAPSHOT" 2 | :description "An IDE for Clojure" 3 | :url "https://github.com/oakes/Nightcode" 4 | :license {:name "Public Domain" 5 | :url "http://unlicense.org/UNLICENSE"} 6 | :repositories [["clojars" {:url "https://clojars.org/repo" 7 | :sign-releases false}]]) 8 | -------------------------------------------------------------------------------- /resources/boot-2.7.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oakes/Nightcode/2e112c59cddc5fdec96059a08912c73b880f9ae8/resources/boot-2.7.2.jar -------------------------------------------------------------------------------- /resources/dark.css: -------------------------------------------------------------------------------- 1 | .root { 2 | -fx-base: rgb(50, 50, 50); 3 | -fx-background: rgb(50, 50, 50); 4 | -fx-control-inner-background: rgb(50, 50, 50); 5 | } 6 | 7 | .tooltip { 8 | -fx-effect: null; 9 | } 10 | -------------------------------------------------------------------------------- /resources/dir.fxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /resources/leiningen/new/play_cljc/move.cljc: -------------------------------------------------------------------------------- 1 | (ns {{name}}.move 2 | (:require [{{name}}.utils :as utils] 3 | #?(:clj [play-cljc.macros-java :refer [gl math]] 4 | :cljs [play-cljc.macros-js :refer-macros [gl math]]))) 5 | 6 | (def ^:const damping 0.1) 7 | (def ^:const max-velocity 1000) 8 | (def ^:const max-jump-velocity (* max-velocity 8)) 9 | (def ^:const deceleration 0.7) 10 | (def ^:const gravity 500) 11 | (def ^:const animation-secs 0.2) 12 | 13 | (defn decelerate 14 | [velocity] 15 | (let [velocity (* velocity deceleration)] 16 | (if (< (math abs velocity) damping) 17 | 0 18 | velocity))) 19 | 20 | (defn get-x-velocity 21 | [{:keys [pressed-keys x-velocity]}] 22 | (cond 23 | (contains? pressed-keys :left) 24 | (* -1 max-velocity) 25 | (contains? pressed-keys :right) 26 | max-velocity 27 | :else 28 | x-velocity)) 29 | 30 | (defn get-y-velocity 31 | [{:keys [pressed-keys y-velocity can-jump?]}] 32 | (cond 33 | (and can-jump? (contains? pressed-keys :up)) 34 | (* -1 max-jump-velocity) 35 | :else 36 | y-velocity)) 37 | 38 | (defn get-direction 39 | [{:keys [x-velocity direction]}] 40 | (cond 41 | (> x-velocity 0) :right 42 | (< x-velocity 0) :left 43 | :else 44 | direction)) 45 | 46 | (defn move 47 | [{:keys [delta-time] :as game} {:keys [player-x player-y can-jump?] :as state}] 48 | (let [x-velocity (get-x-velocity state) 49 | y-velocity (+ (get-y-velocity state) gravity) 50 | x-change (* x-velocity delta-time) 51 | y-change (* y-velocity delta-time)] 52 | (if (or (not= 0 x-change) (not= 0 y-change)) 53 | (assoc state 54 | :x-velocity (decelerate x-velocity) 55 | :y-velocity (decelerate y-velocity) 56 | :x-change x-change 57 | :y-change y-change 58 | :player-x (+ player-x x-change) 59 | :player-y (+ player-y y-change) 60 | :can-jump? (if (neg? y-velocity) false can-jump?)) 61 | state))) 62 | 63 | (defn prevent-move 64 | [game {:keys [player-x player-y 65 | player-width player-height 66 | x-change y-change] 67 | :as state}] 68 | (let [old-x (- player-x x-change) 69 | old-y (- player-y y-change) 70 | up? (neg? y-change) 71 | game-width (utils/get-width game) 72 | game-height (utils/get-height game)] 73 | (merge state 74 | (when (or (< player-x 0) 75 | (> player-x (- game-width player-width))) 76 | {:x-velocity 0 :x-change 0 :player-x old-x}) 77 | (when (> player-y (- game-height player-height)) 78 | {:y-velocity 0 :y-change 0 :player-y old-y :can-jump? (not up?)})))) 79 | 80 | (defn animate 81 | [{:keys [total-time]} 82 | {:keys [x-velocity y-velocity direction 83 | player-images player-image-key] 84 | :as state}] 85 | (let [direction (get-direction state)] 86 | (-> state 87 | (assoc :player-image-key 88 | (if (and (not= x-velocity 0) 89 | (= y-velocity 0)) 90 | (let [image-keys (->> player-images keys sort vec) 91 | cycle-time (mod total-time (* animation-secs (count image-keys)))] 92 | (nth image-keys (int (/ cycle-time animation-secs)))) 93 | player-image-key)) 94 | (assoc :direction direction)))) 95 | 96 | -------------------------------------------------------------------------------- /resources/leiningen/new/play_cljc/music.clj: -------------------------------------------------------------------------------- 1 | (ns {{name}}.music 2 | (:require [edna.core :as edna] 3 | [clojure.java.io :as io])) 4 | 5 | (def music 6 | [:electric-guitar-clean {:tempo 130} 7 | 1/8 :c :c 1/2 :a 1/8 :f :g :f 8 | 1/2 :d 1/8 :d :d 1/2 :a# 1/8 :g :a :g 9 | 1/2 :e 1/8 :e :e 1/2 :+c 1/8 :a :a# :+c 10 | 1/2 :+d 1/8 :f :g 1/4 :a 3/8 :f 1/8 :e :f :g :d]) 11 | 12 | (defn build-for-clj [] 13 | (-> (edna/export! music {:type :wav}) 14 | .toByteArray 15 | io/input-stream)) 16 | 17 | (def edna->data-uri 18 | (memoize edna/edna->data-uri)) 19 | 20 | (defmacro build-for-cljs [] 21 | (edna->data-uri music)) 22 | 23 | -------------------------------------------------------------------------------- /resources/leiningen/new/play_cljc/project.clj: -------------------------------------------------------------------------------- 1 | (defproject {{name}} "0.1.0-SNAPSHOT" 2 | :repositories [["clojars" {:url "https://clojars.org/repo" 3 | :sign-releases false}]] 4 | :clean-targets ^{:protect false} ["target"] 5 | :dependencies [[org.clojure/clojure "1.10.1"] 6 | [edna "1.6.0"]] 7 | :jvm-opts ~(if (= "Mac OS X" (System/getProperty "os.name")) 8 | ["-XstartOnFirstThread"] 9 | []) 10 | :profiles {:dev {:main {{name}}.start-dev 11 | :dependencies [[paravim "RELEASE"] 12 | [orchestra "2018.12.06-2"] 13 | [expound "0.7.2"]]} 14 | :uberjar {:main {{name}}.start 15 | :aot [{{name}}.start] 16 | :dependencies [[play-cljc "0.8.5"] 17 | [org.lwjgl/lwjgl "3.2.3"] 18 | [org.lwjgl/lwjgl-glfw "3.2.3"] 19 | [org.lwjgl/lwjgl-opengl "3.2.3"] 20 | [org.lwjgl/lwjgl-stb "3.2.3"] 21 | [org.lwjgl/lwjgl "3.2.3" :classifier "natives-linux"] 22 | [org.lwjgl/lwjgl-glfw "3.2.3" :classifier "natives-linux"] 23 | [org.lwjgl/lwjgl-opengl "3.2.3" :classifier "natives-linux"] 24 | [org.lwjgl/lwjgl-stb "3.2.3" :classifier "natives-linux"] 25 | [org.lwjgl/lwjgl "3.2.3" :classifier "natives-macos"] 26 | [org.lwjgl/lwjgl-glfw "3.2.3" :classifier "natives-macos"] 27 | [org.lwjgl/lwjgl-opengl "3.2.3" :classifier "natives-macos"] 28 | [org.lwjgl/lwjgl-stb "3.2.3" :classifier "natives-macos"] 29 | [org.lwjgl/lwjgl "3.2.3" :classifier "natives-windows"] 30 | [org.lwjgl/lwjgl-glfw "3.2.3" :classifier "natives-windows"] 31 | [org.lwjgl/lwjgl-opengl "3.2.3" :classifier "natives-windows"] 32 | [org.lwjgl/lwjgl-stb "3.2.3" :classifier "natives-windows"]]}}) 33 | -------------------------------------------------------------------------------- /resources/leiningen/new/play_cljc/start.clj: -------------------------------------------------------------------------------- 1 | (ns {{name}}.start 2 | (:require [{{name}}.{{core-name}} :as c] 3 | [{{name}}.music :as m] 4 | [play-cljc.gl.core :as pc]) 5 | (:import [org.lwjgl.glfw GLFW Callbacks 6 | GLFWCursorPosCallbackI GLFWKeyCallbackI GLFWMouseButtonCallbackI 7 | GLFWCharCallbackI GLFWFramebufferSizeCallbackI] 8 | [org.lwjgl.opengl GL GL41] 9 | [org.lwjgl.system MemoryUtil] 10 | [javax.sound.sampled AudioSystem Clip]) 11 | (:gen-class)) 12 | 13 | (defn play-music! [] 14 | (doto (AudioSystem/getClip) 15 | (.open (AudioSystem/getAudioInputStream (m/build-for-clj))) 16 | (.loop Clip/LOOP_CONTINUOUSLY) 17 | (.start))) 18 | 19 | (defn mousecode->keyword [mousecode] 20 | (condp = mousecode 21 | GLFW/GLFW_MOUSE_BUTTON_LEFT :left 22 | GLFW/GLFW_MOUSE_BUTTON_RIGHT :right 23 | nil)) 24 | 25 | (defn on-mouse-move! [window xpos ypos] 26 | (let [*fb-width (MemoryUtil/memAllocInt 1) 27 | *fb-height (MemoryUtil/memAllocInt 1) 28 | *window-width (MemoryUtil/memAllocInt 1) 29 | *window-height (MemoryUtil/memAllocInt 1) 30 | _ (GLFW/glfwGetFramebufferSize window *fb-width *fb-height) 31 | _ (GLFW/glfwGetWindowSize window *window-width *window-height) 32 | fb-width (.get *fb-width) 33 | fb-height (.get *fb-height) 34 | window-width (.get *window-width) 35 | window-height (.get *window-height) 36 | width-ratio (/ fb-width window-width) 37 | height-ratio (/ fb-height window-height) 38 | x (* xpos width-ratio) 39 | y (* ypos height-ratio)] 40 | (MemoryUtil/memFree *fb-width) 41 | (MemoryUtil/memFree *fb-height) 42 | (MemoryUtil/memFree *window-width) 43 | (MemoryUtil/memFree *window-height) 44 | (swap! c/*state assoc :mouse-x x :mouse-y y))) 45 | 46 | (defn on-mouse-click! [window button action mods] 47 | (swap! c/*state assoc :mouse-button (when (= action GLFW/GLFW_PRESS) 48 | (mousecode->keyword button)))) 49 | 50 | (defn keycode->keyword [keycode] 51 | (condp = keycode 52 | GLFW/GLFW_KEY_LEFT :left 53 | GLFW/GLFW_KEY_RIGHT :right 54 | GLFW/GLFW_KEY_UP :up 55 | GLFW/GLFW_KEY_DOWN :down 56 | nil)) 57 | 58 | (defn on-key! [window keycode scancode action mods] 59 | (when-let [k (keycode->keyword keycode)] 60 | (condp = action 61 | GLFW/GLFW_PRESS (swap! c/*state update :pressed-keys conj k) 62 | GLFW/GLFW_RELEASE (swap! c/*state update :pressed-keys disj k) 63 | nil))) 64 | 65 | (defn on-char! [window codepoint]) 66 | 67 | (defn on-resize! [window width height]) 68 | 69 | (defprotocol Events 70 | (on-mouse-move [this xpos ypos]) 71 | (on-mouse-click [this button action mods]) 72 | (on-key [this keycode scancode action mods]) 73 | (on-char [this codepoint]) 74 | (on-resize [this width height]) 75 | (on-tick [this game])) 76 | 77 | (defrecord Window [handle]) 78 | 79 | (extend-type Window 80 | Events 81 | (on-mouse-move [{:keys [handle]} xpos ypos] 82 | (on-mouse-move! handle xpos ypos)) 83 | (on-mouse-click [{:keys [handle]} button action mods] 84 | (on-mouse-click! handle button action mods)) 85 | (on-key [{:keys [handle]} keycode scancode action mods] 86 | (on-key! handle keycode scancode action mods)) 87 | (on-char [{:keys [handle]} codepoint] 88 | (on-char! handle codepoint)) 89 | (on-resize [{:keys [handle]} width height] 90 | (on-resize! handle width height)) 91 | (on-tick [this game] 92 | (c/tick game))) 93 | 94 | (defn listen-for-events [{:keys [handle] :as window}] 95 | (doto handle 96 | (GLFW/glfwSetCursorPosCallback 97 | (reify GLFWCursorPosCallbackI 98 | (invoke [this _ xpos ypos] 99 | (on-mouse-move window xpos ypos)))) 100 | (GLFW/glfwSetMouseButtonCallback 101 | (reify GLFWMouseButtonCallbackI 102 | (invoke [this _ button action mods] 103 | (on-mouse-click window button action mods)))) 104 | (GLFW/glfwSetKeyCallback 105 | (reify GLFWKeyCallbackI 106 | (invoke [this _ keycode scancode action mods] 107 | (on-key window keycode scancode action mods)))) 108 | (GLFW/glfwSetCharCallback 109 | (reify GLFWCharCallbackI 110 | (invoke [this _ codepoint] 111 | (on-char window codepoint)))) 112 | (GLFW/glfwSetFramebufferSizeCallback 113 | (reify GLFWFramebufferSizeCallbackI 114 | (invoke [this _ width height] 115 | (on-resize window width height)))))) 116 | 117 | (defn ->window [] 118 | (when-not (GLFW/glfwInit) 119 | (throw (Exception. "Unable to initialize GLFW"))) 120 | (GLFW/glfwWindowHint GLFW/GLFW_VISIBLE GLFW/GLFW_FALSE) 121 | (GLFW/glfwWindowHint GLFW/GLFW_RESIZABLE GLFW/GLFW_TRUE) 122 | (GLFW/glfwWindowHint GLFW/GLFW_CONTEXT_VERSION_MAJOR 4) 123 | (GLFW/glfwWindowHint GLFW/GLFW_CONTEXT_VERSION_MINOR 1) 124 | (GLFW/glfwWindowHint GLFW/GLFW_OPENGL_FORWARD_COMPAT GL41/GL_TRUE) 125 | (GLFW/glfwWindowHint GLFW/GLFW_OPENGL_PROFILE GLFW/GLFW_OPENGL_CORE_PROFILE) 126 | (if-let [window (GLFW/glfwCreateWindow 1024 768 "Hello, world!" 0 0)] 127 | (do 128 | (GLFW/glfwMakeContextCurrent window) 129 | (GLFW/glfwSwapInterval 1) 130 | (GL/createCapabilities) 131 | (->Window window)) 132 | (throw (Exception. "Failed to create window")))) 133 | 134 | (defn start [game window] 135 | (let [handle (:handle window) 136 | game (assoc game :delta-time 0 :total-time 0)] 137 | (GLFW/glfwShowWindow handle) 138 | (listen-for-events window) 139 | (c/init game) 140 | ; uncomment this to hear music when the game begins! 141 | ;(play-music!) 142 | (loop [game game] 143 | (when-not (GLFW/glfwWindowShouldClose handle) 144 | (let [ts (GLFW/glfwGetTime) 145 | game (assoc game 146 | :delta-time (- ts (:total-time game)) 147 | :total-time ts) 148 | game (on-tick window game)] 149 | (GLFW/glfwSwapBuffers handle) 150 | (GLFW/glfwPollEvents) 151 | (recur game)))) 152 | (Callbacks/glfwFreeCallbacks handle) 153 | (GLFW/glfwDestroyWindow handle) 154 | (GLFW/glfwTerminate))) 155 | 156 | (defn -main [& args] 157 | (let [window (->window)] 158 | (start (pc/->game (:handle window)) window))) 159 | 160 | -------------------------------------------------------------------------------- /resources/leiningen/new/play_cljc/start.cljs: -------------------------------------------------------------------------------- 1 | (ns {{name}}.start 2 | (:require [{{name}}.{{core-name}} :as c] 3 | [play-cljc.gl.core :as pc] 4 | [goog.events :as events]) 5 | (:require-macros [{{name}}.music :refer [build-for-cljs]])) 6 | 7 | (defn game-loop [game] 8 | (let [game (c/tick game)] 9 | (js/requestAnimationFrame 10 | (fn [ts] 11 | (let [ts (* ts 0.001)] 12 | (game-loop (assoc game 13 | :delta-time (- ts (:total-time game)) 14 | :total-time ts))))))) 15 | 16 | (defn listen-for-mouse [canvas] 17 | (events/listen js/window "mousemove" 18 | (fn [event] 19 | (swap! c/*state 20 | (fn [state] 21 | (let [bounds (.getBoundingClientRect canvas) 22 | x (- (.-clientX event) (.-left bounds)) 23 | y (- (.-clientY event) (.-top bounds))] 24 | (assoc state :mouse-x x :mouse-y y))))))) 25 | 26 | (defn keycode->keyword [keycode] 27 | (condp = keycode 28 | 37 :left 29 | 39 :right 30 | 38 :up 31 | nil)) 32 | 33 | (defn listen-for-keys [] 34 | (events/listen js/window "keydown" 35 | (fn [event] 36 | (when-let [k (keycode->keyword (.-keyCode event))] 37 | (swap! c/*state update :pressed-keys conj k)))) 38 | (events/listen js/window "keyup" 39 | (fn [event] 40 | (when-let [k (keycode->keyword (.-keyCode event))] 41 | (swap! c/*state update :pressed-keys disj k))))) 42 | 43 | (defn resize [context] 44 | (let [display-width context.canvas.clientWidth 45 | display-height context.canvas.clientHeight] 46 | (set! context.canvas.width display-width) 47 | (set! context.canvas.height display-height))) 48 | 49 | (defn listen-for-resize [context] 50 | (events/listen js/window "resize" 51 | (fn [event] 52 | (resize context)))) 53 | 54 | ;; start the game 55 | 56 | (defonce context 57 | (let [canvas (js/document.querySelector "canvas") 58 | context (.getContext canvas "webgl2") 59 | initial-game (assoc (pc/->game context) 60 | :delta-time 0 61 | :total-time 0)] 62 | (listen-for-mouse canvas) 63 | (listen-for-keys) 64 | (resize context) 65 | (listen-for-resize context) 66 | (c/init initial-game) 67 | (game-loop initial-game) 68 | context)) 69 | 70 | ;; build music, put it in the audio tag, and make the button toggle it on and off 71 | 72 | (defonce play-music? (atom false)) 73 | 74 | (defonce audio (js/document.querySelector "#audio")) 75 | (set! (.-src audio) (build-for-cljs)) 76 | (when @play-music? (.play audio)) 77 | 78 | (defonce button (js/document.querySelector "#audio-button")) 79 | (set! (.-onclick button) 80 | (fn [e] 81 | (if (swap! play-music? not) 82 | (.play audio) 83 | (.pause audio)))) 84 | 85 | -------------------------------------------------------------------------------- /resources/leiningen/new/play_cljc/start_dev.clj: -------------------------------------------------------------------------------- 1 | (ns {{name}}.start-dev 2 | (:require [{{name}}.start :as start] 3 | [{{name}}.{{core-name}} :as c] 4 | [orchestra.spec.test :as st] 5 | [expound.alpha :as expound] 6 | [clojure.spec.alpha :as s] 7 | [play-cljc.gl.core :as pc] 8 | [paravim.start] 9 | [paravim.core]) 10 | (:import [org.lwjgl.glfw GLFW] 11 | [{{project_name}}.start Window])) 12 | 13 | (defn start-paravim [game] 14 | (let [game (paravim.start/init game) 15 | *focus-on-game? (atom true) 16 | *last-tick (atom 0)] 17 | (extend-type Window 18 | start/Events 19 | (on-mouse-move [{:keys [handle]} xpos ypos] 20 | (if @*focus-on-game? 21 | (try 22 | (start/on-mouse-move! handle xpos ypos) 23 | (catch Exception e (.printStackTrace e))) 24 | (paravim.start/on-mouse-move! game handle xpos ypos))) 25 | (on-mouse-click [{:keys [handle]} button action mods] 26 | (if @*focus-on-game? 27 | (try 28 | (start/on-mouse-click! handle button action mods) 29 | (catch Exception e (.printStackTrace e))) 30 | (paravim.start/on-mouse-click! game handle button action mods))) 31 | (on-key [{:keys [handle]} keycode scancode action mods] 32 | (if (and (= action GLFW/GLFW_PRESS) 33 | (= keycode GLFW/GLFW_KEY_ESCAPE) 34 | (= (paravim.core/get-mode) 'NORMAL)) 35 | (swap! *focus-on-game? not) 36 | (if @*focus-on-game? 37 | (try 38 | (start/on-key! handle keycode scancode action mods) 39 | (catch Exception e (.printStackTrace e))) 40 | (paravim.start/on-key! game handle keycode scancode action mods)))) 41 | (on-char [{:keys [handle]} codepoint] 42 | (if @*focus-on-game? 43 | (try 44 | (start/on-char! handle codepoint) 45 | (catch Exception e (.printStackTrace e))) 46 | (paravim.start/on-char! game handle codepoint))) 47 | (on-resize [{:keys [handle]} width height] 48 | (try 49 | (start/on-resize! handle width height) 50 | (catch Exception e (.printStackTrace e))) 51 | (paravim.start/on-resize! game handle width height)) 52 | (on-tick [this game] 53 | (cond-> (try 54 | (assoc (c/tick game) :paravim.core/clear? false) 55 | (catch Exception e 56 | (let [current-ms (System/currentTimeMillis)] 57 | (when (> (- current-ms @*last-tick) 1000) 58 | (reset! *last-tick current-ms) 59 | (.printStackTrace e))) 60 | (reset! *focus-on-game? false) 61 | (assoc game :paravim.core/clear? true))) 62 | (not @*focus-on-game?) 63 | paravim.core/tick))))) 64 | 65 | (defn -main [] 66 | (st/instrument) 67 | (set! s/*explain-out* expound/printer) 68 | (let [window (start/->window) 69 | game (pc/->game (:handle window))] 70 | (try 71 | (start-paravim game) 72 | (catch Throwable e (.printStackTrace e))) 73 | (start/start game window))) 74 | 75 | -------------------------------------------------------------------------------- /resources/leiningen/new/play_cljc/utils.cljc: -------------------------------------------------------------------------------- 1 | (ns {{name}}.utils 2 | #?(:clj (:require [clojure.java.io :as io])) 3 | #?(:clj (:import [java.nio ByteBuffer] 4 | [org.lwjgl.glfw GLFW] 5 | [org.lwjgl.system MemoryUtil] 6 | [org.lwjgl.stb STBImage]))) 7 | 8 | (defn get-image [fname callback] 9 | #?(:clj (let [is (io/input-stream (io/resource (str "public/" fname))) 10 | ^bytes barray (with-open [out (java.io.ByteArrayOutputStream.)] 11 | (io/copy is out) 12 | (.toByteArray out)) 13 | *width (MemoryUtil/memAllocInt 1) 14 | *height (MemoryUtil/memAllocInt 1) 15 | *components (MemoryUtil/memAllocInt 1) 16 | direct-buffer (doto ^ByteBuffer (ByteBuffer/allocateDirect (alength barray)) 17 | (.put barray) 18 | (.flip)) 19 | decoded-image (STBImage/stbi_load_from_memory 20 | direct-buffer *width *height *components 21 | STBImage/STBI_rgb_alpha) 22 | image {:data decoded-image 23 | :width (.get *width) 24 | :height (.get *height)}] 25 | (MemoryUtil/memFree *width) 26 | (MemoryUtil/memFree *height) 27 | (MemoryUtil/memFree *components) 28 | (callback image)) 29 | :cljs (let [image (js/Image.)] 30 | (doto image 31 | (-> .-src (set! fname)) 32 | (-> .-onload (set! #(callback {:data image 33 | :width image.width 34 | :height image.height}))))))) 35 | 36 | (defn get-width [game] 37 | #?(:clj (let [*width (MemoryUtil/memAllocInt 1) 38 | _ (GLFW/glfwGetFramebufferSize ^long (:context game) *width nil) 39 | n (.get *width)] 40 | (MemoryUtil/memFree *width) 41 | n) 42 | :cljs (-> game :context .-canvas .-clientWidth))) 43 | 44 | (defn get-height [game] 45 | #?(:clj (let [*height (MemoryUtil/memAllocInt 1) 46 | _ (GLFW/glfwGetFramebufferSize ^long (:context game) nil *height) 47 | n (.get *height)] 48 | (MemoryUtil/memFree *height) 49 | n) 50 | :cljs (-> game :context .-canvas .-clientHeight))) 51 | 52 | -------------------------------------------------------------------------------- /resources/leiningen/new/web.clj: -------------------------------------------------------------------------------- 1 | (ns leiningen.new.web 2 | (:require [leiningen.new.templates :as t])) 3 | 4 | (defn web 5 | [name package-name] 6 | (let [render (t/renderer "web") 7 | package-name (t/sanitize (t/multi-segment (or package-name name))) 8 | main-ns (t/sanitize-ns package-name) 9 | data {:app-name name 10 | :name (t/project-name name) 11 | :namespace main-ns 12 | :path (t/name-to-path main-ns)}] 13 | (t/->files data 14 | ["boot.properties" (render "boot.properties" data)] 15 | ["build.boot" (render "build.boot" data)] 16 | ["README.md" (render "README.md" data)] 17 | [".gitignore" (render "gitignore" data)] 18 | ["src/clj/{{path}}.clj" (render "core.clj" data)] 19 | ["src/cljs/{{path}}.cljs" (render "core.cljs" data)] 20 | ["resources/public/index.html" (render "index.html" data)] 21 | ["resources/public/main.cljs.edn" (render "main.cljs.edn.txt" data)]))) 22 | 23 | -------------------------------------------------------------------------------- /resources/leiningen/new/web/README.md: -------------------------------------------------------------------------------- 1 | # {{name}} 2 | 3 | A ClojureScript app to ... well, that part is up to you. 4 | 5 | ## Contents 6 | 7 | * `resources` The assets 8 | * `src/cljs` The client-side code 9 | * `src/clj` The server-side code 10 | -------------------------------------------------------------------------------- /resources/leiningen/new/web/boot.properties: -------------------------------------------------------------------------------- 1 | BOOT_CLOJURE_VERSION=1.10.1 2 | -------------------------------------------------------------------------------- /resources/leiningen/new/web/build.boot: -------------------------------------------------------------------------------- 1 | (set-env! 2 | :source-paths #{"src/clj" "src/cljs"} 3 | :resource-paths #{"resources"} 4 | :dependencies '[[adzerk/boot-cljs "2.1.5" :scope "test"] 5 | [adzerk/boot-reload "0.6.0" :scope "test"] 6 | [javax.xml.bind/jaxb-api "2.3.0" :scope "test"] ; necessary for Java 9 compatibility 7 | ; project deps 8 | [org.clojure/clojure "1.10.1"] 9 | [org.clojure/clojurescript "1.10.439" :scope "test"] 10 | [reagent "0.8.1" :scope "test"] 11 | [ring "1.7.1"]]) 12 | 13 | (task-options! 14 | pom {:project '{{app-name}} 15 | :version "1.0.0-SNAPSHOT" 16 | :description "FIXME: write description"} 17 | aot {:namespace #{'{{namespace}}}} 18 | jar {:main '{{namespace}}}) 19 | 20 | (require 21 | '[adzerk.boot-cljs :refer [cljs]] 22 | '[adzerk.boot-reload :refer [reload]] 23 | '{{namespace}}) 24 | 25 | (deftask run [] 26 | (comp 27 | (with-pass-thru _ 28 | ({{namespace}}/dev-main)) 29 | (watch) 30 | (reload :asset-path "public") 31 | (cljs 32 | :source-map true 33 | :optimizations :none 34 | :compiler-options {:asset-path "main.out"}) 35 | (target))) 36 | 37 | (deftask build [] 38 | (comp 39 | (cljs :optimizations :advanced) 40 | (aot) 41 | (pom) 42 | (uber) 43 | (jar) 44 | (sift :include #{#"\.jar$"}) 45 | (target))) 46 | 47 | -------------------------------------------------------------------------------- /resources/leiningen/new/web/core.clj: -------------------------------------------------------------------------------- 1 | (ns {{namespace}} 2 | (:require [ring.adapter.jetty :refer [run-jetty]] 3 | [ring.middleware.file :refer [wrap-file]] 4 | [ring.middleware.resource :refer [wrap-resource]] 5 | [ring.middleware.content-type :refer [wrap-content-type]] 6 | [ring.util.response :refer [not-found]] 7 | [clojure.java.io :as io]) 8 | (:gen-class)) 9 | 10 | (defn start-web-server! [handler] 11 | (run-jetty handler {:port 3000 :join? false})) 12 | 13 | (defn web-handler [request] 14 | (case (:uri request) 15 | "/" {:status 200 16 | :headers {"Content-Type" "text/html"} 17 | :body (-> "public/index.html" io/resource slurp)} 18 | (not-found "Page not found"))) 19 | 20 | (defn dev-main [] 21 | (.mkdirs (io/file "target" "public")) 22 | (start-web-server! (-> web-handler 23 | (wrap-content-type) 24 | (wrap-file "target/public")))) 25 | 26 | (defn -main [& args] 27 | (start-web-server! (-> web-handler 28 | (wrap-content-type) 29 | (wrap-resource "public")))) 30 | 31 | -------------------------------------------------------------------------------- /resources/leiningen/new/web/core.cljs: -------------------------------------------------------------------------------- 1 | (ns {{namespace}} 2 | (:require [reagent.core :as r])) 3 | 4 | (defn content [state] 5 | [:div (:text @state)]) 6 | 7 | (defn init [] 8 | (let [state (r/atom {:text "Hello, world!"})] 9 | (r/render-component [content state] 10 | (.querySelector js/document "#content")))) 11 | 12 | (init) 13 | 14 | -------------------------------------------------------------------------------- /resources/leiningen/new/web/gitignore: -------------------------------------------------------------------------------- 1 | hs_err_pid*.log 2 | pom.xml 3 | pom.xml.asc 4 | **/gen 5 | **/target 6 | .* 7 | !.gitignore 8 | cljs.js 9 | -------------------------------------------------------------------------------- /resources/leiningen/new/web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /resources/leiningen/new/web/main.cljs.edn.txt: -------------------------------------------------------------------------------- 1 | {:require [{{namespace}}] 2 | :init-fns [] 3 | :compiler-options {}} 4 | -------------------------------------------------------------------------------- /resources/main.fxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 |