From 1489d81779accbc07cbf77b9b81516ae069a8438 Mon Sep 17 00:00:00 2001 From: oakes Date: Thu, 31 Jan 2019 20:22:47 -0600 Subject: [PATCH] Initial import --- .gitignore | 9 ++++ README.md | 7 +++ UNLICENSE | 24 +++++++++ boot.properties | 1 + build.boot | 63 ++++++++++++++++++++++ deps.edn | 4 ++ dev-resources/dynadoc-extend/main.cljs.edn | 1 + src/iglu/core.cljs | 3 ++ src/iglu/examples.cljs | 3 ++ 9 files changed, 115 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 UNLICENSE create mode 100644 boot.properties create mode 100644 build.boot create mode 100644 deps.edn create mode 100644 dev-resources/dynadoc-extend/main.cljs.edn create mode 100644 src/iglu/core.cljs create mode 100644 src/iglu/examples.cljs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5745ab9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +data_readers.clj +hs_err_pid*.log +pom.xml +pom.xml.asc +**/gen +**/target +*~ +.* +!.gitignore diff --git a/README.md b/README.md new file mode 100644 index 0000000..b6ed9e3 --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ +## Introduction + +A ClojureScript library for making WebGL graphics with edn data. + +## Licensing + +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. diff --git a/UNLICENSE b/UNLICENSE new file mode 100644 index 0000000..68a49da --- /dev/null +++ b/UNLICENSE @@ -0,0 +1,24 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to diff --git a/boot.properties b/boot.properties new file mode 100644 index 0000000..60bf2f3 --- /dev/null +++ b/boot.properties @@ -0,0 +1 @@ +BOOT_CLOJURE_VERSION=1.10.0 diff --git a/build.boot b/build.boot new file mode 100644 index 0000000..ab7d7ce --- /dev/null +++ b/build.boot @@ -0,0 +1,63 @@ +(defn read-deps-edn [aliases-to-include] + (let [{:keys [paths deps aliases]} (-> "deps.edn" slurp clojure.edn/read-string) + deps (->> (select-keys aliases aliases-to-include) + vals + (mapcat :extra-deps) + (into deps) + (reduce + (fn [deps [artifact info]] + (if-let [version (:mvn/version info)] + (conj deps + (transduce cat conj [artifact version] + (select-keys info [:scope :exclusions]))) + deps)) + []))] + {:dependencies deps + :source-paths (set paths) + :resource-paths (set paths)})) + +(let [{:keys [source-paths resource-paths dependencies]} (read-deps-edn [])] + (set-env! + :source-paths source-paths + :resource-paths resource-paths + :dependencies (into '[[adzerk/boot-cljs "2.1.5" :scope "test"] + [adzerk/boot-reload "0.6.0" :scope "test"] + [javax.xml.bind/jaxb-api "2.3.0" :scope "test"] ; necessary for Java 9 compatibility + [dynadoc "RELEASE" :scope "test"]] + dependencies) + :repositories (conj (get-env :repositories) + ["clojars" {:url "https://clojars.org/repo/" + :username (System/getenv "CLOJARS_USER") + :password (System/getenv "CLOJARS_PASS")}]))) + +(require + '[adzerk.boot-cljs :refer [cljs]] + '[adzerk.boot-reload :refer [reload]] + '[dynadoc.boot :refer [dynadoc]]) + +(task-options! + pom {:project 'iglu + :version "0.0.1-SNAPSHOT" + :description "A ClojureScript data -> webgl library" + :url "https://github.com/oakes/iglu" + :license {"Public Domain" "http://unlicense.org/UNLICENSE"}} + push {:repo "clojars"}) + +(deftask run-docs [] + (set-env! + :dependencies #(into (set %) (:dependencies (read-deps-edn [:cljs]))) + :resource-paths #(conj % "dev-resources")) + (comp + (watch) + (reload :asset-path "dynadoc-extend") + (cljs + :optimizations :none + :compiler-options {:asset-path "/main.out"}) + (dynadoc :port 5000))) + +(deftask local [] + (comp (pom) (jar) (install))) + +(deftask deploy [] + (comp (pom) (jar) (push))) + diff --git a/deps.edn b/deps.edn new file mode 100644 index 0000000..f775f14 --- /dev/null +++ b/deps.edn @@ -0,0 +1,4 @@ +{:paths ["src"] + :deps {org.clojure/clojure {:mvn/version "1.10.0" :scope "provided"} + defexample {:mvn/version "1.7.0"}} + :aliases {:cljs {:extra-deps {org.clojure/clojurescript {:mvn/version "1.10.439"}}}}} diff --git a/dev-resources/dynadoc-extend/main.cljs.edn b/dev-resources/dynadoc-extend/main.cljs.edn new file mode 100644 index 0000000..74fd5b6 --- /dev/null +++ b/dev-resources/dynadoc-extend/main.cljs.edn @@ -0,0 +1 @@ +{:require [iglu.core dynadoc.core]} diff --git a/src/iglu/core.cljs b/src/iglu/core.cljs new file mode 100644 index 0000000..768cb22 --- /dev/null +++ b/src/iglu/core.cljs @@ -0,0 +1,3 @@ +(ns iglu.core + (:require [iglu.examples])) + diff --git a/src/iglu/examples.cljs b/src/iglu/examples.cljs new file mode 100644 index 0000000..50274f4 --- /dev/null +++ b/src/iglu/examples.cljs @@ -0,0 +1,3 @@ +(ns iglu.examples + (:require-macros [dynadoc.example :refer [defexample]])) +