-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
55 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
target/ | ||
target | ||
.nrepl-* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
BOOT_CLOJURE_VERSION=1.9.0-alpha5 | ||
BOOT_VERSION=2.6.0 | ||
BOOT_CLOJURE_NAME=org.clojure/clojure | ||
BOOT_CLOJURE_VERSION=1.9.0-alpha15 | ||
BOOT_VERSION=2.7.1 | ||
BOOT_EMIT_TARGET=no |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,37 @@ | ||
(set-env! | ||
:resource-paths #{"src"} | ||
:dependencies '[[org.clojure/clojure "1.9.0-alpha5" :scope "provided"] | ||
:dependencies '[[org.clojure/clojure "1.9.0-alpha15" :scope "provided"] | ||
[org.clojure/clojurescript "1.9.521" :scope "provided"] | ||
|
||
[org.clojure/clojurescript "1.9.36" :scope "provided"] | ||
[adzerk/boot-cljs "1.7.228-1" :scope "provided"] | ||
[adzerk/boot-cljs "1.7.228-1" :scope "test"] | ||
|
||
[adzerk/bootlaces "0.1.13" :scope "test"] | ||
|
||
[hoplon "6.0.0-alpha16" :scope "provided"] | ||
[hoplon/boot-hoplon "0.1.13" :scope "provided"] | ||
[hoplon "6.0.0-alpha17" :scope "provided"] | ||
|
||
[cljsjs/highlight "8.4-0"]]) | ||
|
||
(require | ||
'[adzerk.bootlaces :refer :all] | ||
'[hoplon.boot-hoplon :refer [hoplon]]) | ||
|
||
(def +version+ "8.4.0-0") | ||
|
||
(task-options! | ||
pom {:project 'hoplon/highlight | ||
:version +version+ | ||
pom {:project 'hoplon/highlight | ||
:version "8.4.0-0" | ||
:description "Hoplon wrapper for highlight.js" | ||
:url "https://highlightjs.org/" | ||
:scm {:url "https://github.com/hoplon/highlight"} | ||
:license {"EPL" "http://opensource.org/licenses/eclipse-1.0.php"}} | ||
hoplon {:manifest true}) | ||
:url "https://highlightjs.org/" | ||
:scm {:url "https://github.com/hoplon/highlight"} | ||
:license {"EPL" "http://www.eclipse.org/legal/epl-v10.html"}} | ||
push {:repo "deploy-clojars"}) | ||
|
||
(deftask local-install [] | ||
"Build and install the project locally." | ||
(comp | ||
(pom) | ||
(jar) | ||
(install))) | ||
|
||
(deftask release [] | ||
(merge-env! | ||
:repositories [["deploy-clojars" {:url "https://clojars.org/repo" | ||
:username (System/getenv "CLOJARS_USER") | ||
:password (System/getenv "CLOJARS_PASS")}]]) | ||
(comp | ||
(local-install) | ||
(sift :include [#".*\.jar"]) | ||
(push))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
(ns hoplon.highlight | ||
(:require | ||
[cljsjs.highlight] | ||
[hoplon.core :as h] | ||
[javelin.core :as j])) | ||
|
||
(h/defelem highlight | ||
"Element for highlighting code. Class is passed to the code element for | ||
choosing the language." | ||
[{:keys [class]} kids] | ||
(j/with-let [c (h/pre (apply (h/code :class class) kids))] | ||
(h/with-init! | ||
(.highlightBlock js/hljs c)))) | ||
|
||
(defn highlight-pre-code | ||
"Side-efectful. Highlights all code elements inside pre elements. Those needs | ||
to be in the DOM when this fuction is called." | ||
[] | ||
(.each (js/jQuery "pre code") | ||
(fn [i block] (.highlightBlock js/hljs block)))) |
This file was deleted.
Oops, something went wrong.