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

View File

@ -1,18 +1,29 @@
# ###*
# Rookeries frontend - Markdown Render app * Rookeries frontend - Markdown rendering controller.
# *
# (c) Copyright 2013 Dorian Pula * @copyright (c) Copyright 2013-2014 Dorian Pula
# @license: AGPL v3 * @license AGPL v3
# @author: Dorian Pula [dorian.pula@amber-penguin-software.ca] * @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 class DocPage
###
* Creates a representation of a content page
* @constructor
* @param json Page content from the server.
###
constructor: (json) -> constructor: (json) ->
@name = json['name'] @name = json['name']
@page_content = json['page_content'] @page_content = json['page_content']
# Controls the markdown ###*
* Controller for rendering Markdown page content.
###
rookeries_app.controller 'MarkdownContentCtrl', [ rookeries_app.controller 'MarkdownContentCtrl', [
'$http', '$stateParams' '$http', '$stateParams'
($http, $stateParams) -> ($http, $stateParams) ->

View File

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

View File

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