add jsdoc to component/gitignore

Change-Id: I62f50ca36b411ac7fb22334e77d6a7b75c5c1ddd
This commit is contained in:
Yujun Zhang
2016-07-22 11:00:48 +08:00
parent 57029cdeb1
commit a747ec2722

View File

@@ -14,6 +14,11 @@
* under the License. * under the License.
*/ */
/**
* gitignore module
* @module
*/
'use strict'; 'use strict';
var projectBuilder = require('../project_builder'); var projectBuilder = require('../project_builder');
@@ -37,7 +42,7 @@ function noop (generator) {
* @param {generator} generator The currently active generator. * @param {generator} generator The currently active generator.
* @returns {generator} The passed generator, for promise chaining. * @returns {generator} The passed generator, for promise chaining.
*/ */
function initGitignore (generator) { function init (generator) {
var fs = generator.fs; var fs = generator.fs;
// Reinitialize the ignore map. // Reinitialize the ignore map.
@@ -67,7 +72,7 @@ function initGitignore (generator) {
* @param {generator} generator The currently active generator. * @param {generator} generator The currently active generator.
* @returns {generator} The passed generator, for promise chaining. * @returns {generator} The passed generator, for promise chaining.
*/ */
function configureGitIgnore (generator) { function configure (generator) {
var ignoreContent = buildGitignore(); var ignoreContent = buildGitignore();
if (ignoreContent.length === 0) { if (ignoreContent.length === 0) {
// Delete the file if there's nothing to ignore. // Delete the file if there's nothing to ignore.
@@ -97,7 +102,10 @@ function buildGitignore () {
} }
module.exports = { module.exports = {
init: initGitignore, /** @see {@link module:component/gitignore~init} */
init: init,
/** @see {@link module:component/gitignore~noop} */
prompt: noop, prompt: noop,
configure: configureGitIgnore /** @see {@link module:component/gitignore~configure} */
configure: configure
}; };