From 8643a6311e5e5c9aa5aa408ecabf976e21d87b7d Mon Sep 17 00:00:00 2001 From: Christian Mueller Date: Thu, 24 May 2012 23:05:42 +0200 Subject: [PATCH] lein-cljsbuild added --- .gitignore | 3 +- project.clj | 11 +++++++ resources/public/css/reset.css | 57 ---------------------------------- src-cljs/main.cljs | 3 ++ src/NoteHub/views/common.clj | 3 +- 5 files changed, 18 insertions(+), 59 deletions(-) delete mode 100644 resources/public/css/reset.css create mode 100644 src-cljs/main.cljs diff --git a/.gitignore b/.gitignore index b8c1b21..e1df97d 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ pom.xml *jar /lib/ /classes/ -.lein-deps-sum +.lein-* +resources/public/js/* diff --git a/project.clj b/project.clj index b902030..3358b47 100644 --- a/project.clj +++ b/project.clj @@ -4,5 +4,16 @@ [hiccup "1.0.0"] [cssgen "0.2.6"] [noir "1.3.0-beta1"]] + :plugins [[lein-cljsbuild "0.1.10"]] + :cljsbuild { + :builds [{ + ; The path to the top-level ClojureScript source directory: + :source-path "src-cljs" + ; The standard ClojureScript compiler options: + ; (See the ClojureScript compiler documentation for details.) + :compiler { + :output-to "resources/public/js/main.js" ; default: main.js in current directory + :optimizations :whitespace + :pretty-print true}}]} :main NoteHub.server) diff --git a/resources/public/css/reset.css b/resources/public/css/reset.css deleted file mode 100644 index 3af4882..0000000 --- a/resources/public/css/reset.css +++ /dev/null @@ -1,57 +0,0 @@ -html { - margin:0; - padding:0; - border:0; -} - -body, div, span, object, iframe, -h1, h2, h3, h4, h5, h6, p, blockquote, pre, -a, abbr, acronym, address, code, -del, dfn, em, img, q, dl, dt, dd, ol, ul, li, -fieldset, form, label, legend, -table, caption, tbody, tfoot, thead, tr, th, td, -article, aside, dialog, figure, footer, header, -hgroup, nav, section { - margin: 0; - padding: 0; - border: 0; - font-weight: inherit; - font-style: inherit; - font-size: 100%; - font-family: inherit; - vertical-align: baseline; -} - -article, aside, dialog, figure, footer, header, -hgroup, nav, section { - display:block; -} - -body { - line-height: 1.5; - background: white; -} - -table { - border-collapse: separate; - border-spacing: 0; -} - -caption, th, td { - text-align: left; - font-weight: normal; - float:none !important; -} -table, th, td { - vertical-align: middle; -} - -blockquote:before, blockquote:after, q:before, q:after { content: ''; } -blockquote, q { quotes: "" ""; } - -a img { border: none; } - -/*:focus { outline: 0; }*/ - - - diff --git a/src-cljs/main.cljs b/src-cljs/main.cljs new file mode 100644 index 0000000..bc8951c --- /dev/null +++ b/src-cljs/main.cljs @@ -0,0 +1,3 @@ +(ns NoteHub.main) + +(.log js/console "works !") diff --git a/src/NoteHub/views/common.clj b/src/NoteHub/views/common.clj index d785279..6497c23 100644 --- a/src/NoteHub/views/common.clj +++ b/src/NoteHub/views/common.clj @@ -1,6 +1,6 @@ (ns NoteHub.views.common (:use [noir.core :only [defpartial]] - [hiccup.page :only [include-css html5]])) + [hiccup.page :only [include-js html5]])) (use 'cssgen) (defn gen-comma-list [fonts] (apply str (interpose "," fonts))) @@ -57,6 +57,7 @@ (html5 [:head [:title "NoteHub"] + (include-js "/js/main.js") [:link {:href "http://fonts.googleapis.com/css?family=Noticia+Text:400,700" :rel "stylesheet" :type "text/css"}]