-
Notifications
You must be signed in to change notification settings - Fork 0
Project organization
There are four top level directories in this project that a designer or developer will need to work with: public
, templates
, src
and test
.
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
.
JavaScript source 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.
βββ app
βΒ Β βββ clj
βΒ Β βΒ Β βββ one
βΒ Β βΒ Β βββ sample
βΒ Β βΒ Β βββ ...
βΒ Β βββ cljs
βΒ Β βΒ Β βββ one
βΒ Β βΒ Β βββ sample
βΒ Β βΒ Β βββ ...
βΒ Β βββ cljs-macros
βΒ Β βββ one
βΒ Β βββ sample
βΒ Β βββ ...
βββ lib
βββ clj
βΒ Β βββ one
βΒ Β βββ ...
βββ cljs
βββ one
βββ browser
βΒ Β βββ ...
βββ ...
Source code is split into two directories: app
and lib
. The app
directory is for code that is specific to the application that you are building. Initially, this directory contains code for the sample application. This code should be changed frequently. The lib
directory contains library code that is not specific to the current application.
Even though this library code is "general purpose" and not specific to the application you are building. It may still need to be changed and should be easy for you to change. When useful changes are made to these libraries please consider contributing them back to ClojureScript One. Once this library code becomes mature, it will be extracted into an external library.
In both the app
and lib
directories, code is organized into clj
, cljs
and cljs-macros
directories for Clojure, ClojureScript and macros.
Test code is located in the test
directory. ClojureScript One provides support for testing ClojureScript code and Clojure code from your favorite Clojure testing framework. A few unit-level tests are provided as a starting point for your own testing needs.
Additionally, the project comes with an interesting integration test in the test
directory under the one.sample.test.integration
namespace. This test uses ClojureScript's Browser-connected REPL and a few utility functions to drive a browser session in much the same way that Selenium operates.