JS merge and minifying middleware for clojure. Based on dieter.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
.gitignore
README.md
project.clj

README.md

JSify

JS merge and minifier

Installation

Add the following dependency to your project.clj file:

[jsify "0.1.4"]

Example

(require '[jsify :as jsify])

(def jsify-settings {
      :engine       :v8
      :cache-mode   :development
      :compress     false
      :cache-root   "resources/public/js/" 
      :asset-roots  "resources/private/js/"
      :log-level    :quiet
    })

For noir

(noir/add-middleware jsify/jsify-middleware jsify-settings)

For ring

(-> app (jsify/jsify-middleware jsify-settings))

To get the link to the output simply use:

(jsify/link-to-asset "app.jsify" jsify-settings)

resources/private/js/app.jsify will look like this:

[
    "plugin.jquery.js"
    "init.js"
    "assets/"
    "more.js"
]

JSify will only rebuild the javascript when files are changed.