-
Notifications
You must be signed in to change notification settings - Fork 0
Project organization
There are only three top level directories in this project that a designer or developer will need to work with: public
, templates
and src
.
public
├── 404.html
├── css
├── design.html
├── images
├── index.html
└── javascripts
The public directory contains files that are publicly available. With a running server, 404.html
can be reached at http://localhost:8080/404.html
.
JavaScripts generated by the ClojureScript compiler will be put into public/javascripts
. Images and CSS should be put into public/images
and public/css
.
A designer may also want to change the links on the design page. This can be done by editing the public/design.html
file and following the conventions in that file..
templates
├── application.html
├── form.html
├── greeting.html
└── toolbar.html
The templates directory contains template HTML files which will become part of the running application. See the Design and templating page for more information about how to use these templates.
src
├── clj
│ ├── library
│ │ ├── ...
│ └── start
│ ├── ...
├── cljs
│ ├── library
│ │ ├── browser
│ │ │ ├── ...
│ │ ├── ...
│ └── start
│ ├── ...
└── cljs-macros
└── start
└── ...
Source files are organized into three directories: clj
, cljs
andcljs-macros
. Clojure and ClojureScript code go into clj
and cljs
respectively. ClojureScript macros are Clojure macros and go intocljs-macros
. Both macros and functions from files in cljs-macros
can be used in Clojure code and the macros can be used in ClojureScript code.
Any code in a namespace which starts with library
is plumbing code and is not specific to this particular application. It is the type of code that should be put into an external library.
The src/clj/library
directory contains code for configuration, code reloading, templating, testing, creating a JavaScript host page and building deployment artifacts.
The src/clj/start
directory contains a development and deployment server, the application configuration and the server-side API for the sample application.
The src/cljs/library
directory contains code for event dispatching and logging.
The src/cljs/library/browser
directory contains code for dealing with browser history and remoting.
The src/cljs/start
directory contains the sample ClojureScript application. It is a simple form which prints a greeting when submitted. The application demonstrates using the event dispatcher, history, remoting and logging.
Contains tests for the sample application. The most interesting tests are contained in start.test.integration
.