Skip to content

Commit 1ec2b4d

Browse files
author
Dan Sparacio
committed
Fixed Grunt jsdoc for es6. Added one doc to factory maker to test. Added Readme.md to docs as home page.
1 parent 3b91821 commit 1ec2b4d

File tree

4 files changed

+24
-6
lines changed

4 files changed

+24
-6
lines changed

Gruntfile.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ module.exports = function (grunt) {
195195
jsdoc: {
196196
dist: {
197197
options: {
198-
destination: 'docs/jsdocs',
198+
destination: 'dist/jsdoc',
199199
configure: 'build/jsdoc/jsdoc_conf.json'
200200
}
201201
}

build/jsdoc/jsdoc_conf.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"allowUnknownTags": true
44
},
55
"source": {
6-
"include": ["./src/"]
6+
"include": ["./src/", "README.md"]
77
},
88
"plugins": [ "plugins/markdown" ],
99
"templates": {

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@
2727
"grunt-exorcise": "^2.1.0",
2828
"grunt-githooks": "^0.5.0",
2929
"grunt-jscs": "^2.5.0",
30-
"grunt-jsdoc": "^0.5.8",
31-
"grunt-mocha-istanbul": "^3.0.1",
30+
"grunt-jsdoc": "^0.6.0",
3231
"ink-docstrap": "^1.1.0",
32+
"jsdoc": "^3.4.0",
33+
"grunt-mocha-istanbul": "^3.0.1",
3334
"iron-mocha": "^1.0.3",
3435
"istanbul": "^0.4.1",
35-
"jsdoc": "^3.4.0",
3636
"load-grunt-tasks": "^3.1.0",
3737
"mocha": "^2.3.4",
3838
"sinon": "^1.17.2",

src/core/FactoryMaker.js

+19-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
* POSSIBILITY OF SUCH DAMAGE.
3030
*/
3131
/**
32-
* @ignore
32+
* @Module FactoryMaker
3333
*/
3434
let FactoryMaker = (function () {
3535

@@ -44,6 +44,18 @@ let FactoryMaker = (function () {
4444
}
4545
}
4646

47+
/**
48+
* Use this method from your extended object. this.factory is injected into your object.
49+
* this.factory.getSingletonInstance(this.context, 'VideoModel')
50+
* will return the video model for use in the extended object.
51+
*
52+
* @param context {Object} injected into extended object as this.context
53+
* @param className {String} string name found in all dash.js objects with
54+
* name __dashjs_factory_name Will be at the bottom. Will be the same as the object's name.
55+
* @returns {*} Context aware instance of specified singleton name.
56+
* @memberof module:FactoryMaker#getSingletonInstance
57+
* @instance
58+
*/
4759
function getSingletonInstance(context, className) {
4860
for (let i in singletonContexts) {
4961
let obj = singletonContexts[i];
@@ -54,6 +66,12 @@ let FactoryMaker = (function () {
5466
return null;
5567
}
5668

69+
/**
70+
*
71+
* @param context
72+
* @param className
73+
* @param instance
74+
*/
5775
function setSingletonInstance(context, className, instance) {
5876
for (let i in singletonContexts) {
5977
let obj = singletonContexts[i];

0 commit comments

Comments
 (0)