Skip to content

Commit

Permalink
[#2375] Add some front end documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
aron committed Jul 24, 2012
1 parent b3f0433 commit b31109b
Show file tree
Hide file tree
Showing 3 changed files with 393 additions and 81 deletions.
47 changes: 0 additions & 47 deletions doc/coding-standards.rst
Expand Up @@ -833,53 +833,6 @@ comments that do not form part of the documentation. ::
module.Broadcast = Broadcast;
}

File Structure
--------------

All public JavaScript files should be contained within a _javascript_ directory
within the _public_ directory and files should be structured accordingly. ::

lib/
main.js
utils.js
components/
vendor/
jquery.js
jquery.plugin.js
underscore.js
templates/
test/
index.html
spec/
main-spec.js
utils-spec.js
vendor/
mocha.js
mocha.css
chai.js

All files and directories should be lowercase with hyphens used to separate words.

lib
Should contain all application files. These can be structured appropriately.
It is recommended that *main.js* be used as the bootstrap filename that sets
up the page.

vendor
Should contain all external dependencies. These should not contain
version numbers in the filename. This information should be available in
the header comment of the file. Library plugins should be prefixed with the
library name. eg the hover intent jQuery plugin would have the filename
*jquery.hover-intent.js*.

templates
Should be stored in a seperate directory and have the .html
extension.
test
Contains the test runner *index.html*. *vendor* contains all test
dependencies and libraries. *spec* contains the actual test files. Each
test file should be the filename with *-spec* appended.

JSHint
------

Expand Down

0 comments on commit b31109b

Please sign in to comment.