Add JSDocs to all coffeescript modules.

Fix up karma and protractor modules.
This commit is contained in:
Dorian 2014-10-30 08:07:44 -04:00
parent c72c29cf08
commit 9794f2d504
5 changed files with 42 additions and 32 deletions

View File

@ -1,11 +1,9 @@
###
Rookeries frontend
(c) Copyright 2013-2014 Dorian Pula
@license: AGPL v3+
@author: Dorian Pula <dorian.pula@amber-penguin-software.ca>
###*
* Rookeries frontend
*
* @copyright (c) Copyright 2013-2014 Dorian Pula
* @license AGPL v3
* @author Dorian Pula [dorian.pula@amber-penguin-software.ca]
###
'use strict'
@ -16,16 +14,18 @@ rookeries_app = angular.module 'rookeriesApp', [
# TODO Document and test
# Router for the Rookeries apps.
### State and url router for the Rookeries apps. ###
rookeries_app.config ($stateProvider, $urlRouterProvider) ->
# For unmatched URLs
# TODO Find a better default page
$urlRouterProvider.otherwise '/doc/about'
$stateProvider.state 'docs',
url: '/doc/:page'
templateUrl: 'static/partials/doc-page.html'
### Configuration for the angular-marked component ###
rookeries_app.config ['markedProvider', (markedProvider) ->
markedProvider.setOptions
gfm: true,

View File

@ -1,18 +1,29 @@
#
# Rookeries frontend - Markdown Render app
#
# (c) Copyright 2013 Dorian Pula
# @license: AGPL v3
# @author: Dorian Pula [dorian.pula@amber-penguin-software.ca]
#
###*
* Rookeries frontend - Markdown rendering controller.
*
* @copyright (c) Copyright 2013-2014 Dorian Pula
* @license AGPL v3
* @author Dorian Pula [dorian.pula@amber-penguin-software.ca]
###
###*
* Controller for switching between predefined themes.
* Based off : http://stackoverflow.com/questions/16514330/angularjs-switch-stylesheets-based-on-user-input
###
class DocPage
###
* Creates a representation of a content page
* @constructor
* @param json Page content from the server.
###
constructor: (json) ->
@name = json['name']
@page_content = json['page_content']
# Controls the markdown
###*
* Controller for rendering Markdown page content.
###
rookeries_app.controller 'MarkdownContentCtrl', [
'$http', '$stateParams'
($http, $stateParams) ->

View File

@ -1,19 +1,20 @@
#
# Rookeries frontend - CSS theme switcher.
#
# (c) Copyright 2013-2014 Dorian Pula
# @license: AGPL v3
# @author: Dorian Pula [dorian.pula@amber-penguin-software.ca]
#
###*
* Rookeries frontend - CSS theme switcher controller.
*
* @copyright (c) Copyright 2013-2014 Dorian Pula
* @license AGPL v3
* @author Dorian Pula [dorian.pula@amber-penguin-software.ca]
###
# TODO Document and test.
# TODO Consider changing this controller into a directive or component.
# Toggle between themes.
# Based off : http://stackoverflow.com/questions/16514330/angularjs-switch-stylesheets-based-on-user-input
###*
* Controller for switching between predefined themes.
* Based off : http://stackoverflow.com/questions/16514330/angularjs-switch-stylesheets-based-on-user-input
###
rookeries_app.controller 'SwitchThemeCtrl', [
() ->
self = this
### Hardcoded list of themes. May become dynamic in the future. ###
self.installed_themes = [
{"name": "daytime", "icon_highlight": false},
{"name": "evening", "icon_highlight": true}

View File

@ -20,7 +20,7 @@ module.exports = (config) ->
'rookeries/static/scripts/vendor/angular-marked/angular-marked.js',
'rookeries/static/scripts/vendor/angular-ui-router/release/angular-ui-router.js',
'rookeries/static/scripts/rookeries/**/*.coffee',
'tests/client/**/*.coffee'
'tests/client/unit/**/*.coffee'
]

View File

@ -7,5 +7,3 @@ exports.config =
capabilities:
browserName: 'chrome'