2012-02-18 12:30:36 +00:00
|
|
|
;; Copyright (c) 2011-2012 Michael S. Klishin
|
|
|
|
|
;;
|
|
|
|
|
;; The use and distribution terms for this software are covered by the
|
|
|
|
|
;; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
|
|
|
|
|
;; which can be found in the file epl-v10.html at the root of this distribution.
|
|
|
|
|
;; By using this software in any fashion, you are agreeing to be bound by
|
|
|
|
|
;; the terms of this license.
|
|
|
|
|
;; You must not remove this notice, or any other, from this software.
|
|
|
|
|
|
2012-05-02 21:06:41 +00:00
|
|
|
(ns ^{:doc "Kept for backwards compatibility. Please use clojurewerkz.support.js from now on."} monger.js
|
|
|
|
|
(:require [clojurewerkz.support.js :as js]))
|
2011-10-16 11:54:53 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;
|
|
|
|
|
;; API
|
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
(defn load-resource
|
2012-06-29 07:49:22 +00:00
|
|
|
"Loads a JavaScript resource (file from the classpath) and returns its content as a string.
|
|
|
|
|
The .js suffix at the end may be omitted.
|
|
|
|
|
|
|
|
|
|
Used primarily for map/reduce queries."
|
2011-10-16 11:54:53 +00:00
|
|
|
(^String [^String path]
|
2012-05-02 21:06:41 +00:00
|
|
|
(js/load-resource path)))
|