<commit_before># Prais2

Communicating the risks of infant surgery.

## Development setup

This is a ClojureScript project. To create a development environment from scratch you will need to install:

* A Java virtual machine. (e.g. A [recent JRE from Oracle](http://www.oracle.com/technetwork/java/javase/downloads/index.html)
* Leiningen. Follow [these installation instructions](http://leiningen.org/), which will provide the `lein` command.
* A suitable text editor. I use emacs with an [emacs-live set up](http://overtone.github.io/emacs-live/) for clojurescript development. You may prefer Sublime or LightTable or IntelliJ with the Cursive plugin for Clojure. 
>
Once you have leiningen installed, get an interactive development environment for running by typing:
```
git clone https://github.com/gmp26/prais2cljs.git prais2
cd prais2
lein figwheel
```
in a terminal or command line window. This will download and install all other dependencies and launch a local developemnt server. Open your browser at http://localhost:3449 to view. Once a browser connects you will have a REPL executing there allowing you to test cljs functions in situ. Use clojure's `in-ns` function to switch namespace to the source file you are working on. Source maps are provided so you are able to step through clojurescript code in Chrome Developer Tools.

[Figwheel](https://github.com/bhauman/lein-figwheel) gives you live reloading into the browser. It's brilliant.

Production build
----------------

To clean all compiled files:

    lein clean

To create a production build run:

    lein cljsbuild once min

Test 
----
Test by serving out the resources/public folder (e.g. with `cd resources/public & python -m'SimpleHTTPServer'` and then viewing localhost:8000).

Deployment
----------

Upload and serve the resources/public folder. 

You'll probably want to limit the client-side app to just the interactive parts of the current app for SEO purposes.<commit_msg>added notes on devcards to readme<commit_after># Prais2

Communicating the risks of infant surgery.

## Development builds


There are two development builds - one for [devcards](https://github.com/bhauman/devcards) and one for the PRAIS2 site. The devcards build is good for testing and visualising code and site components. You can switch between these two options at run time.


This is a ClojureScript project. To create a development environment from scratch you will need to install:

* A Java virtual machine. (e.g. A [recent JRE from Oracle](http://www.oracle.com/technetwork/java/javase/downloads/index.html))
* Leiningen. Follow [these installation instructions](http://leiningen.org/), which will provide the `lein` command.
* A suitable text editor. I use emacs with an [emacs-live set up](http://overtone.github.io/emacs-live/) for clojurescript development. You may prefer Sublime or LightTable or IntelliJ with the Cursive plugin for Clojure. 
>
Once you have leiningen installed, get an interactive development environment for running by typing:
```
git clone https://github.com/gmp26/prais2cljs.git prais2
cd prais2
lein figwheel
```
in a terminal or command line window. This will download and install all other dependencies and launch a local development server. 

### Switching builds

In a REPL, say `(switch-to-build :devcards)` or `(switch-to-build :dev)`.

### To work with devcards

Open your browser at http://localhost:3449/cards.html to view. Once a browser connects you will have a REPL executing there allowing you to test cljs functions in situ. Use clojure's `in-ns` function to switch namespace to the source file you are working on. Source maps are provided so you are able to step through clojurescript code in Chrome Developer Tools.

### To work with the site
Open your browser at http://localhost:3449/index.html to view.

In both development builds, 
[Figwheel](https://github.com/bhauman/lein-figwheel) gives you live reloading into the browser. 


Production build
----------------

To clean all compiled files:

    lein clean

To create a production build run:

    lein cljsbuild once min

Test 
----
Test by serving out the resources/public folder (e.g. with `cd resources/public & python -m'SimpleHTTPServer'` and then viewing localhost:8000).

Deployment
----------

Upload and serve the resources/public folder. 

You'll probably want to limit the client-side app to just the interactive parts of the current app for SEO purposes.
{'fraction_non_alphanumeric': 0.08119079837618404, 'fraction_numerical': 0.007442489851150203, 'mean_word_length': 4.0860091743119265, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 5, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3646874', 'n_tokens_mistral': 1238, 'n_tokens_neox': 1171, 'n_words': 574}