From cab1fcfa3e42ec0df0bc3544f1071be3c58eaf16 Mon Sep 17 00:00:00 2001 From: Yujun Zhang Date: Fri, 22 Jul 2016 11:11:18 +0800 Subject: [PATCH] add jsdoc to component/pkg Change-Id: Ieaa41958478e1c15e46d93d982a93cf42d4b4f78 --- generators/app/lib/component/pkg.js | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/generators/app/lib/component/pkg.js b/generators/app/lib/component/pkg.js index f88bf13..fbee8ca 100644 --- a/generators/app/lib/component/pkg.js +++ b/generators/app/lib/component/pkg.js @@ -14,6 +14,11 @@ * under the License. */ +/** + * package module + * @module + */ + 'use strict'; var Q = require('q'); @@ -30,7 +35,7 @@ var packagePath = 'package.json'; * @param {generator} generator The currently active generator. * @returns {generator} The passed generator, for promise chaining. */ -function promptPackage (generator) { +function prompt (generator) { var deferred = Q.defer(); if (!generator.options['non-interactive']) { @@ -79,7 +84,7 @@ function promptPackage (generator) { * @param {generator} generator The currently active generator. * @returns {generator} The passed generator, for promise chaining. */ -function initializePackage (generator) { +function init (generator) { var fs = generator.fs; // Read package.json @@ -109,13 +114,16 @@ function initializePackage (generator) { * @param {generator} generator The currently active generator. * @returns {generator} The passed generator, for promise chaining. */ -function configurePkg (generator) { +function configure (generator) { projectBuilder.writeFile('package.json', pkgBuilder.toJSON); return generator; } module.exports = { - init: initializePackage, - prompt: promptPackage, - configure: configurePkg + /** @see {@link module:component/pkg~init} */ + init: init, + /** @see {@link module:component/pkg~prompt} */ + prompt: prompt, + /** @see {@link module:component/pkg~configure} */ + configure: configure };