Skip to content

Commit 4eb2309

Browse files
committed
New client folder structure, removing client build artifacts
1 parent 3077f2c commit 4eb2309

40 files changed

+41
-12431
lines changed

.gitignore

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ activator-sbt-idea-shim.sbt
2929

3030
public/scala-js/
3131

32-
react-js/build/
33-
react-js/dist/
34-
react-js/reports/
35-
react-js/node_modules/
36-
react-js/src/bower_components
32+
clients/react-js/build/
33+
clients/react-js/dist/
34+
clients/react-js/reports/
35+
clients/react-js/node_modules/
36+
clients/react-js/src/bower_components
3737

38-
public/cljs/out/
38+
public/build/

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22

33
BirdWatch is a reactive web application for visualizing a stream of live Tweets making use of **[AngularJS](http://angularjs.org)**, **[BootStrap](http://getbootstrap.com)**, **[Crossfilter](http://square.github.io/crossfilter/)**, **[D3.js](http://d3js.org)**, **[ElasticSearch](http://www.elasticsearch.org)** and **[Play Framework](http://www.playframework.com)** (in alphabetical order).
44

5-
**EDIT 04/2014:** For comparing frameworks, there is now also a **[ReactJS](http://facebook.github.io/react/)** version in addition to the AngularJS version. A detailed blog post will follow shortly. In this version there is a trend-aware bar chart built entirely with React, without relying on D3.js. That chart will be the topic of yet another article soon.
5+
**EDIT 04/2014:** For comparing frameworks, there is now also a **[ReactJS](http://facebook.github.io/react/)** version in addition to the AngularJS version. A detailed blog post will follow shortly. In this version there is a trend-aware bar chart built entirely with React, without relying on D3.js.
6+
7+
**EDIT 07/2014:** Now there is also a **[ClojureScript](https://github.com/clojure/clojurescript)** client available. Please see **[this blog article](http://matthiasnehlsen.com/blog/2014/07/17/BirdWatch-in-ClojureScript/)** and subsequent entries for more information on that client.
8+
9+
The **different clients** are located in the **clients/** folder, each of them **needs to be built in order to work**. Client build artifacts are no longer checked into the git repository in order to avoid bloating the repository size.
610

711
![Screenshot](./docs/screenshot.png)
812

app/views/cljs_om.scala.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ <h5>word frequency</h5>
148148
<script src="/assets/cljs-js/wordcloud.js"></script>
149149
<script type="text/javascript" src="//platform.twitter.com/widgets.js"></script>
150150

151-
<script src="/assets/cljs/out/goog/base.js" type="text/javascript"></script>
152-
<script src="/assets/cljs/cljs_om.js" type="text/javascript"></script>
151+
<script src="/assets/build/cljs/out/goog/base.js" type="text/javascript"></script>
152+
<script src="/assets/build/cljs/cljs_om.js" type="text/javascript"></script>
153153
<script type="text/javascript">goog.require("cljs_om.core");</script>
154154

155155
<!-- Analytics, Todo: replace or remove in your own project. -->

app/views/cljs_om_opt.scala.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ <h5>word frequency</h5>
148148
<script src="/assets/cljs-js/wordcloud.js"></script>
149149
<script type="text/javascript" src="//platform.twitter.com/widgets.js"></script>
150150

151-
<script src="/assets/cljs-opt/cljs_om.js" type="text/javascript"></script>
151+
<script src="/assets/build/cljs-opt/cljs_om.js" type="text/javascript"></script>
152152

153153
<!-- Analytics, Todo: replace or remove in your own project. -->
154154
<script>

app/views/react_js.scala.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ <h5>word frequency</h5>
163163
<script src="/assets/react-js/vendor/regression.js"></script>
164164
<script type="text/javascript" src="//platform.twitter.com/widgets.js"></script>
165165

166-
<script type="text/javascript" src="assets/react-js/birdwatch.js"></script>
166+
<script type="text/javascript" src="assets/build/react-js/birdwatch.js"></script>
167167

168168
<!-- Analytics, Todo: replace or remove in your own project. -->
169169
<script>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

cljs-om/project.clj renamed to clients/cljs-om/project.clj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616
:builds [{:id "dev"
1717
:source-paths ["src"]
1818
:compiler {
19-
:output-to "../public/cljs/cljs_om.js"
20-
:output-dir "../public/cljs/out"
19+
:output-to "../../public/build/cljs/cljs_om.js"
20+
:output-dir "../../public/build/cljs/out"
2121
:optimizations :none
2222
:source-map true}}
2323
{:id "release"
2424
:source-paths ["src"]
25-
:compiler {:output-to "../public/cljs-opt/cljs_om.js"
25+
:compiler {:output-to "../../public/build/cljs-opt/cljs_om.js"
2626
:optimizations :advanced
2727
;:preamble ["react/react.min.js"]
2828
:externs ["externs/react.js" "externs/misc.js"]}}]})
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

cljs-om/src/cljs_om/wordcount.cljs renamed to clients/cljs-om/src/cljs_om/wordcount.cljs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@
1818
"few" "more" "most" "other" "some" "such" "no" "nor" "not" "only" "own" "same" "so" "than" "too"
1919
"very" "say" "says" "said" "shall" "via" "htt…" "don" "let" "gonna" "rt" "&amp" "http"})
2020

21-
(def regex-stop-words #"(use|good|want|amp|just|now|like|til|new|get|one|i|me|my|myself|we|us|our|ours|ourselves|you|your|yours|yourself|yourselves|he|him|his|himself|she|her|hers|herself|it|its|itself|they|them|their|theirs|themselves|what|which|who|whom|whose|this|that|these|those|am|is|are|was|were|be|been|being|have|has|had|having|do|does|did|doing|will|would|should|can|could|ought|i'm|you're|he's|she's|it's|we're|they're|i've|you've|we've|they've|i'd|you'd|he'd|she'd|we'd|they'd|i'll|you'll|he'll|she'll|we'll|they'll|isn't|aren't|wasn't|weren't|hasn't|haven't|hadn't|doesn't|don't|didn't|won't|wouldn't|shan't|shouldn't|can't|cannot|couldn't|mustn't|let's|that's|who's|what's|here's|there's|when's|where's|why's|how's|a|an|the|and|but|if|or|because|as|until|while|of|at|by|for|with|about|against|between|into|through|during|before|after|above|below|to|from|up|upon|down|in|out|on|off|over|under|again|further|then|once|here|there|when|where|why|how|all|any|both|each|few|more|most|other|some|such|no|nor|not|only|own|same|so|than|too|very|say|says|said|shall|via|htt…|don|let|gonna)$/;
22-
var punctuation = /[!\"&()*-+,-\.\/:;<=>?\[\\\]^`“”\{|\}~]+")
23-
2421
(defn get-words [app n]
2522
(vec (map (fn [w] (let [[k v] w] {:key k :value v})) (take n (:words-sorted-by-count @app)))))
2623

@@ -37,7 +34,6 @@
3734
(filter #(< (count %) 25) ,)
3835
(map s/lower-case ,)
3936
(map #(s/replace % #"[;:,/‘’…~\-!?#<>()\"@.]+" "" ) ,)
40-
(filter #(not (re-find regex-stop-words %)) ,)
41-
; (filter (fn [item] (not (contains? stop-words item))) ,)
37+
(filter (fn [item] (not (contains? stop-words item))) ,)
4238
(map #(add-word app %) ,))))
4339

File renamed without changes.
File renamed without changes.
File renamed without changes.

react-js/gruntfile.js renamed to clients/react-js/gruntfile.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ module.exports = function (grunt) {
2727
copy: {
2828
all: {
2929
files: [
30-
{ expand: true, cwd: 'dist/', src: ['birdwatch.js'], dest: '../public/react-js/' },
31-
{ expand: true, cwd: 'build/', src: ['barchart.js'], dest: '../public/cljs-js/' },
32-
{ expand: true, cwd: 'src/', src: ['wordcloud.js'], dest: '../public/cljs-js/' },
33-
{ expand: true, cwd: 'src/bower_components/react/', src: ['react.min.js'], dest: '../public/react-js/vendor/' },
34-
{ expand: true, cwd: 'src/bower_components/react/', src: ['react.js'], dest: '../public/react-js/vendor/' },
35-
{ expand: true, cwd: 'src/bower_components/regression-js/src', src: ['regression.js'], dest: '../public/react-js/vendor/' }
30+
{ expand: true, cwd: 'dist/', src: ['birdwatch.js'], dest: '../../public/build/react-js/' },
31+
{ expand: true, cwd: 'build/', src: ['barchart.js'], dest: '../../public/cljs-js/' },
32+
{ expand: true, cwd: 'src/', src: ['wordcloud.js'], dest: '../../public/cljs-js/' },
33+
{ expand: true, cwd: 'src/bower_components/react/', src: ['react.min.js'], dest: '../../public/react-js/vendor/' },
34+
{ expand: true, cwd: 'src/bower_components/react/', src: ['react.js'], dest: '../../public/react-js/vendor/' },
35+
{ expand: true, cwd: 'src/bower_components/regression-js/src', src: ['regression.js'], dest: '../../public/react-js/vendor/' }
3636
]
3737
}
3838
},
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

docs/screenshot.png

135 KB
Loading

0 commit comments

Comments
 (0)