Implement Overdrive data objects using data classes
[sitka/overdrive-evergreen-opac.git] / README.txt
CommitLineData
8ebc3fff
SC
1The source code for the project is written Coffeescript.
2
3The source needs to be completed by writing a od_config.coffee file to define
4configuration parameters, primarily related to authentication. Use the template
5file 'od_config_template.coffee' by following the instructions in the comments.
6
7The source also needs to be compiled into Javascript and minimized before the
8code can be deployed on a production server.
9
10Prerequisites
11
121. Install nodejs.org
13
142. Install node packages
15# npm install --global coffee-script
16# npm install --global requirejs
17
18
19Production Deployment
20
211. Put yourself at top-level project directory.
22
232. Compile source files from Coffeescript to Javascript (long form)
24# coffee --compile --bare --output app src
25
26(short form)
27# coffee -cb -o app src
28
293. Minify Javascript files
30# r.js -o build.js
31
324. Deploy minified files
33# rsync -e 'ssh -l sitkastaff' -azv build/overdrive.js servername.domainname:/var/tmp/od
34
35
36Development
37
38During development, you will cycle between compiling source files, deploying
39unminified files, and testing.
40
41- Run the compiler in watch mode and as a background process.
42# coffee -cbw -o app src &
43
44- Edit a file. It will be compiled automatically via the background process.
45
46- Deploy unminified files that have been modified to the test server.
47# rsync -e 'ssh -l sitkastaff' -azv app/ servername.domainname:/var/tmp/od
48
49- Reload your browser, https://libraryname.servername.domainname, to run the
50 modified file. Ensure that the browser's cache is disabled.