Liking cljdoc? Tell your friends :D

clj-build-date

Clojars Project

A minimal library to read build timestamp from JAR/WAR manifests.

Useful for prevent browsers from caching old js and css files.

Prepare

Add this line in your project.clj.

:manifest {"Build-Date" ~(fn [_] (System/currentTimeMillis))}

Usage

(ns hello-world.view
  (:require [hiccup.page :refer [html5 include-css include-js]]
            [clj-build-date.core :refer [with-build-date]]))

(defn frame
  [req]
  (html5
   [:head
    [:title "Hello World!"]
    [:meta {:charset "utf-8"}]
    (include-css (with-build-date req "/css/main.css"))]
   [:body
    [:div#app]
    (include-js (with-build-date req "/js/main.js"))]))

network

License

Copyright Xcoo, Inc.

Licensed under the Apache License, Version 2.0.

Can you improve this documentation?Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close