Skip to content

Commit

Permalink
Fixed up jsdoc a little and added into project.
Browse files Browse the repository at this point in the history
  • Loading branch information
tbranyen committed May 9, 2014
1 parent f61b406 commit 24810e2
Show file tree
Hide file tree
Showing 13 changed files with 53 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1,4 +1,5 @@
/node_modules/
/bower_components/
/dist/
/docs/
/test/coverage/
3 changes: 3 additions & 0 deletions lib/compiler.js
@@ -1,3 +1,6 @@
/**
* @module lib/compiler
*/
define(function(require, exports, module) {
"use strict";

Expand Down
3 changes: 3 additions & 0 deletions lib/grammar.js
@@ -1,3 +1,6 @@
/**
* @module lib/grammar
*/
define(function(require, exports, module) {
"use strict";

Expand Down
3 changes: 3 additions & 0 deletions lib/index.js
@@ -1,3 +1,6 @@
/**
* @module lib/index
*/
define(function(require, exports, module) {
"use strict";

Expand Down
6 changes: 6 additions & 0 deletions lib/shared/register_filter.js
@@ -1,6 +1,12 @@
define(function(require, exports, module) {
"use strict";

/**
* Registers a filter on the template object.
*
* @param {string} name - the name to register.
* @param {function} callback - the callback to trigger for the filter.
*/
var registerFilter = function(name, callback) {
this._filters[name] = callback;
};
Expand Down
6 changes: 6 additions & 0 deletions lib/shared/register_partial.js
@@ -1,6 +1,12 @@
define(function(require, exports, module) {
"use strict";

/**
* Registers a partial on the template object.
*
* @param {string} name - the name to register.
* @param {function} template - the template to use as a partial.
*/
var registerPartial = function(name, template) {
this._partials[name] = template;

Expand Down
3 changes: 3 additions & 0 deletions lib/tokenizer.js
@@ -1,3 +1,6 @@
/**
* @module lib/tokenizer
*/
define(function(require, exports, module) {
"use strict";

Expand Down
9 changes: 9 additions & 0 deletions lib/tree.js
@@ -1,3 +1,6 @@
/**
* @module lib/tree
*/
define(function(require, exports, module) {
"use strict";

Expand All @@ -7,6 +10,7 @@ define(function(require, exports, module) {
*
* @class
* @constructor
* @exports lib/tree
*/
function Tree(stack) {
// Internally use a copy of the stack.
Expand All @@ -19,6 +23,11 @@ define(function(require, exports, module) {
};
}

/**
* Build a descriptor to describe an instance of a property.
*
* @public
*/
Tree.prototype.constructProperty = function() {
var propertyDescriptor = {
type: "Property",
Expand Down
6 changes: 5 additions & 1 deletion lib/utils/create_object.js
@@ -1,12 +1,16 @@
/**
* @module lib/utils/create_object
*/
define(function(require, exports, module) {
"use strict";

/**
* Basic Crockford-ian style Object.create. I've named it differently from
* the native implementation.
*
* @private
* @param {Object} parent - An object to specify as the return prototype.
* @returns {Object} instance - An object with parent as the prototype.
* @returns {object} instance - an object with parent as the prototype.
*/
function createObject(parent) {
function F() {}
Expand Down
4 changes: 4 additions & 0 deletions lib/utils/escape_delimiter.js
@@ -1,3 +1,6 @@
/**
* @module lib/utils/escape_delimiter
*/
define(function(require, exports, module) {
"use strict";

Expand All @@ -6,6 +9,7 @@ define(function(require, exports, module) {
/**
* Escape special characters that may interfere with RegExp building.
*
* @private
* @param {String} delimiter value to escape.
* @returns {String} safe value for RegExp building.
*/
Expand Down
3 changes: 3 additions & 0 deletions lib/utils/map.js
@@ -1,3 +1,6 @@
/**
* @module lib/utils/map
*/
define(function(require, exports, module) {
"use strict";

Expand Down
3 changes: 3 additions & 0 deletions lib/utils/type.js
@@ -1,3 +1,6 @@
/**
* @module lib/utils/type
*/
define(function(require, exports, module) {
"use strict";

Expand Down
6 changes: 4 additions & 2 deletions package.json
Expand Up @@ -18,9 +18,11 @@
"karma-phantomjs-launcher": "~0.1.4",
"browserify": "~3.46.0",
"grunt-browserify": "~2.0.8",
"deamdify": "~0.1.1"
"deamdify": "~0.1.1",
"jsdoc": "~3.3.0-alpha5"
},
"scripts": {
"test": "grunt test coveralls"
"test": "grunt test coveralls",
"doc": "jsdoc -r -d docs/ lib/"
}
}

0 comments on commit 24810e2

Please sign in to comment.