{"id":20551464,"url":"https://github.com/generate/generate-generator","last_synced_at":"2025-04-14T11:22:06.137Z","repository":{"id":57246095,"uuid":"62818940","full_name":"generate/generate-generator","owner":"generate","description":"Scaffold out a Generate generator project.","archived":false,"fork":false,"pushed_at":"2016-08-30T01:14:06.000Z","size":1665,"stargazers_count":11,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-13T02:03:07.528Z","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":null,"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":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-07-07T15:45:03.000Z","updated_at":"2022-09-13T09:24:44.000Z","dependencies_parsed_at":"2022-08-24T16:10:49.477Z","dependency_job_id":null,"html_url":"https://github.com/generate/generate-generator","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/generate%2Fgenerate-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/generate%2Fgenerate-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/generate%2Fgenerate-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/generate%2Fgenerate-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/generate","download_url":"https://codeload.github.com/generate/generate-generator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248654095,"owners_count":21140236,"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:06.461Z","updated_at":"2025-04-14T11:22:06.107Z","avatar_url":"https://github.com/generate.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\n\u003ca href=\"https://github.com/generate/generate\"\u003e\n\u003cimg height=\"150\" width=\"150\" src=\"https://raw.githubusercontent.com/generate/generate/master/docs/logo.png\"\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\nGenerate a generate generator project, complete with unit tests.\n\n# generate-generator\n\n[![NPM version](https://img.shields.io/npm/v/generate-generator.svg?style=flat)](https://www.npmjs.com/package/generate-generator) [![NPM downloads](https://img.shields.io/npm/dm/generate-generator.svg?style=flat)](https://npmjs.org/package/generate-generator) [![Build Status](https://img.shields.io/travis/generate/generate-generator.svg?style=flat)](https://travis-ci.org/generate/generate-generator)\n\n![generate-generator demo](https://raw.githubusercontent.com/generate/generate-generator/master/docs/demo.gif)\n\n## Table of Contents\n\n- [Tasks](#tasks)\n  * [Running tasks](#running-tasks)\n  * [Available tasks](#available-tasks)\n- [Files trees](#files-trees)\n  * [Generated files](#generated-files)\n  * [Source files](#source-files)\n- [What is \"Generate\"?](#what-is-generate)\n- [Getting started](#getting-started)\n  * [Install](#install)\n  * [Usage](#usage)\n  * [Help](#help)\n- [Next steps](#next-steps)\n  * [Running unit tests](#running-unit-tests)\n  * [Publishing your generator](#publishing-your-generator)\n- [About](#about)\n  * [Related projects](#related-projects)\n  * [Community](#community)\n  * [Contributing](#contributing)\n  * [Running tests](#running-tests)\n  * [Author](#author)\n  * [License](#license)\n\n_(TOC generated by [verb](https://github.com/verbose/verb) using [markdown-toc](https://github.com/jonschlinkert/markdown-toc))_\n\n## Tasks\n\n### Running tasks\n\nTo run a task, just run `$ gen generator:` followed by the name of the task to run. For example, the following command will run the `minimal` task:\n\n```sh\n$ gen generator:minimal\n```\n\n### Available tasks\n\n#### [generator:default](generator.js#L27)\n\nScaffold out a [generate](https://github.com/generate/generate) generator project. Alias for the [generator](#generator) task, to allow running the generator with the following command:\n\n**Example**\n\n```sh\n$ gen generator\n```\n\n#### [generator:minimal](generator.js#L42)\n\nScaffold out a minimal [Generate](https://github.com/generate/generate) generator project.\n\n**Example**\n\n```sh\n$ gen generator:min\n## or\n$ gen generator:minimal\n```\n\n#### [generator:micro](generator.js#L62)\n\nScaffold out a project for a [Generate](https://github.com/generate/generate) micro-generator.\n\n**Example**\n\n```sh\n$ gen generator:micro\n```\n\n#### [generator:file](generator.js#L82)\n\nWrite a `generator.js` file to the current working directory.\n\n**Example**\n\n```sh\n$ gen generator:file\n```\n\n#### [generator:main-micro](generator.js#L94)\n\nWrite the `generator.js` and `index.js` files for a micro-generator.\n\n**Example**\n\n```sh\n$ gen generator:main-micro\n```\n\n#### [generator:rootfiles](generator.js#L106)\n\nGenerate the LICENSE, package.json and README.md files for a generator project.\n\n**Example**\n\n```sh\n$ gen generator:rootfiles\n```\n\n#### [generator:test](generator.js#L123)\n\nWrite a `test.js` file to the current working directory, with unit tests for a [generate](https://github.com/generate/generate) generator.\n\n**Example**\n\n```sh\n$ gen generator:test\n```\n\n#### [generator:templates](generator.js#L136)\n\nGenerate files in the generator's `templates` directory.\n\n**Example**\n\n```sh\n$ gen generator:templates\n```\n\n#### [generator:prompt-git](generator.js#L148)\n\nInitiates a prompt to ask if you'd like to initialize a git repository with first commit.\n\n**Example**\n\n```sh\n$ gen generator:prompt-git\n```\n\n## Files trees\n\nThe following files trees are automatically generated by a task in [verbfile.js](verbfile.js).\n\n* [dest files](#generated-files): trees representing the actual generated \"dest\" files for each task\n* [source files](#source-files): trees representing the source files and templates used by each task\n\n_(See Generate's [customization documentation](https://github.com/generate/generate/blob/master/docs/customization.md) to learn how to override individual templates.)_\n\n### Generated files\n\n\u003e Files generated by each task\n\nDiffs are base on files generated by the `default` task. Note that some tasks generate files that have different contents but the file path is unchanged (for example, the contents of `index.js` differs based on the task). These files won't show in the diff.\n\n#### default\n\nFiles generated by the [default task](#default):\n\n```diff\n .\n ├─┬ test\n │ ├── test.js\n │ └── plugin.js\n ├── .editorconfig\n ├── .eslintrc.json\n ├── .gitattributes\n ├── .gitignore\n ├── .travis.yml\n ├── generator.js\n ├── index.js\n ├── LICENSE\n ├── package.json\n └── README.md\n```\n\n#### micro\n\nFiles generated by the [micro task](#micro):\n\n```diff\n .\n ├─┬ test\n │ ├── test.js\n │ └── plugin.js\n ├── .editorconfig\n ├── .eslintrc.json\n ├── .gitattributes\n ├── .gitignore\n ├── .travis.yml\n ├── generator.js\n ├── index.js\n ├── LICENSE\n ├── package.json\n └── README.md\n```\n\n#### minimal\n\nFiles generated by the [minimal task](#minimal):\n\n```diff\n .\n-├─┬ test\n-│ ├── test.js\n-│ └── plugin.js\n-├── .editorconfig\n-├── .eslintrc.json\n-├── .gitattributes\n ├── .gitignore\n-├── .travis.yml\n ├── generator.js\n ├── index.js\n ├── LICENSE\n ├── package.json\n └── README.md\n```\n\n#### files\n\nFiles generated by the [files task](#files):\n\n```diff\n .\n-├─┬ test\n-│ ├── test.js\n-│ └── plugin.js\n ├── .editorconfig\n ├── .eslintrc.json\n ├── .gitattributes\n ├── .gitignore\n ├── .travis.yml\n-├── generator.js\n-├── index.js\n ├── LICENSE\n ├── package.json\n └── README.md\n```\n\n#### rootfiles\n\nFiles generated by the [rootfiles task](#rootfiles):\n\n```diff\n .\n-├─┬ test\n-│ ├── test.js\n-│ └── plugin.js\n-├── .editorconfig\n-├── .eslintrc.json\n-├── .gitattributes\n-├── .gitignore\n-├── .travis.yml\n-├── generator.js\n-├── index.js\n ├── LICENSE\n ├── package.json\n └── README.md\n```\n\n#### dotfiles\n\nFiles generated by the [dotfiles task](#dotfiles):\n\n```diff\n .\n-├─┬ test\n-│ ├── test.js\n-│ └── plugin.js\n ├── .editorconfig\n ├── .eslintrc.json\n ├── .gitattributes\n ├── .gitignore\n └── .travis.yml\n-├── generator.js\n-├── index.js\n-├── LICENSE\n-├── package.json\n-└── README.md\n```\n\n#### index\n\nFiles generated by the [index task](#index):\n\n```diff\n .\n-├─┬ test\n-│ ├── test.js\n-│ └── plugin.js\n-├── .editorconfig\n-├── .eslintrc.json\n-├── .gitattributes\n-├── .gitignore\n-├── .travis.yml\n-├── generator.js\n └── index.js\n-├── LICENSE\n-├── package.json\n-└── README.md\n```\n\n### Source files\n\n\u003e Source files or templates that are used by each task\n\n#### default\n\nSource files and/or libraries used by the [default task](#default):\n\n```diff\n .\n ├─┬ templates\n │ ├─┬ tests\n │ │ ├── test.js\n │ │ └── plugin.js\n │ ├── generator.js\n │ └── index.js\n └─┬ node_modules\n   ├─┬ generate-editorconfig\n   │ └─┬ templates\n   │   └── _editorconfig\n   ├─┬ generate-eslint\n   │ └─┬ templates\n   │   └── _eslintrc.json\n   ├─┬ generate-gitattributes\n   │ └─┬ templates\n   │   └── _gitattributes\n   ├─┬ generate-gitignore\n   │ └─┬ templates\n   │   └── Minimal.gitignore\n   ├─┬ generate-travis\n   │ └─┬ templates\n   │   └── _travis.yml\n   ├─┬ generate-license\n   │ └─┬ templates\n   │   └── mit.tmpl\n   ├─┬ generate-package\n   │ └─┬ templates\n   │   └── $package.json\n   └─┬ generate-readme\n     └─┬ templates\n       └── node.md\n```\n\n#### micro\n\nSource files and/or libraries used by the [micro task](#micro):\n\n```diff\n .\n ├─┬ templates\n │ ├─┬ tests\n │ │ ├── test.js\n │ │ └── plugin.js\n │ ├── generator-micro.js\n │ └── index.js\n └─┬ node_modules\n   ├─┬ generate-editorconfig\n   │ └─┬ templates\n   │   └── _editorconfig\n   ├─┬ generate-eslint\n   │ └─┬ templates\n   │   └── _eslintrc.json\n   ├─┬ generate-gitattributes\n   │ └─┬ templates\n   │   └── _gitattributes\n   ├─┬ generate-gitignore\n   │ └─┬ templates\n   │   └── Minimal.gitignore\n   ├─┬ generate-travis\n   │ └─┬ templates\n   │   └── _travis.yml\n   ├─┬ generate-license\n   │ └─┬ templates\n   │   └── mit.tmpl\n   ├─┬ generate-package\n   │ └─┬ templates\n   │   └── $package.json\n   └─┬ generate-readme\n     └─┬ templates\n       └── node.md\n```\n\n#### minimal\n\nSource files and/or libraries used by the [minimal task](#minimal):\n\n```diff\n .\n ├─┬ node_modules\n │ ├─┬ generate-gitignore\n │ │ └─┬ templates\n │ │   └── Node.gitignore\n │ ├─┬ generate-license\n │ │ └─┬ templates\n │ │   └── mit.tmpl\n │ ├─┬ generate-package\n │ │ └─┬ templates\n │ │   └── $package.json\n │ └─┬ generate-readme\n │   └─┬ templates\n │     └── node.md\n └─┬ templates\n   ├── generator.js\n   └── index.js\n```\n\n#### files\n\nSource files and/or libraries used by the [files task](#files):\n\n```diff\n .\n └─┬ node_modules\n   ├─┬ generate-editorconfig\n   │ └─┬ templates\n   │   └── _editorconfig\n   ├─┬ generate-eslint\n   │ └─┬ templates\n   │   └── _eslintrc.json\n   ├─┬ generate-gitattributes\n   │ └─┬ templates\n   │   └── _gitattributes\n   ├─┬ generate-gitignore\n   │ └─┬ templates\n   │   └── Minimal.gitignore\n   ├─┬ generate-travis\n   │ └─┬ templates\n   │   └── _travis.yml\n   ├─┬ generate-license\n   │ └─┬ templates\n   │   └── mit.tmpl\n   ├─┬ generate-package\n   │ └─┬ templates\n   │   └── $package.json\n   └─┬ generate-readme\n     └─┬ templates\n       └── node.md\n```\n\n#### rootfiles\n\nSource files and/or libraries used by the [rootfiles task](#rootfiles):\n\n```diff\n .\n └─┬ node_modules\n   ├─┬ generate-license\n   │ └─┬ templates\n   │   └── mit.tmpl\n   ├─┬ generate-package\n   │ └─┬ templates\n   │   └── $package.json\n   └─┬ generate-readme\n     └─┬ templates\n       └── node.md\n```\n\n#### dotfiles\n\nSource files and/or libraries used by the [dotfiles task](#dotfiles):\n\n```diff\n .\n └─┬ node_modules\n   ├─┬ generate-editorconfig\n   │ └─┬ templates\n   │   └── _editorconfig\n   ├─┬ generate-eslint\n   │ └─┬ templates\n   │   └── _eslintrc.json\n   ├─┬ generate-gitattributes\n   │ └─┬ templates\n   │   └── _gitattributes\n   ├─┬ generate-gitignore\n   │ └─┬ templates\n   │   └── Minimal.gitignore\n   └─┬ generate-travis\n     └─┬ templates\n       └── _travis.yml\n```\n\n#### index\n\nSource files and/or libraries used by the [index task](#index):\n\n```diff\n .\n └─┬ node_modules\n   └─┬ generate-project\n     └─┬ templates\n       └── index.js\n```\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).\n\nAnswers 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\n**For more information**:\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## Getting started\n\n### Install\n\n**Installing the CLI**\n\nTo run the `generator` generator from the command line, you'll need to install [Generate](https://github.com/generate/generate) globally first. You can do that now with the following command:\n\n```sh\n$ npm install --global generate\n```\n\nThis adds the `gen` command to your system path, allowing it to be run from any directory.\n\n**Install generate-generator**\n\nInstall this module with the following command:\n\n```sh\n$ npm install --global generate-generator\n```\n\n### Usage\n\nRun this generator's `default` [task](https://github.com/generate/generate/blob/master/docs/tasks.md#default) with the following command:\n\n```sh\n$ gen generator\n```\n\n**What you should see in the terminal**\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### Help\n\nTo see a general help menu and available commands for Generate's CLI, run:\n\n```sh\n$ gen help\n```\n\n## Next steps\n\n### Running unit tests\n\nIt's never too early to begin running unit tests. When you're ready to get started, the following command will ensure the project's dependencies are installed then run all of the unit tests:\n\n```sh\n$ npm install \u0026\u0026 test\n```\n\n### Publishing your generator\n\nIf you're tests are passing and you're ready to publish your generator to [npm](https://www.npmjs.com), you can do that now with the following command:\n\n**Are you sure you're ready?!**\n\nLet's go!\n\n```sh\n$ npm publish\n```\n\n## About\n\n### Related projects\n\n[generate](https://www.npmjs.com/package/generate): Command line tool and developer framework for scaffolding out new GitHub projects. Generate offers the… [more](https://github.com/generate/generate) | [homepage](https://github.com/generate/generate \"Command line tool and developer framework for scaffolding out new GitHub projects. Generate offers the robustness and configurability of Yeoman, the expressiveness and simplicity of Slush, and more powerful flow control and composability than either.\")\n\n### Community\n\nAre you using [Generate](https://github.com/generate/generate) in your project? Have you published a [generator](https://github.com/generate/generate/blob/master/docs/generators.md) and want to share your project with the world?\n\nHere are some suggestions!\n\n* If you get like Generate and want to tweet about it, please feel free to mention `@generatejs` or use the `#generatejs` hashtag\n* Show your love by starring [Generate](https://github.com/generate/generate) and `generate-generator`\n* Get implementation help on [StackOverflow](http://stackoverflow.com/questions/tagged/generate) (please use the `generatejs` tag in questions)\n* **Gitter** Discuss Generate with us on [Gitter](https://gitter.im/generate/generate)\n* If you publish an generator, thank you! To make your project as discoverable as possible, please add the keyword `generategenerator` to package.json.\n\n### Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\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.\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.30, on August 18, 2016._","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenerate%2Fgenerate-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgenerate%2Fgenerate-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenerate%2Fgenerate-generator/lists"}