Feb 2014, not used, not maintained
Does RequireJS seem to complicated? You don't like that Browserify requires compilation while developing?
This is a library to implement simple modules.
- Function params used to define dependencies
| # vi: set ft=ruby : | |
| VAGRANTFILE_API_VERSION = "2" | |
| $script = <<SCRIPT | |
| apt-get install -y git maven openjdk-7-jdk | |
| ( | |
| cd /usr/local/bin | |
| wget https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein -O lein | |
| chmod +x lein | |
| ) |
| app.filter('bytes', function() { | |
| return function(bytes, precision) { | |
| if (isNaN(parseFloat(bytes)) || !isFinite(bytes)) return '-'; | |
| if (typeof precision === 'undefined') precision = 1; | |
| var units = ['bytes', 'kB', 'MB', 'GB', 'TB', 'PB']; | |
| var number = Math.floor(Math.log(bytes) / Math.log(1024)); | |
| return (bytes / Math.pow(1024, Math.floor(number))).toFixed(precision) + ' ' + units[number]; | |
| }; | |
| }); |
Pros:
| (set-env! | |
| :resource-paths #{"resources"} | |
| :dependencies '[[adzerk/bootlaces "0.1.8" :scope "test"]]) | |
| (require '[adzerk.bootlaces :refer :all]) | |
| (def +version+ "2.6.0-0") | |
| (bootlaces! +version+) | |
| (task-options! |
| [clj-pdf "1.11.21" :exclusions [org.apache.xmlgraphics/batik-gvt]] | |
| [org.apache.xmlgraphics/batik-gvt "1.7" :exclusions [org.apache.xmlgraphics/batik-bridge]] | |
| [org.apache.xmlgraphics/batik-bridge "1.7" :exclusions [org.apache.xmlgraphics/batik-gvt org.apache.xmlgraphics/batik-script org.apache.xmlgraphics/batik-anim]] | |
| [org.apache.xmlgraphics/batik-script "1.7" :exclusions [org.apache.xmlgraphics/batik-bridge]] | |
| [org.apache.xmlgraphics/batik-anim "1.7" :exclusions [org.apache.xmlgraphics/batik-svg-dom]] | |
| [org.apache.xmlgraphics/batik-svg-dom "1.7" :exclusions [org.apache.xmlgraphics/batik-svg-dom]] |
| (ns user | |
| (:require [clojure.tools.namespace.repl :as ns-tools] | |
| [clojure.string :as string] | |
| [clojure.java.io :as io])) | |
| (ns-tools/disable-reload!) | |
| (let [reload-dirs (->> (or (try | |
| (require 'boot.core) | |
| ((resolve 'boot.core/get-env) :directories) |
| ; Quoting symbols in collection before passing them to eval so that they are quoted when evaluated | |
| (let [test #{'a 'b 'c}] `(println ~@(map #(eval `''~%) test))) | |
| ; => (clojure.core/println (quote a) (quote c) (quote b)) |
| {:foreign-libs [{:file "cljsjs/common/pikaday.inc.js" | |
| :provides ["org.pikaday"]} | |
| {:file "cljsjs/common/pikaday.inc.js" | |
| :requires ["org.moment"] | |
| :provides ["org.pikaday.with-moment"]}] | |
| :externs ["cljsjs/common/pikaday.ext.js"]} |
| (ns foobar.ui.view.profile ...) | |
| (defmethod r/route-change :profile-view | |
| [data] | |
| (go | |
| (let [resp (<! (http/get "/api/users/current" {:ref "nav"}))] | |
| (swap! app/app assoc :profile (-> (:body resp) | |
| (f/->form-state domain/User)))) | |
| data)) |