├── .editorconfig ├── .eslintignore ├── .eslintrc.json ├── .gitattributes ├── .github └── contributing.md ├── .gitignore ├── .travis.yml ├── .verb.md ├── LICENSE ├── README.md ├── docs ├── demo.gif └── resources.md ├── generator.js ├── index.js ├── package.json ├── templates ├── contributing.md ├── issue_template.md ├── issue_template_basic.md ├── issue_template_detailed.md ├── pull_request_template-checklist.md ├── pull_request_template.md └── pull_request_template_detailed.md └── test └── test.js /.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org/ 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | end_of_line = lf 7 | indent_size = 2 8 | indent_style = space 9 | insert_final_newline = true 10 | trim_trailing_whitespace = true 11 | 12 | [{**/{actual,fixtures,expected,templates}/**,*.md}] 13 | trim_trailing_whitespace = false 14 | insert_final_newline = false 15 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | /actual/** 2 | /build/** 3 | /conf/** 4 | /coverage/** 5 | /docs/** 6 | /fixtures/** 7 | /jsdoc/** 8 | /templates/** 9 | /tests/actual/** 10 | /tests/bench/** 11 | /tests/fixtures/** 12 | /tests/performance/** 13 | /tmp/** 14 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": false, 4 | "es6": true, 5 | "node": true, 6 | "mocha": true 7 | }, 8 | 9 | "globals": { 10 | "document": false, 11 | "navigator": false, 12 | "window": false 13 | }, 14 | 15 | "rules": { 16 | "accessor-pairs": 2, 17 | "arrow-spacing": [2, { "before": true, "after": true }], 18 | "block-spacing": [2, "always"], 19 | "brace-style": [2, "1tbs", { "allowSingleLine": true }], 20 | "comma-dangle": [2, "never"], 21 | "comma-spacing": [2, { "before": false, "after": true }], 22 | "comma-style": [2, "last"], 23 | "constructor-super": 2, 24 | "curly": [2, "multi-line"], 25 | "dot-location": [2, "property"], 26 | "eol-last": 2, 27 | "eqeqeq": [2, "allow-null"], 28 | "generator-star-spacing": [2, { "before": true, "after": true }], 29 | "handle-callback-err": [2, "^(err|error)$" ], 30 | "indent": [2, 2, { "SwitchCase": 1 }], 31 | "key-spacing": [2, { "beforeColon": false, "afterColon": true }], 32 | "keyword-spacing": [2, { "before": true, "after": true }], 33 | "new-cap": [2, { "newIsCap": true, "capIsNew": false }], 34 | "new-parens": 2, 35 | "no-array-constructor": 2, 36 | "no-caller": 2, 37 | "no-class-assign": 2, 38 | "no-cond-assign": 2, 39 | "no-const-assign": 2, 40 | "no-control-regex": 2, 41 | "no-debugger": 2, 42 | "no-delete-var": 2, 43 | "no-dupe-args": 2, 44 | "no-dupe-class-members": 2, 45 | "no-dupe-keys": 2, 46 | "no-duplicate-case": 2, 47 | "no-empty-character-class": 2, 48 | "no-eval": 2, 49 | "no-ex-assign": 2, 50 | "no-extend-native": 2, 51 | "no-extra-bind": 2, 52 | "no-extra-boolean-cast": 2, 53 | "no-extra-parens": [2, "functions"], 54 | "no-fallthrough": 2, 55 | "no-floating-decimal": 2, 56 | "no-func-assign": 2, 57 | "no-implied-eval": 2, 58 | "no-inner-declarations": [2, "functions"], 59 | "no-invalid-regexp": 2, 60 | "no-irregular-whitespace": 2, 61 | "no-iterator": 2, 62 | "no-label-var": 2, 63 | "no-labels": 2, 64 | "no-lone-blocks": 2, 65 | "no-mixed-spaces-and-tabs": 2, 66 | "no-multi-spaces": 2, 67 | "no-multi-str": 2, 68 | "no-multiple-empty-lines": [2, { "max": 1 }], 69 | "no-native-reassign": 0, 70 | "no-negated-in-lhs": 2, 71 | "no-new": 2, 72 | "no-new-func": 2, 73 | "no-new-object": 2, 74 | "no-new-require": 2, 75 | "no-new-wrappers": 2, 76 | "no-obj-calls": 2, 77 | "no-octal": 2, 78 | "no-octal-escape": 2, 79 | "no-proto": 0, 80 | "no-redeclare": 2, 81 | "no-regex-spaces": 2, 82 | "no-return-assign": 2, 83 | "no-self-compare": 2, 84 | "no-sequences": 2, 85 | "no-shadow-restricted-names": 2, 86 | "no-spaced-func": 2, 87 | "no-sparse-arrays": 2, 88 | "no-this-before-super": 2, 89 | "no-throw-literal": 2, 90 | "no-trailing-spaces": 0, 91 | "no-undef": 2, 92 | "no-undef-init": 2, 93 | "no-unexpected-multiline": 2, 94 | "no-unneeded-ternary": [2, { "defaultAssignment": false }], 95 | "no-unreachable": 2, 96 | "no-unused-vars": [2, { "vars": "all", "args": "none" }], 97 | "no-useless-call": 0, 98 | "no-with": 2, 99 | "one-var": [0, { "initialized": "never" }], 100 | "operator-linebreak": [0, "after", { "overrides": { "?": "before", ":": "before" } }], 101 | "padded-blocks": [0, "never"], 102 | "quotes": [2, "single", "avoid-escape"], 103 | "radix": 2, 104 | "semi": [2, "always"], 105 | "semi-spacing": [2, { "before": false, "after": true }], 106 | "space-before-blocks": [2, "always"], 107 | "space-before-function-paren": [2, "never"], 108 | "space-in-parens": [2, "never"], 109 | "space-infix-ops": 2, 110 | "space-unary-ops": [2, { "words": true, "nonwords": false }], 111 | "spaced-comment": [0, "always", { "markers": ["global", "globals", "eslint", "eslint-disable", "*package", "!", ","] }], 112 | "use-isnan": 2, 113 | "valid-typeof": 2, 114 | "wrap-iife": [2, "any"], 115 | "yoda": [2, "never"] 116 | } 117 | } 118 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Enforce Unix newlines 2 | * text eol=lf 3 | 4 | # binaries 5 | *.ai binary 6 | *.psd binary 7 | *.jpg binary 8 | *.gif binary 9 | *.png binary 10 | *.jpeg binary 11 | -------------------------------------------------------------------------------- /.github/contributing.md: -------------------------------------------------------------------------------- 1 | # Contributing to generate-contributing 2 | 3 | First and foremost, thank you! We appreciate that you want to contribute to generate-contributing, your time is valuable, and your contributions mean a lot to us. 4 | 5 | ## Important! 6 | 7 | By contributing to this project, you: 8 | 9 | * Agree that you have authored 100% of the content 10 | * Agree that you have the necessary rights to the content 11 | * Agree that you have received the necessary permissions from your employer to make the contributions (if applicable) 12 | * Agree that the content you contribute may be provided under the Project license(s) 13 | 14 | ## Getting started 15 | 16 | **What does "contributing" mean?** 17 | 18 | Creating an issue is the simplest form of contributing to a project. But there are many ways to contribute, including the following: 19 | 20 | - Updating or correcting documentation 21 | - Feature requests 22 | - Bug reports 23 | 24 | If you'd like to learn more about contributing in general, the [Guide to Idiomatic Contributing](https://github.com/jonschlinkert/idiomatic-contributing) has a lot of useful information. 25 | 26 | **Showing support for generate-contributing** 27 | 28 | Please keep in mind that open source software is built by people like you, who spend their free time creating things the rest the community can use. 29 | 30 | Don't have time to contribute? No worries, here are some other ways to show your support for generate-contributing: 31 | 32 | - star the [project](https://github.com/generate/generate-contributing) 33 | - tweet your support for generate-contributing 34 | 35 | ## Issues 36 | 37 | ### Before creating an issue 38 | 39 | Please try to determine if the issue is caused by an underlying library, and if so, create the issue there. Sometimes this is difficult to know. We only ask that you attempt to give a reasonable attempt to find out. Oftentimes the readme will have advice about where to go to create issues. 40 | 41 | Try to follow these guidelines 42 | 43 | - **Avoid creating issues for implementation help**. It's much better for discoverability, SEO, and semantics - to keep the issue tracker focused on bugs and feature requests - to ask implementation-related questions on [stackoverflow.com][so] 44 | - **Investigate the issue**: 45 | - **Check the readme** - oftentimes you will find notes about creating issues, and where to go depending on the type of issue. 46 | - Create the issue in the appropriate repository. 47 | 48 | ### Creating an issue 49 | 50 | Please be as descriptive as possible when creating an issue. Give us the information we need to successfully answer your question or address your issue by answering the following in your issue: 51 | 52 | - **version**: please note the version of generate-contributing are you using 53 | - **extensions, plugins, helpers, etc** (if applicable): please list any extensions you're using 54 | - **error messages**: please paste any error messages into the issue, or a [gist](https://gist.github.com/) 55 | 56 | ### Closing issues 57 | 58 | The original poster or the maintainer's of generate-contributing may close an issue at any time. Typically, but not exclusively, issues are closed when: 59 | 60 | - The issue is resolved 61 | - The project's maintainers have determined the issue is out of scope 62 | - An issue is clearly a duplicate of another issue, in which case the duplicate issue will be linked. 63 | - A discussion has clearly run its course 64 | 65 | 66 | ## Next steps 67 | 68 | **Tips for creating idiomatic issues** 69 | 70 | Spending just a little extra time to review best practices and brush up on your contributing skills will, at minimum, make your issue easier to read, easier to resolve, and more likely to be found by others who have the same or similar issue in the future. At best, it will open up doors and potential career opportunities by helping you be at your best. 71 | 72 | The following resources were hand-picked to help you be the most effective contributor you can be: 73 | 74 | - The [Guide to Idiomatic Contributing](https://github.com/jonschlinkert/idiomatic-contributing) is a great place for newcomers to start, but there is also information for experienced contributors there. 75 | - Take some time to learn basic markdown. We can't stress this enough. Don't start pasting code into GitHub issues before you've taken a moment to review this [markdown cheatsheet](https://gist.github.com/jonschlinkert/5854601) 76 | - The GitHub guide to [basic markdown](https://help.github.com/articles/markdown-basics/) is another great markdown resource. 77 | - Learn about [GitHub Flavored Markdown](https://help.github.com/articles/github-flavored-markdown/). And if you want to really go above and beyond, read [mastering markdown](https://guides.github.com/features/mastering-markdown/). 78 | 79 | At the very least, please try to: 80 | 81 | - Use backticks to wrap code. This ensures that it retains its formatting and isn't modified when it's rendered by GitHub, and makes the code more readable to others 82 | - When applicable, use syntax highlighting by adding the correct language name after the first "code fence" 83 | 84 | 85 | [so]: http://stackoverflow.com/questions/tagged/generate-contributing 86 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # always ignore files 2 | *.DS_Store 3 | .idea 4 | .vscode 5 | *.sublime-* 6 | 7 | # test related, or directories generated by tests 8 | test/actual 9 | actual 10 | coverage 11 | .nyc* 12 | 13 | # npm 14 | node_modules 15 | npm-debug.log 16 | 17 | # yarn 18 | yarn.lock 19 | yarn-error.log 20 | 21 | # misc 22 | _gh_pages 23 | _draft 24 | _drafts 25 | bower_components 26 | vendor 27 | temp 28 | tmp 29 | TODO.md 30 | package-lock.json -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | os: 3 | - linux 4 | - osx 5 | language: node_js 6 | node_js: 7 | - node 8 | - '9' 9 | - '8' 10 | - '7' 11 | - '6' 12 | matrix: 13 | allow_failures: 14 | - node_js: '5' 15 | - node_js: '4' 16 | - node_js: '0.8' 17 | - node_js: '0.12' 18 | - node_js: '0.10' 19 | fast_finish: true 20 | -------------------------------------------------------------------------------- /.verb.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016-2018, Jon Schlinkert. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 | 4 | 5 | 6 |

7 | 8 | Generate a contributing.md, issue_template.md, or pull_request_template.md file for a project. Can be generated from the command line when Generate is installed globally, or as a plugin inside another generator. 9 | 10 | # generate-contributing 11 | 12 | [![NPM version](https://img.shields.io/npm/v/generate-contributing.svg?style=flat)](https://www.npmjs.com/package/generate-contributing) [![NPM monthly downloads](https://img.shields.io/npm/dm/generate-contributing.svg?style=flat)](https://npmjs.org/package/generate-contributing) [![Build Status](https://img.shields.io/travis/generate/generate-contributing.svg?style=flat)](https://travis-ci.org/generate/generate-contributing) 13 | 14 | ![generate-contributing demo](https://raw.githubusercontent.com/generate/generate-contributing/master/docs/demo.gif) 15 | 16 | - [Getting started](#getting-started) 17 | * [Install](#install) 18 | * [CLI](#cli) 19 | * [Help](#help) 20 | - [Available tasks](#available-tasks) 21 | * [contributing](#contributing) 22 | * [contributing:it](#contributingit) 23 | * [contributing:itb](#contributingitb) 24 | * [contributing:itd](#contributingitd) 25 | * [contributing:pr](#contributingpr) 26 | * [contributing:prd](#contributingprd) 27 | - [Next steps](#next-steps) 28 | * [Running unit tests](#running-unit-tests) 29 | * [Publishing your generator](#publishing-your-generator) 30 | - [About](#about) 31 | * [What is "Generate"?](#what-is-generate) 32 | * [Related projects](#related-projects) 33 | * [Community](#community) 34 | * [Contributors](#contributors) 35 | * [Contributing](#contributing) 36 | * [Running tests](#running-tests) 37 | * [Author](#author) 38 | * [License](#license) 39 | 40 | _(TOC generated by [verb](https://github.com/verbose/verb) using [markdown-toc](https://github.com/jonschlinkert/markdown-toc))_ 41 | 42 | ## Getting started 43 | 44 | ### Install 45 | 46 | **Installing the CLI** 47 | 48 | To run the `readme` generator from the command line, you'll need to install [Generate][] globally first. You can do that now with the following command: 49 | 50 | ```sh 51 | $ npm install --global generate 52 | ``` 53 | 54 | This adds the `gen` command to your system path, allowing it to be run from any directory. 55 | 56 | **Install generate-contributing** 57 | 58 | Install this module with the following command: 59 | 60 | ```sh 61 | $ npm install --global generate-contributing 62 | ``` 63 | 64 | ### CLI 65 | 66 | Run this generator's `default` [task](https://github.com/generate/generate/blob/master/docs/tasks.md#default) with the following command: 67 | 68 | ```sh 69 | $ gen readme 70 | ``` 71 | 72 | **What you should see in the terminal** 73 | 74 | If completed successfully, you should see both `starting` and `finished` events in the terminal, like the following: 75 | 76 | ```sh 77 | [00:44:21] starting ... 78 | ... 79 | [00:44:22] finished ✔ 80 | ``` 81 | 82 | If you do not see one or both of those events, please [let us know about it](../../issues). 83 | 84 | ### Help 85 | 86 | To see a general help menu and available commands for Generate's CLI, run: 87 | 88 | ```sh 89 | $ gen help 90 | ``` 91 | 92 | ## Available tasks 93 | 94 | All available tasks for this generator. 95 | 96 | ### [contributing](generator.js#L26) 97 | 98 | Generate a `contributing.md` file. 99 | 100 | **Example** 101 | 102 | ```sh 103 | $ gen contributing 104 | $ gen contributing --dest ./docs 105 | ``` 106 | 107 | ### [contributing:it](generator.js#L42) 108 | 109 | Generate an `issue_template.md` file to the `.github/` directory, or specified `--dest`. 110 | 111 | **Example** 112 | 113 | ```sh 114 | $ gen contributing:it 115 | $ gen contributing:it --dest ./docs 116 | # also aliased as the following (mostly for API usage) 117 | $ gen contributing:issue_template 118 | ``` 119 | 120 | ### [contributing:itb](generator.js#L59) 121 | 122 | Generate a bare bones `issue_template.md` file to the `.github/` directory, or specified `--dest`. Uses [this template](templates/issue_template_basic.md). 123 | 124 | **Example** 125 | 126 | ```sh 127 | $ gen contributing:itb 128 | $ gen contributing:itb --dest ./docs 129 | # also aliased as the following (mostly for API usage) 130 | $ gen contributing:issue_template_detailed 131 | ``` 132 | 133 | ### [contributing:itd](generator.js#L76) 134 | 135 | Generate a detailed `issue_template.md` file to the `.github/` directory, or specified `--dest`. Uses [this template](templates/issue_template_detailed.md) 136 | 137 | **Example** 138 | 139 | ```sh 140 | $ gen contributing:itd 141 | $ gen contributing:itd --dest ./docs 142 | # also aliased as the following (mostly for API usage) 143 | $ gen contributing:issue_template_detailed 144 | ``` 145 | 146 | ### [contributing:pr](generator.js#L93) 147 | 148 | Generate a `pull_request_template.md` file to the `.github/` directory, or specified `--dest`. Uses [this template](templates/pull_request_template.md). 149 | 150 | **Example** 151 | 152 | ```sh 153 | $ gen contributing:pr 154 | $ gen contributing:pr --dest ./docs 155 | # also aliased as the following (mostly for API usage) 156 | $ gen contributing:pr_template 157 | ``` 158 | 159 | ### [contributing:prd](generator.js#L110) 160 | 161 | Generate a detailed `pull_request_template.md` file to the `.github/` directory, or specified `--dest`. Uses [this template](templates/pull_request_template_detailed.md). 162 | 163 | **Example** 164 | 165 | ```sh 166 | $ gen contributing:prd 167 | $ gen contributing:prd --dest ./docs 168 | # also aliased as the following (for API usage, when it helps to be explicit in code) 169 | $ gen contributing:pr_template_detailed 170 | ``` 171 | 172 | Visit Generate's [documentation for tasks](https://github.com/generate/generate/blob/master/docs/tasks.md). 173 | 174 | ## Next steps 175 | 176 | ### Running unit tests 177 | 178 | It'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: 179 | 180 | ```sh 181 | $ npm install && test 182 | ``` 183 | 184 | ### Publishing your generator 185 | 186 | If 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: 187 | 188 | **Are you sure you're ready?!** 189 | 190 | Let's go! 191 | 192 | ```sh 193 | $ npm publish 194 | ``` 195 | 196 | ## About 197 | 198 | ### What is "Generate"? 199 | 200 | Generate 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). 201 | 202 | 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. 203 | 204 | **For more information**: 205 | 206 | * Visit the [generate project](https://github.com/generate/generate/) 207 | * Visit the [generate documentation](https://github.com/generate/generate/blob/master/docs/) 208 | * 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)) 209 | 210 | ### Related projects 211 | 212 | * [generate-eslint](https://www.npmjs.com/package/generate-eslint): Generate a new `.eslintrc.json` or `.eslintignore` file from a pre-defined or user-defined template. Can be… [more](https://github.com/generate/generate-eslint) | [homepage](https://github.com/generate/generate-eslint "Generate a new `.eslintrc.json` or `.eslintignore` file from a pre-defined or user-defined template. Can be used from the command line when installed globally, or as a plugin in your own generator.") 213 | * [generate-license](https://www.npmjs.com/package/generate-license): Generate a license file. Choose any of the licenses supported by https://github.com/github/choosealicense.com. | [homepage](https://github.com/generate/generate-license "Generate a license file. Choose any of the licenses supported by https://github.com/github/choosealicense.com.") 214 | * [generate-project](https://www.npmjs.com/package/generate-project): Scaffold out complete code projects from the command line, or use this generator as a… [more](https://github.com/generate/generate-project) | [homepage](https://github.com/generate/generate-project "Scaffold out complete code projects from the command line, or use this generator as a plugin in other generators to provide baseline functionality.") 215 | * [generate-travis](https://www.npmjs.com/package/generate-travis): Generate a .travis.yml file to the cwd or specified directory. Install globally and run with… [more](https://github.com/generate/generate-travis) | [homepage](https://github.com/generate/generate-travis "Generate a .travis.yml file to the cwd or specified directory. Install globally and run with generate's CLI, or use as a component in your own generator.") 216 | 217 | ### Community 218 | 219 | Bigger community means more plugins, better support and more progress. Help us make Generate better by spreading the word: 220 | 221 | * Show your love by starring the project 222 | * Tweet about Generate. Mention using `@generatejs`, or use the `#generatejs` hashtag 223 | * Get implementation help on [StackOverflow](http://stackoverflow.com/questions/tagged/generate) with the `generatejs` tag 224 | * Discuss Generate with us on [Gitter](https://gitter.im/generate/generate) 225 | * If you publish a generator, to make your project as discoverable as possible, please add the unique keyword `generategenerator` to your project's package.json. 226 | 227 | ### Contributors 228 | 229 | | **Commits** | **Contributor** | 230 | | --- | --- | 231 | | 30 | [jonschlinkert](https://github.com/jonschlinkert) | 232 | | 3 | [pointnet](https://github.com/pointnet) | 233 | 234 | ### Contributing 235 | 236 | Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). 237 | 238 | Please read the [contributing guide](.github/contributing.md) for advice on opening issues, pull requests, and coding standards. 239 | 240 | ### Running tests 241 | 242 | Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: 243 | 244 | ```sh 245 | $ npm install && npm test 246 | ``` 247 | 248 | ### Author 249 | 250 | **Jon Schlinkert** 251 | 252 | * [linkedin/in/jonschlinkert](https://linkedin.com/in/jonschlinkert) 253 | * [github/jonschlinkert](https://github.com/jonschlinkert) 254 | * [twitter/jonschlinkert](https://twitter.com/jonschlinkert) 255 | 256 | ### License 257 | 258 | Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert). 259 | Released under the [MIT License](LICENSE). 260 | 261 | *** 262 | 263 | _This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on January 25, 2018._ -------------------------------------------------------------------------------- /docs/demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/generate/generate-contributing/e9becbfd164ede91246446200039cf6661d8ae1e/docs/demo.gif -------------------------------------------------------------------------------- /docs/resources.md: -------------------------------------------------------------------------------- 1 | ### Resources 2 | 3 | * [awesome-github-templates](https://github.com/devspace/awesome-github-templates) 4 | * [idiomatic-contributing](https://github.com/jonschlinkert/idiomatic-contributing) 5 | * [Creating an issue template for your repository](https://help.github.com/articles/creating-an-issue-template-for-your-repository/) 6 | * [Creating a pull request template for your repository](https://help.github.com/articles/creating-a-pull-request-template-for-your-repository/) 7 | -------------------------------------------------------------------------------- /generator.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const path = require('path'); 4 | const isValid = require('is-valid-app'); 5 | 6 | module.exports = function(app) { 7 | if (!isValid(app, 'generate-contributing')) return; 8 | 9 | /** 10 | * Register generate-defaults as a plugin 11 | */ 12 | 13 | app.use(require('generate-defaults')); 14 | 15 | /** 16 | * Generate a `contributing.md` file. 17 | * 18 | * ```sh 19 | * $ gen contributing 20 | * $ gen contributing --dest ./docs 21 | * ``` 22 | * @name contributing 23 | * @api public 24 | */ 25 | 26 | task('default', ['contributing']); 27 | task('contributing', () => template('contributing.md')); 28 | 29 | /** 30 | * Generate an `issue_template.md` file to the `.github/` directory, or specified `--dest`. 31 | * 32 | * ```sh 33 | * $ gen contributing:it 34 | * $ gen contributing:it --dest ./docs 35 | * # also aliased as the following (mostly for API usage) 36 | * $ gen contributing:issue_template 37 | * ``` 38 | * @name contributing:it 39 | * @api public 40 | */ 41 | 42 | task('it', ['issue_template']); 43 | task('issue_template', () => template('issue_template.md')); 44 | 45 | /** 46 | * Generate a bare bones `issue_template.md` file to the `.github/` directory, or specified `--dest`. 47 | * Uses [this template](templates/issue_template_basic.md). 48 | * 49 | * ```sh 50 | * $ gen contributing:itb 51 | * $ gen contributing:itb --dest ./docs 52 | * # also aliased as the following (mostly for API usage) 53 | * $ gen contributing:issue_template_detailed 54 | * ``` 55 | * @name contributing:itb 56 | * @api public 57 | */ 58 | 59 | task('itb', ['issue_template_basic']); 60 | task('issue_template_basic', () => template('issue_template_basic.md')); 61 | 62 | /** 63 | * Generate a detailed `issue_template.md` file to the `.github/` directory, or specified `--dest`. 64 | * Uses [this template](templates/issue_template_detailed.md) 65 | * 66 | * ```sh 67 | * $ gen contributing:itd 68 | * $ gen contributing:itd --dest ./docs 69 | * # also aliased as the following (mostly for API usage) 70 | * $ gen contributing:issue_template_detailed 71 | * ``` 72 | * @name contributing:itd 73 | * @api public 74 | */ 75 | 76 | task('itd', ['issue_template_detailed']); 77 | task('issue_template_detailed', () => template('issue_template_detailed.md')); 78 | 79 | /** 80 | * Generate a `pull_request_template.md` file to the `.github/` directory, or specified `--dest`. 81 | * Uses [this template](templates/pull_request_template.md). 82 | * 83 | * ```sh 84 | * $ gen contributing:pr 85 | * $ gen contributing:pr --dest ./docs 86 | * # also aliased as the following (mostly for API usage) 87 | * $ gen contributing:pr_template 88 | * ``` 89 | * @name contributing:pr 90 | * @api public 91 | */ 92 | 93 | task('pr', ['pr_template']); 94 | task('pr_template', () => template('pull_request_template.md')); 95 | 96 | /** 97 | * Generate a detailed `pull_request_template.md` file to the `.github/` directory, or specified `--dest`. 98 | * Uses [this template](templates/pull_request_template_detailed.md). 99 | * 100 | * ```sh 101 | * $ gen contributing:prd 102 | * $ gen contributing:prd --dest ./docs 103 | * # also aliased as the following (for API usage, when it helps to be explicit in code) 104 | * $ gen contributing:pr_template_detailed 105 | * ``` 106 | * @name contributing:prd 107 | * @api public 108 | */ 109 | 110 | task('prd', ['pr_template_detailed']); 111 | task('pr_template_detailed', () => template('pull_request_template_detailed.md')); 112 | 113 | /** 114 | * Generate a file from the template that matches the given `pattern` 115 | */ 116 | 117 | function template(pattern) { 118 | return app.src(pattern, { cwd: path.join(__dirname, 'templates') }) 119 | .pipe(app.renderFile('*')).on('error', console.error) 120 | .pipe(app.conflicts(app.cwd)) 121 | .pipe(app.dest(app.options.dest || app.cwd)); 122 | } 123 | 124 | /** 125 | * Create a silent task 126 | */ 127 | 128 | function task(name, ...deps) { 129 | app.task(name, { silent: true }, ...deps); 130 | } 131 | }; 132 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./generator'); 4 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "generate-contributing", 3 | "description": "Generate a contributing.md, issue_template.md, or pull_request_template.md file for a project. Can be generated from the command line when Generate is installed globally, or as a plugin inside another generator.", 4 | "version": "1.0.0", 5 | "homepage": "https://github.com/generate/generate-contributing", 6 | "author": "Jon Schlinkert (https://github.com/jonschlinkert)", 7 | "contributors": [ 8 | "Jon Schlinkert (http://twitter.com/jonschlinkert)", 9 | "pointnet (https://github.com/pointnet)" 10 | ], 11 | "repository": "generate/generate-contributing", 12 | "bugs": { 13 | "url": "https://github.com/generate/generate-contributing/issues" 14 | }, 15 | "license": "MIT", 16 | "files": [ 17 | "generator.js", 18 | "index.js", 19 | "templates" 20 | ], 21 | "main": "index.js", 22 | "engines": { 23 | "node": ">=6" 24 | }, 25 | "scripts": { 26 | "test": "mocha" 27 | }, 28 | "dependencies": { 29 | "generate-defaults": "^0.6.6", 30 | "is-valid-app": "^0.3.0" 31 | }, 32 | "devDependencies": { 33 | "delete": "^1.1.0", 34 | "generate": "^0.14.0", 35 | "global-modules": "^1.0.0", 36 | "gulp-format-md": "^1.0.0", 37 | "mocha": "^3.5.3", 38 | "verb-repo-data": "^0.1.15" 39 | }, 40 | "keywords": [ 41 | "app", 42 | "boilerplate", 43 | "build", 44 | "cli", 45 | "cli-app", 46 | "command-line", 47 | "contributing", 48 | "create", 49 | "dev", 50 | "development", 51 | "framework", 52 | "front", 53 | "frontend", 54 | "generate", 55 | "generate-generator", 56 | "generate-plugin", 57 | "generategenerator", 58 | "generateplugin", 59 | "generator", 60 | "init", 61 | "initialize", 62 | "new", 63 | "plugin", 64 | "project", 65 | "projects", 66 | "scaffold", 67 | "scaffolder", 68 | "scaffolding", 69 | "template", 70 | "templates", 71 | "tool", 72 | "web", 73 | "webapp", 74 | "yeoman", 75 | "yo" 76 | ], 77 | "lintDeps": { 78 | "ignore": [ 79 | "scaffolds", 80 | "templates" 81 | ], 82 | "dependencies": { 83 | "files": [ 84 | "generator.js", 85 | "index.js" 86 | ] 87 | } 88 | }, 89 | "verb": { 90 | "toc": { 91 | "method": "preWrite" 92 | }, 93 | "layout": "generator", 94 | "tasks": [ 95 | "readme" 96 | ], 97 | "plugins": [ 98 | "gulp-format-md" 99 | ], 100 | "related": { 101 | "list": [ 102 | "generate-eslint", 103 | "generate-license", 104 | "generate-project", 105 | "generate-travis" 106 | ] 107 | }, 108 | "reflinks": [ 109 | "assemble", 110 | "base", 111 | "gulp" 112 | ], 113 | "lint": { 114 | "reflinks": true 115 | } 116 | } 117 | } 118 | -------------------------------------------------------------------------------- /templates/contributing.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: nil 3 | --- 4 | # Contributing to <%= ask("name") %> 5 | 6 | First and foremost, thank you! We appreciate that you want to contribute to <%= ask("name") %>, your time is valuable, and your contributions mean a lot to us. 7 | 8 | 9 | ## Important! 10 | 11 | By contributing to this project, you: 12 | 13 | * Agree that you have authored 100% of the content 14 | * Agree that you have the necessary rights to the content 15 | * Agree that you have received the necessary permissions from your employer to make the contributions (if applicable) 16 | * Agree that the content you contribute may be provided under the Project license(s) 17 | * Agree that, if you did not author 100% of the content, the appropriate licenses and copyrights have been added along with any other necessary attribution. 18 | 19 | 20 | ## Getting started 21 | 22 | **What does "contributing" mean?** 23 | 24 | Creating an issue is the simplest form of contributing to a project. But there are many ways to contribute, including the following: 25 | 26 | - Updating or correcting documentation 27 | - Feature requests 28 | - Bug reports 29 | 30 | If you'd like to learn more about contributing in general, the [Guide to Idiomatic Contributing](https://github.com/jonschlinkert/idiomatic-contributing) has a lot of useful information. 31 | 32 | **Showing support for <%= ask("name") %>** 33 | 34 | Please keep in mind that open source software is built by people like you, who spend their free time creating things the rest the community can use. 35 | 36 | Don't have time to contribute? No worries, here are some other ways to show your support for <%= ask("name") %>: 37 | 38 | - star the [project](<%= ask("homepage") %>) 39 | - tweet your support for <%= ask("name") %> 40 | 41 | 42 | ## Issues 43 | 44 | Please only create issues for bug reports or feature requests. Issues discussing any other topics may be closed by the project's maintainers without further explanation. 45 | 46 | Do not create issues about bumping dependencies unless a bug has been identified and you can demonstrate that it effects this library. 47 | 48 | **Help us to help you** 49 | 50 | Remember that we’re here to help, but not to make guesses about what you need help with: 51 | 52 | - Whatever bug or issue you're experiencing, assume that it will not be as obvious to the maintainers as it is to you. 53 | - Spell it out completely. Keep in mind that maintainers need to think about _all potential use cases_ of a library. It's important that you explain how you're using a library so that maintainers can make that connection and solve the issue. 54 | 55 | _It can't be understated how frustrating and draining it can be to maintainers to have to ask clarifying questions on the most basic things, before it's even possible to start debugging. Please try to make the best use of everyone's time involved, including yourself, by providing this information up front._ 56 | 57 | ### Before creating an issue 58 | 59 | Please try to determine if the issue is caused by an underlying library, and if so, create the issue there. Sometimes this is difficult to know. We only ask that you attempt to give a reasonable attempt to find out. Oftentimes the readme will have advice about where to go to create issues. 60 | 61 | Try to follow these guidelines: 62 | 63 | - **Avoid creating issues for implementation help** - It's much better for discoverability, SEO, and semantics - to keep the issue tracker focused on bugs and feature requests - to ask implementation-related questions on [stackoverflow.com][so] 64 | - **Investigate the issue** - Search for exising issues (open or closed) that address the issue, and might have even resolved it already. 65 | - **Check the readme** - oftentimes you will find notes about creating issues, and where to go depending on the type of issue. 66 | - Create the issue in the appropriate repository. 67 | 68 | ### Creating an issue 69 | 70 | Please be as descriptive as possible when creating an issue. Give us the information we need to successfully answer your question or address your issue by answering the following in your issue: 71 | 72 | - **description**: (required) What is the bug you're experiencing? How are you using this library/app? 73 | - **OS**: (required) what operating system are you on? 74 | - **version**: (required) please note the version of <%= ask("name") %> are you using 75 | - **error messages**: (required) please paste any error messages into the issue, or a [gist](https://gist.github.com/) 76 | - **extensions, plugins, helpers, etc** (if applicable): please list any extensions you're using 77 | 78 | 79 | ### Closing issues 80 | 81 | The original poster or the maintainers of <%= ask("name") %> may close an issue at any time. Typically, but not exclusively, issues are closed when: 82 | 83 | - The issue is resolved 84 | - The project's maintainers have determined the issue is out of scope 85 | - An issue is clearly a duplicate of another issue, in which case the duplicate issue will be linked. 86 | - A discussion has clearly run its course 87 | 88 | 89 | ## Next steps 90 | 91 | **Tips for creating idiomatic issues** 92 | 93 | Spending just a little extra time to review best practices and brush up on your contributing skills will, at minimum, make your issue easier to read, easier to resolve, and more likely to be found by others who have the same or similar issue in the future. At best, it will open up doors and potential career opportunities by helping you be at your best. 94 | 95 | The following resources were hand-picked to help you be the most effective contributor you can be: 96 | 97 | - The [Guide to Idiomatic Contributing](https://github.com/jonschlinkert/idiomatic-contributing) is a great place for newcomers to start, but there is also information for experienced contributors there. 98 | - Take some time to learn basic markdown. We can't stress this enough. Don't start pasting code into GitHub issues before you've taken a moment to review this [markdown cheatsheet](https://gist.github.com/jonschlinkert/5854601) 99 | - The GitHub guide to [basic markdown](https://help.github.com/articles/markdown-basics/) is another great markdown resource. 100 | - Learn about [GitHub Flavored Markdown](https://help.github.com/articles/github-flavored-markdown/). And if you want to really go above and beyond, read [mastering markdown](https://guides.github.com/features/mastering-markdown/). 101 | 102 | At the very least, please try to: 103 | 104 | - Use backticks to wrap code. This ensures that it retains its formatting and isn't modified when it's rendered by GitHub, and makes the code more readable to others 105 | - When applicable, use syntax highlighting by adding the correct language name after the first "code fence" 106 | 107 | 108 | [so]: http://stackoverflow.com/questions/tagged/<%= ask("name") %> 109 | -------------------------------------------------------------------------------- /templates/issue_template.md: -------------------------------------------------------------------------------- 1 | _(Thanks for reporting an issue to <%= name %>! If you haven't already read the [contributor guidelines](contributing.md), Please do that now, then procede to fill out the details below.)_ 2 | 3 | ## What are the minimum necessary steps to reproduce this issue? 4 | 5 | 1. … 6 | 2. … 7 | 3. … 8 | 9 | ## What happens? 10 | 11 | … 12 | 13 | ## What were you expecting to happen? 14 | 15 | … 16 | 17 | ## Please paste any error or log messages here 18 | 19 | (if long, you can [link to a gist](https://gist.github.com/)) 20 | 21 | ## Any other details 22 | 23 | … 24 | -------------------------------------------------------------------------------- /templates/issue_template_basic.md: -------------------------------------------------------------------------------- 1 | ## Expected behaviour 2 | 3 | ## Actual behaviour 4 | 5 | ## Steps to reproduce the behaviour 6 | -------------------------------------------------------------------------------- /templates/issue_template_detailed.md: -------------------------------------------------------------------------------- 1 | ## Prerequisites 2 | 3 | - [ ] Have you searched for existing issues (open and close) to see if the bug or feature request has already been reported? 4 | - [ ] If this is a bug report, are you running the latest version of {%= ask("name") %}? If not, please update to the latest version and verify that the issue still occurs before proceding. 5 | - [ ] Have you read the [Contributing Guide](contributing.md)? 6 | - [ ] Have you reviewed the project readme (you might find advice about creating new issues)? 7 | - [ ] Are you creating an issue in the correct repository? (if this related to a dependency, please create the issue on that repository) 8 | 9 | Ready? Great! Please provide the following details: 10 | 11 | ## version 12 | 13 | [version] 14 | 15 | ## description 16 | 17 | Please decribe the bug or feature, along with: 18 | 19 | - [ ] Expected behavior and actual behavior. 20 | - [ ] Steps to reproduce the problem. 21 | 22 | [description] 23 | 24 | ## error message 25 | 26 | ```sh 27 | # please paste any error messages here 28 | ``` 29 | 30 | ## {%= ask("name") %} config file 31 | 32 | ```js 33 | // Please paste contents of your {%= ask("name") %} config file here, or in a gist. 34 | // Be sure to include any additional comments that might help 35 | // us resolve the issue. 36 | ``` 37 | -------------------------------------------------------------------------------- /templates/pull_request_template-checklist.md: -------------------------------------------------------------------------------- 1 | **Description** 2 | 3 | [purpose of the pull request] 4 | 5 | **Checklist** 6 | 7 | Before submitting your pull request, please take a moment 8 | 9 | - [ ] Tests were added or udpated 10 | - [ ] All tests are passing 11 | - [ ] Documentation was added or updated 12 | - [ ] I reviewed the [project README]({%= repository.url %}/.github/contributing.md) 13 | - [ ] I reviewed the [contributing guide]({%= repository.url %}/.github/contributing.md) 14 | -------------------------------------------------------------------------------- /templates/pull_request_template.md: -------------------------------------------------------------------------------- 1 | ## Description 2 | 3 | Please describe the purpose of the pull request. 4 | 5 | ## Checklist 6 | 7 | - [ ] All tests are passing 8 | - [ ] New tests were created to address changes in pr (and tests are passing) 9 | - [ ] Updated README and/or documentation, if necessary 10 | - [ ] Added myself / the `contributors` array in package.json 11 | 12 | Thanks for contributing! 13 | -------------------------------------------------------------------------------- /templates/pull_request_template_detailed.md: -------------------------------------------------------------------------------- 1 | ## Prerequisites 2 | 3 | - [ ] Have you searched for existing issues (open and close) to see if the bug or feature request has already been reported? 4 | - [ ] If this is a bug report, are you running the latest version of {%= ask("name") %}? If not, please update to the latest version and verify that the issue still occurs before proceding. 5 | - [ ] Have you read the [Contributing Guide](contributing.md)? 6 | - [ ] Have you reviewed the project readme (you might find advice about creating new issues)? 7 | - [ ] Are you creating an issue in the correct repository? (if this related to a dependency, please create the issue on that repository) 8 | 9 | Ready? Great! Please provide the following details: 10 | 11 | ## version 12 | 13 | [version] 14 | 15 | ## description 16 | 17 | Please decribe the bug or feature, and: 18 | 19 | - [ ] Expected behavior and actual behavior. 20 | - [ ] Steps to reproduce the problem. 21 | 22 | [description] 23 | 24 | ## error message 25 | 26 | ```sh 27 | # please paste any error messages here 28 | ``` 29 | 30 | ## {%= ask("name") %} config file 31 | 32 | ```js 33 | // Please paste contents of your {%= ask("name") %} config file here, or in a gist. 34 | // Be sure to include any additional comments that might help 35 | // us resolve the issue. 36 | ``` 37 | -------------------------------------------------------------------------------- /test/test.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | require('mocha'); 4 | var fs = require('fs'); 5 | var path = require('path'); 6 | var assert = require('assert'); 7 | var generate = require('generate'); 8 | var gm = require('global-modules'); 9 | var del = require('delete'); 10 | var generator = require('..'); 11 | var app; 12 | 13 | var actual = path.resolve.bind(path, __dirname, 'actual'); 14 | 15 | function exists(name, cb) { 16 | var filepath = actual(name); 17 | 18 | return function(err) { 19 | if (err) return cb(err); 20 | 21 | fs.stat(filepath, function(err, stat) { 22 | if (err) return cb(err); 23 | del(actual(), cb); 24 | }); 25 | }; 26 | } 27 | 28 | describe('generate-contributing', function() { 29 | beforeEach(function() { 30 | app = generate({silent: true}); 31 | app.cwd = actual(); 32 | app.option('dest', actual()); 33 | app.option('askWhen', 'not-answered'); 34 | 35 | // provide template data to avoid prompts 36 | app.data(require('verb-repo-data')) 37 | }); 38 | 39 | describe('plugin', function() { 40 | it('should only register the plugin once', function(cb) { 41 | var count = 0; 42 | app.on('plugin', function(name) { 43 | if (name === 'generate-contributing') { 44 | count++; 45 | } 46 | }); 47 | app.use(generator); 48 | app.use(generator); 49 | app.use(generator); 50 | assert.equal(count, 1); 51 | cb(); 52 | }); 53 | 54 | it('should extend tasks onto the instance', function() { 55 | app.use(generator); 56 | assert(app.tasks.hasOwnProperty('default')); 57 | assert(app.tasks.hasOwnProperty('contributing')); 58 | }); 59 | 60 | it('should run the `default` task with .build', function(cb) { 61 | app.use(generator); 62 | app.build('default', exists('contributing.md', cb)); 63 | }); 64 | 65 | it('should run the `default` task with .generate', function(cb) { 66 | app.use(generator); 67 | app.generate('default', exists('contributing.md', cb)); 68 | }); 69 | 70 | it('should run the `contributing` task with .build', function(cb) { 71 | app.use(generator); 72 | app.build('contributing', exists('contributing.md', cb)); 73 | }); 74 | 75 | it('should run the `contributing` task with .generate', function(cb) { 76 | app.use(generator); 77 | app.generate('contributing', exists('contributing.md', cb)); 78 | }); 79 | }); 80 | 81 | if (!process.env.CI && !process.env.TRAVIS) { 82 | if (!fs.existsSync(path.resolve(gm, 'generate-contributing'))) { 83 | console.log('generate-contributing is not installed globally, skipping CLI tests'); 84 | } else { 85 | describe('generator (CLI)', function() { 86 | it('should run the default task using the `generate-contributing` name', function(cb) { 87 | app.use(generator); 88 | app.generate('generate-contributing', exists('contributing.md', cb)); 89 | }); 90 | 91 | it('should run the default task using the `contributing` generator alias', function(cb) { 92 | app.use(generator); 93 | app.generate('contributing', exists('contributing.md', cb)); 94 | }); 95 | 96 | it('should run the contributing task explicitly using the `contributing` generator alias', function(cb) { 97 | app.use(generator); 98 | app.generate('contributing:contributing', exists('contributing.md', cb)); 99 | }); 100 | }); 101 | } 102 | } 103 | 104 | describe('generator (API)', function() { 105 | it('should run the default task on the generator', function(cb) { 106 | app.register('contributing', generator); 107 | app.generate('contributing', exists('contributing.md', cb)); 108 | }); 109 | 110 | it('should run the `default` task when defined explicitly', function(cb) { 111 | app.register('contributing', generator); 112 | app.generate('contributing:default', exists('contributing.md', cb)); 113 | }); 114 | 115 | it('should run the `contributing` task', function(cb) { 116 | app.register('contributing', generator); 117 | app.generate('contributing:contributing', exists('contributing.md', cb)); 118 | }); 119 | }); 120 | 121 | describe('sub-generator', function() { 122 | it('should work as a sub-generator', function(cb) { 123 | app.register('foo', function(foo) { 124 | foo.register('contributing', generator); 125 | }); 126 | app.generate('foo.contributing', exists('contributing.md', cb)); 127 | }); 128 | 129 | it('should run the `default` task by default', function(cb) { 130 | app.register('foo', function(foo) { 131 | foo.register('contributing', generator); 132 | }); 133 | app.generate('foo.contributing', exists('contributing.md', cb)); 134 | }); 135 | 136 | it('should run the `contributing:default` task when defined explicitly', function(cb) { 137 | app.register('foo', function(foo) { 138 | foo.register('contributing', generator); 139 | }); 140 | app.generate('foo.contributing:default', exists('contributing.md', cb)); 141 | }); 142 | 143 | it('should run the `contributing:contributing` task', function(cb) { 144 | app.register('foo', function(foo) { 145 | foo.register('contributing', generator); 146 | }); 147 | app.generate('foo.contributing:contributing', exists('contributing.md', cb)); 148 | }); 149 | 150 | it('should work with nested sub-generators', function(cb) { 151 | app 152 | .register('foo', generator) 153 | .register('bar', generator) 154 | .register('baz', generator); 155 | 156 | app.generate('foo.bar.baz', exists('contributing.md', cb)); 157 | }); 158 | }); 159 | }); 160 | --------------------------------------------------------------------------------