root / webodf / README @ a00c131b
History | View | Annotate | Download (1.6 kB)
| 1 | This directory contains the javacript code to WebODF as well as applications that use it. The applications are browser applications, commandline applications and unit tests. |
|---|---|
| 2 | |
| 3 | lib/ |
| 4 | lib/core/ Parts of WebODF that also work on JavaScript runtimes without a |
| 5 | document window. |
| 6 | lib/gui/ Parts of WebODF that require a domtree |
| 7 | |
| 8 | The library should be able to run in a number of different runtimes. Currently these are: |
| 9 | - a webbrowser |
| 10 | - node.js |
| 11 | - rhino |
| 12 | A common API is implemented for these three environments in the files lib/browser.js, lib/node.js and lib/rhino.js respectively. |
| 13 | |
| 14 | |
| 15 | |
| 16 | Requirements on the code |
| 17 | |
| 18 | There are several requirements that need to met before code can be considered for inclusion in WebODF. Most requirements can be checked automatically, a few have to be checked by hand. A contribution must: |
| 19 | - be contributed under the appropriate license |
| 20 | - be javascript |
| 21 | - not give any warnings in a JSLint check |
| 22 | - be unchanged when passed through jsbeautifier |
| 23 | - compile with the closure compiler |
| 24 | - must pass all the unit tests that were passed before |
| 25 | - as separate js files in the currenlty used Node.JS implementation |
| 26 | - as a single compiled file in the currenlty used Node.JS implementation |
| 27 | - as separate js files in the currenlty used Rhino implementation |
| 28 | - as a single compiled file Rhino implementation |
| 29 | - must have equal or greater code coverage for the each of the test runs |
| 30 | |
| 31 | The automatic checks can be performed by running a dedicated command that reports in an xml file. This report is compared to the previous report. |
| 32 | |
| 33 | runtests.js is the command that creates a report. |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 |