{"id":20551468,"url":"https://github.com/generate/generate-dest","last_synced_at":"2025-04-14T11:23:50.962Z","repository":{"id":57246078,"uuid":"60215387","full_name":"generate/generate-dest","owner":"generate","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.","archived":false,"fork":false,"pushed_at":"2016-07-09T02:55:18.000Z","size":16,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-13T02:03:07.475Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/generate.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-06-01T22:37:13.000Z","updated_at":"2022-09-13T09:23:23.000Z","dependencies_parsed_at":"2022-08-24T16:31:36.918Z","dependency_job_id":null,"html_url":"https://github.com/generate/generate-dest","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/generate%2Fgenerate-dest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/generate%2Fgenerate-dest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/generate%2Fgenerate-dest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/generate%2Fgenerate-dest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/generate","download_url":"https://codeload.github.com/generate/generate-dest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248869528,"owners_count":21174892,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T02:31:07.364Z","updated_at":"2025-04-14T11:23:50.938Z","avatar_url":"https://github.com/generate.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# generate-dest [![NPM version](https://img.shields.io/npm/v/generate-dest.svg?style=flat)](https://www.npmjs.com/package/generate-dest) [![NPM downloads](https://img.shields.io/npm/dm/generate-dest.svg?style=flat)](https://npmjs.org/package/generate-dest) [![Build Status](https://img.shields.io/travis/generate/generate-dest.svg?style=flat)](https://travis-ci.org/generate/generate-dest)\n\nPrompts 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.\n\n## What is generate?\n\nGenerate is a command line tool and developer framework for scaffolding out new GitHub projects using [generators](https://github.com/generate/generate/blob/master/docs/){generators.md} and [tasks](https://github.com/generate/generate/blob/master/docs/){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](http://gulpjs.com), [base](https://github.com/node-base/base) and [assemble](https://github.com/assemble/assemble) plugins, and much more.\n\nFor more information about Generate:\n\n* Visit the [generate project](https://github.com/generate/generate)\n* Visit the [generate documentation](https://github.com/generate/generate/blob/master/docs/)\n* Find [generators on npm](https://www.npmjs.com/browse/keyword/generate-generator) (help us [author generators](https://github.com/generate/generate/blob/master/docs/){micro-generators.md})\n\n## Quickstart\n\n### CLI usage\n\nInstall globally with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --global generate-dest\n```\n\nYou should now be able to run this generator's [default task](#default) with the `gen git` command. See all avallable [tasks](#tasks)\n\n### API usage\n\n**Use as a plugin**\n\nExtend your own generator with the settings and features of generate-dest:\n\n```js\nmodule.exports = function(app) {\n  app.use(require('generate-dest'));\n};\n```\n\n**Use as a sub-generator**\n\nAdd this generator to a namespace in your generator:\n\n```js\nmodule.exports = function(app) {\n  // you can use any arbitrary name to register the generator\n  app.register('dest', require('generate-dest'));\n};\n```\n\nSee the [API docs](#api) for more detailed examples and descriptions.\n\n## CLI\n\n**Help**\n\nGet general help and a menu of available commands:\n\n```sh\n$ gen help\n```\n\n**Running the `dest` generator**\n\nOnce both [generate](https://github.com/generate/generate) and `generate-dest` are installed globally, you can run the generator with the following command:\n\n```sh\n$ gen dest\n```\n\nIf completed successfully, you should see both `starting` and `finished` events in the terminal, like the following:\n\n```sh\n[00:44:21] starting ...\n...\n[00:44:22] finished ✔\n```\n\nIf you do not see one or both of those events, please [let us know about it](../../issues).\n\n## Tasks\n\nThe following tasks are registered on the `dest` generator.\n\n#### [prompt-dest](generator.js#L28)\n\nPrompts 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.\n\n**Example**\n\n```sh\n$ gen dest:prompt-dest\n```\n\n#### [dest](generator.js#L65)\n\nAlias 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)_\n\n**Example**\n\n```sh\n$ gen dest:default\n# aliased as\n$ gen dest\n```\n\n## API\n\n### Install locally\n\nIf 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:\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save generate-dest\n```\n\n### Use as a plugin\n\nUse as a [plugin](https://github.com/generate/generate/blob/master/docs/plugins.md) 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:\n\n```js\nmodule.exports = function(app) {\n  app.use(require('generate-dest'));\n};\n```\n\nVisit Generate's [plugin docs](https://github.com/generate/generate/blob/master/docs/plugins.md) to learn more about plugins.\n\n### Use as a sub-generator\n\nUse as a [sub-generator](https://github.com/generate/generate/blob/master/docs/generators.md) if you want to add `generate-dest` to a  _namespace_ in your generator:\n\n```js\nmodule.exports = function(app) {\n  // register the generate-dest with whatever name you want\n  app.register('foo', require('generate-dest'));\n};\n```\n\nVisit Generate's [sub-generator docs](https://github.com/generate/generate/blob/master/docs/sub-generators.md) to learn more about sub-generators.\n\n## Related projects\n\nYou might also be interested in these projects:\n\n* [generate](https://www.npmjs.com/package/generate): Generate is a command line tool and developer framework for scaffolding out new GitHub projects… [more](https://github.com/generate/generate) | [homepage](https://github.com/generate/generate \"Generate is a command line tool and developer framework for scaffolding out new GitHub projects. Generators are easy to create and combine. Answers to prompts and the user's environment can be used to determine the templates, directories, files and contents to build. Support for gulp, assemble and Base plugins.\")\n* [generate-file](https://www.npmjs.com/package/generate-file): Generator for generating a single file from a template. | [homepage](https://github.com/generate/generate-file \"Generator for generating a single file from a template.\")\n* [generate-node](https://www.npmjs.com/package/generate-node): Generate a node.js project, with everything you need to begin writing code and easily publish… [more](https://github.com/generate/generate-node) | [homepage](https://github.com/generate/generate-node \"Generate a node.js project, with everything you need to begin writing code and easily publish the project to npm.\")\n\n## Contributing\n\nThis document was generated by [verb-readme-generator](https://github.com/verbose/verb-readme-generator) (a [verb](https://github.com/verbose/verb) generator), please don't edit directly. Any changes to the readme must be made in [.verb.md](.verb.md). See [Building Docs](#building-docs).\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\nOr visit the [verb-readme-generator](https://github.com/verbose/verb-readme-generator) project to submit bug reports or pull requests for the readme layout template.\n\n## Building docs\n\n_(This document was generated by [verb-readme-generator](https://github.com/verbose/verb-readme-generator) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_\n\nGenerate readme and API documentation with [verb](https://github.com/verbose/verb):\n\n```sh\n$ npm install -g verb verb-readme-generator \u0026\u0026 verb\n```\n\n## Running tests\n\nInstall dev dependencies:\n\n```sh\n$ npm install -d \u0026\u0026 npm test\n```\n\n## Author\n\n**Jon Schlinkert**\n\n* [github/jonschlinkert](https://github.com/jonschlinkert)\n* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)\n\n## License\n\nCopyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT license](https://github.com/generate/generate-dest/blob/master/LICENSE).\n\n***\n\n_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on July 08, 2016._","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenerate%2Fgenerate-dest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgenerate%2Fgenerate-dest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenerate%2Fgenerate-dest/lists"}