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.
Generate is a command line tool and developer framework for scaffolding out new GitHub projects using generators{generators.md} and tasks{tasks.md}. Answers to prompts and the user's environment can be used to determine the templates, directories, files and contents to build. Support for gulp, base and assemble plugins, and much more.
For more information about Generate:
- Visit the generate project
- Visit the generate documentation
- Find generators on npm (help us author generators{micro-generators.md})
Install globally with npm:
$ npm install --global generate-destYou should now be able to run this generator's default task with the gen git command. See all avallable tasks
Use as a plugin
Extend your own generator with the settings and features of generate-dest:
module.exports = function(app) {
app.use(require('generate-dest'));
};Use as a sub-generator
Add this generator to a namespace in your generator:
module.exports = function(app) {
// you can use any arbitrary name to register the generator
app.register('dest', require('generate-dest'));
};See the API docs for more detailed examples and descriptions.
Help
Get general help and a menu of available commands:
$ gen helpRunning the dest generator
Once both generate and generate-dest are installed globally, you can run the generator with the following command:
$ gen destIf completed successfully, you should see both starting and finished events in the terminal, like the following:
[00:44:21] starting ...
...
[00:44:22] finished ✔If you do not see one or both of those events, please let us know about it.
The following tasks are registered on the dest generator.
Prompts the user for the destination directory to use for writing files to the file system. If app.options.dest is already defined, the task is skipped.
Example
$ gen dest:prompt-destAlias for the 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)
Example
$ gen dest:default
# aliased as
$ gen destIf you want to use generate-dest as a plugin or sub-generator to extend the features and settings in your own generator, you must first install it locally:
Install with npm:
$ npm install --save generate-destUse as a plugin if you want to extend your own generator with the features, settings and tasks of generate-dest, as if they were created on your generator:
module.exports = function(app) {
app.use(require('generate-dest'));
};Visit Generate's plugin docs to learn more about plugins.
Use as a sub-generator if you want to add generate-dest to a namespace in your generator:
module.exports = function(app) {
// register the generate-dest with whatever name you want
app.register('foo', require('generate-dest'));
};Visit Generate's sub-generator docs to learn more about sub-generators.
You might also be interested in these projects:
- generate: Generate is a command line tool and developer framework for scaffolding out new GitHub projects… more | homepage
- generate-file: Generator for generating a single file from a template. | homepage
- generate-node: Generate a node.js project, with everything you need to begin writing code and easily publish… more | homepage
This document was generated by verb-readme-generator (a verb generator), please don't edit directly. Any changes to the readme must be made in .verb.md. See Building Docs.
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Or visit the verb-readme-generator project to submit bug reports or pull requests for the readme layout template.
(This document was generated by verb-readme-generator (a verb generator), please don't edit the readme directly. Any changes to the readme must be made in .verb.md.)
Generate readme and API documentation with verb:
$ npm install -g verb verb-readme-generator && verbInstall dev dependencies:
$ npm install -d && npm testJon Schlinkert
Copyright © 2016, Jon Schlinkert. Released under the MIT license.
This file was generated by verb, v0.9.0, on July 08, 2016.