You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

generate-dest

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

generate-dest - npm Package Compare versions

Comparing version
0.1.3
to
0.1.4
+19
-20
generator.js

@@ -10,9 +10,8 @@ /*!

var askWhen = require('ask-when');
var path = require('path');
var isValid = require('is-valid-app');
var path = require('path');
var ask = require('ask-when');
module.exports = function(app, base, env, options) {
if (!isValid(app, 'generate-dest')) return;
app.use(askWhen());

@@ -26,3 +25,3 @@ /**

* ```
* @name dest:prompt-dest
* @name prompt-dest
* @api public

@@ -40,27 +39,27 @@ */

app.question('dest', 'Destination directory?', {default: app.cwd})
.askWhen('dest', {save: false}, function(err, answers) {
if (err) {
next(err);
return;
}
app.question('dest', 'Destination directory?', {default: app.cwd});
ask.when(app, 'dest', {save: false}, function(err, answers) {
if (err) {
next(err);
return;
}
var dest = path.resolve(answers.dest || app.cwd);
base.option('dest', dest);
app.option('dest', dest);
next();
});
var dest = path.resolve(answers.dest || app.cwd);
base.option('dest', dest);
app.option('dest', dest);
next();
});
});
/**
* Alias for the [prompt-dest](#destprompt-dest) task. _(A generator's `default` task
* is run when no specific task name is given. This allows the `prompt-dest` task be
* run with the `gen dest` command)_
* Alias for the [prompt-dest](#prompt-dest) task. _(the `default` task is run when no
* specific task name is given. This allows the `prompt-dest` task be run with the
* `$ gen dest` command)_
*
* ```sh
* $ gen dest:default
* # or
* # aliased as
* $ gen dest
* ```
* @name dest:default
* @name dest
* @api public

@@ -67,0 +66,0 @@ */

{
"name": "generate-dest",
"description": "`Generate` generator that prompts the user for the destination directory to use. Can be used as a sub-generator or plugin in your generator.",
"version": "0.1.3",
"description": "Prompts the user for the destination directory to use. Can be used from the command line when installed globally, or as plugin or sub-generator in your generator.",
"version": "0.1.4",
"homepage": "https://github.com/generate/generate-dest",

@@ -92,3 +92,4 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)",

"verb",
"verb-readme-generator"
"verb-readme-generator",
"base"
],

@@ -95,0 +96,0 @@ "lint": {