Skip to content
/ jsify Public
forked from BlueXiphoid/jsify

JS merge and minifying middleware for clojure. Based on dieter.

Notifications You must be signed in to change notification settings

touch/jsify

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

JSify

JS merge and minifier

Installation

Add the following dependency to your project.clj file:

[jsify "0.1.1-SNAPSHOT"]

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.

About

JS merge and minifying middleware for clojure. Based on dieter.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published