add jsdoc to component/nsp

Change-Id: I339b519db3f61b0d44d83c69316ee673fa0e7c46
This commit is contained in:
Yujun Zhang 2016-07-22 11:08:46 +08:00
parent 57029cdeb1
commit e3bbe6840a
1 changed files with 8 additions and 4 deletions

View File

@ -18,6 +18,7 @@
* This module adds the Node Security commandline tool (nsp) to the project.
* Its job is to identify known vulnerabilities by scanning the projects
* source and dependencies.
* @module
*/
'use strict';
@ -42,7 +43,7 @@ function noop (generator) {
* @param {generator} generator The currently active generator.
* @returns {generator} The passed generator, for promise chaining.
*/
function promptNsp (generator) {
function prompt (generator) {
// At this time, we don't actually need to prompt the user.
// Add the dependencies.
@ -58,13 +59,16 @@ function promptNsp (generator) {
* @param {generator} generator The currently active generator.
* @returns {generator} The passed generator, for promise chaining.
*/
function configureNsp (generator) {
function configure (generator) {
projectBuilder.addFile('.nsprc');
return generator;
}
module.exports = {
/** @see {@link module:component/nsp~noop} */
init: noop,
prompt: promptNsp,
configure: configureNsp
/** @see {@link module:component/nsp~prompt} */
prompt: prompt,
/** @see {@link module:component/nsp~configure} */
configure: configure
};