Skip to content

Repository files navigation

generator-community

LicenseDependencies' licensesNSP StatusSynk Vulnerabilities
StackShareDependency StatusdevDependencies Status
Build StatusWindows Build statusCoverage StatusCodacy quality

Generate README, CODE_OF_CONDUCT, CONTRIBUTING, and LICENSE files according to recommended community standards.

Table of contents

1. Overview

generator-community helps product repository maintainers follow the recommended community standards for documentation that communicates expectations, manages contributions, protects participants' legal rights, and optimizes search engine results. generator-community's simple command-line interface prompts you with simple questions in order to generate a:

  1. CODE_OF_CONDUCT.md
  2. CONTRIBUTING.md
  3. Open source LICENSE.md
  4. README.md

Alert icon Currently, generator-community generates a:

  1. .editorconfig
  2. .gitattributes
  3. .gitignore
  4. .yo-rc.json (to store answers for your convenience)
  5. CODE_OF_CONDUCT.md
  6. LICENSE
  7. README.md

generator-community also initializes local Git repository, if one doesn't yet exist.

Please see the Milestones for generator-community's release plan.


2. Installation

2.1. Prerequisite software

  1. Node.js v4.1.1 or greater
  2. npm (which installs with Node.js)
  3. Yeoman (a command-line tool which you will install with npm, and not a manual download)
  4. A package.json application manifest.

HelpVerify prerequisite software...
  • 2.1.2. Verify Node.js availability

    Open a Terminal and find out whether you have Node.js installed. Run:

    $ node --version
    # => v7.7.3

    If you do not have [Node.js][nodejs-url] installed, you will receive an error message similar to:

    # Linux or macOS
    bash: foobar: command not found
    # You need to install Node.js!
  • 2.1.2. Install or update Node.js

    You have two options for installing Node.js.

    The easiest option is to simply download and install Node.js.

    If you feel comfortable using the command line, try one of the following version managers:


    ℹ️ I cannot vouch for the two Windows options, so do a little homework, first.


2.2. Install Yeoman and generator-community

Once you've verified that you have Node.js v4.1.1. or higher installed, open a Terminal and run these two commands:

# Install Yeoman and generator-community globally
$ npm install yo --global
# 💡 The letter "i" is shorthand for "install"; -g is short for --global
$ npm i generator-community -g

3. Usage

Install all four recommended community standards (README, CODE_OF_CONDUCT, CONTRIBUTING, and a LICENSE):

# Generate README.md, CONTRIBUTING.md, CODE_OF_CONDUCT.md, and LICENSE files# per the recommended community community standards:
$ yo community

This will guide you with prompts to help you pre-fill the documents, e.g.,

$ yo community
? GitHub username or organization johndoe
? Product Name spike-repo
? Write a short description/value proposition The most valuable spike in the world....
? Product homepage URL https://example
? Author's name John Doe? Author's e-mail john@doe.info
? Author's homepage https://github.com/johndoe? Package keywords (comma to split) recommended community standards,readme,license,toc,table of contents,markdown? Which programming language does this product use the most? Node.js (JavaScript)? What do you use to manage dependencies (e.g., Gradle, npm, NuGet)? Leave blank if you don't know. npm
? ⦾ 📄 LICENSE: Select a license MIT
? ⦾ 📄 CODE_OF_CONDUCT: Would you like to generate a Code of Conduct? Yes
? ⦾ 📄 README: Select the sections to include in your README Overview, Configuration, Security, API, Background, License
create package.json
create README.md
create .editorconfig
create .gitattributes
create .gitignore
create CODE_OF_CONDUCT.md
create LICENSE
I'm all done. Running npm install for you to install the required dependencies. If this fails, try running the command yourself.> commitplease@2.7.10 install /Users/swindle/Projects/github/commonality/sandbox/spike-repo/node_modules/commitplease> node install> git-validate@2.2.2 install /Users/swindle/Projects/github/commonality/sandbox/spike-repo/node_modules/nsp/node_modules/git-validate> node bin/installnpm WARN prepublish-on-install As of npm@5, `prepublish` scripts are deprecated.npm WARN prepublish-on-install Use `prepare` for build steps and `prepublishOnly` for upload-only.npm WARN prepublish-on-install See the deprecation note in `npm help scripts` for more information.> spike-repo@0.0.0 prepublish /Users/swindle/Projects/github/commonality/sandbox/spike-repo> nsp check(+) No known vulnerabilities found> spike-repo@0.0.0 prepare /Users/swindle/Projects/github/commonality/sandbox/spike-repo> npm run lint && npm run security> spike-repo@0.0.0 lint /Users/swindle/Projects/github/commonality/sandbox/spike-repo> npm run lint:manifest> spike-repo@0.0.0 lint:manifest /Users/swindle/Projects/github/commonality/sandbox/spike-repo> fixpackmissing mainpackage.json fixed!> spike-repo@0.0.0 security /Users/swindle/Projects/github/commonality/sandbox/spike-repo> npm run security:nsp:scan> spike-repo@0.0.0 security:nsp:scan /Users/swindle/Projects/github/commonality/sandbox/spike-repo> nsp check(+) No known vulnerabilities foundnpm notice created a lockfile as package-lock.json. You should commit this file.added 571 packages in 9.146sThank you for generating community!✔ /README.md Updated Transforms run ⁕ TOC:excludeText=Table of contents

3.1. yo community:readme

Quote READMEs do more than explain how to use your project. They also explain why your project matters, and what your users can do with it.

In your README, try to answer the following questions:

  • What does this project do?

  • Why is this project useful?

  • How do I get started?

  • Where can I get more help, if I need it?

Owen, K., Keepers, B., Shepherd, S., & Eghbal, N. (2017, February 17). Starting an Open Source Project. Retrieved September 13, 2017, from https://opensource.guide/starting-a-project/#writing-a-readme

3.1.1. Guided assistance

To answer prompts manually, open a Terminal and run

$ yo community:readme

The community:readme subgenerator will evaluate your product repository's manifests (e.g., package.json for Node.js products, or settings.gradle for Java products) to ensure consistency.

3.1.2. CLI automation

You can automate README.md documentation via the command line interface (CLI) (e.g., during one of your CI/CD pipelines). To view all CLI options, use the --help or -h option:

$ yo community:readme -h
Usage:
yo community:readme [options]
Options:
-h, --help # Print the generator's options and usage
--skip-cache # Do not remember prompt answers Default: false
--skip-install # Do not automatically install dependencies Default: false
--authorName # Author name
--authorUrl # Author URL
--dependencyManager # Tool used to install third-party libraries Default: Unspecified
--generateInto # Destination directory for generated files
--gitRemoteOriginUrl # The URI (SSH or HTTPS) of your Git repository Default: /
--githubAccount # GitHub account/organization name
--description # Product description
--lang # Product's primary programming language Default: Unspecified
--license # Open source software license
--licenseUrl # URL to your LICENSE file Default: ./LICENSE
--name # Product name
-a, --includeApi # README.md: Public API overview (optional) Default: true
-b, --includeBackground # README.md: Background section content (optional) Default: false
-c, --includeConfig # README.md: Configuration instructions (optional) Default: false
-o, --includeOverview # README.md: Overview section content (optional) Default: false
-s, --includeSecurity # README.md: Security section content (optional) Default: false

Example:

$ yo community:readme --authorName "Jane Doe" --authorUrl "https://jdoe.example.com" \
--githubAccount janedoeasindeer --lang JavaScript --licenseName MIT \
--name spike-sln-community \
--description "A spike solution to test generator-community." \
--includeApi --includeConfig --includeSecurity

3.2. yo community:conduct

Quote ...a code of conduct helps set ground rules for behavior for your project’s participants. This is especially valuable if you’re launching an open source project for a community or company. A code of conduct empowers you to facilitate healthy, constructive community behavior, which will reduce your stress as a maintainer.

Owen, K., Keepers, B., Shepherd, S., & Eghbal, N. (2017, February 17). Starting an Open Source Project. Retrieved September 13, 2017, from https://opensource.guide/starting-a-project/#establishing-a-code-of-conduct

3.2.1. Guided assistance

To answer prompts manually, open a Terminal and run

$ yo community:conduct
? Contact email: fake@elsewhere.net
create CODE_OF_CONDUCT.md

3.2.2. CLI automation

You can automate CODE_OF_CONDUCT.md generation via the command line interface (CLI) (e.g., during one of your CI/CD pipelines). To view all CLI options, use the --help or -h option:

$ yo community:conduct --help
Usage:
yo community:conduct [options]
Options:
-h, --help # Print the generator's options and usage
--skip-cache # Do not remember prompt answers Default: false
--skip-install # Do not automatically install dependencies Default: false
--email # Contact email
--generateInto # Destination directory

Example:

$ yo community:conduct --email somebody@example.com
create CODE_OF_CONDUCT.md

3.3. yo community:contributing

Quote A CONTRIBUTING file tells your audience how to participate in your project. For example, you might include information on:

  • How to file a bug report (try using issue and pull request templates)
  • How to suggest a new feature
  • How to set up your environment and run tests

Owen, K., Keepers, B., Shepherd, S., & Eghbal, N. (2017, February 17). Starting an Open Source Project. Retrieved September 13, 2017, from https://opensource.guide/starting-a-project/#writing-your-contributing-guidelines

Alert icon This feature will be delivered with MVP4: community:contribute.

3.4. yo community:license

Quote An open source license guarantees that others can use, copy, modify, and contribute back to your project without repercussions. It also protects you from sticky legal situations. You must include a license when you launch an open source project.

Owen, K., Keepers, B., Shepherd, S., & Eghbal, N. (2017, February 17). Starting an Open Source Project. Retrieved September 13, 2017, from https://opensource.guide/starting-a-project/#launching-your-own-open-source-project


Alert icon If you already have a LICENSE, the community:license subgenerator will prompt you to overwrite it, as well as your package.json.


3.4.1. Guided assistance

To answer prompts manually, open a Terminal and run

$ yo community:license

The community:readme subgenerator will evaluate your product repository's manifests (e.g., package.json for Node.js products, or settings.gradle for Java products) to ensure consistency.

Example:

$ yo community:license
? What's your name: Greg Swindle? Your email (optional): greg@swindle.net? Your website (optional):? Which license do you want to use? Unlicense No License (Copyrighted) Apache 2.0❯ MIT Mozilla Public License 2.0 BSD 2-Clause (FreeBSD) License BSD 3-Clause (NewBSD) License

3.4.2. CLI automation

You can automatically generate a LICENSE file via the command line interface (CLI) (e.g., during one of your CI/CD pipelines). To view all CLI options, use the --help or -h option:

yo community:license -h
Usage:
yo community:license [options]
Options:
-h, --help # Print the generator's options and usage
--skip-cache # Do not remember prompt answers Default: false
--skip-install # Do not automatically install dependencies Default: false
--defaultLicense # Default license
--email # Email of the license owner
--generateInto # Destination directory of the generated files
--license # Enter an SPDX license name
--name # Name of the license owner
--output # Set the output file for the generated license Default: LICENSE
--website # Website of the license owner
--year # Year(s) to include on the license Default: 2017

3.5. Update tables of contents in markdown files

Markdown icon

yo community installs an npm-script that will help keep your documents' table of contents up-to-date. To automatically update your markdown files' tables of contents:

  • Add the following comments to your markdown file(s):
    <!-- ⛔️ AUTO-GENERATED-CONTENT:START (TOC:excludeText=Table of contents) -->
    This text will be replaced by a table of contents 😏 .
    <!-- ⛔️ AUTO-GENERATED-CONTENT:END -->
  • Open a Terminal and run:
    $ npm run docs:toc

For more information, visit DavidWells/markdown-magic.

4. npm-scripts

Software modules often have funky, irrelative names; therefore, we prefix custom tasks by their responsibility and purpose.

PrefixDefinition
build*Source code distribution tasks.
docs*API documentation and automation tasks.
lint*Code style, standards, and vulnerabilty assessments (as well as fixes, if available).
releaseBump the product's semver, update docs, commit, and publish to the npm registry.
security*Security vulnerabilty checks.

The following CLI npm-scripts are available to you (assuming you're human, gentle reader) and CI-services.

ScriptDescription
docsnpm run docs:scripts && npm run docs:toc
docs:tocmd-magic --path '**/*.md' --ignore 'node_modules'
lintnpm run lint:node-version && npm run lint:js && npm run lint:manifest
lint:jseslint ./generators/**/*.js ./__tests__/**/*.js --fix
lint:manifestfixpack
lint:node-versioncheck-node-version --package
prepublishnpm run security
releasestandard-version
securitynpm run security:nsp:scan
security:nsp:scannsp check
pretestnpm prune && npm run lint
testjest --forceExit --config=jest.config.json
posttestnpm run security

5. Semantic version and CHANGELOG

The latest version of commonality/generator-community is 0.0.0. View the CHANGELOG for details.

6. Contributing to generator-community

Learn how to make a Pull Request with free training

We welcome contributors with Pull Requests!

Contributions in the form of GitHub pull requests are welcome. Before embarking on a significant change, please adhere to the following guidelines:

  1. Read the Code of Conduct.
  2. Create an issue to discuss the proposed change and ensure that it is likely to be merged:
  3. Follow Contributing to generator-community's coding conventions and Git workflow if you're willing and able to program (or want to learn how).

7. License

MIT © Greg Swindle.

Third-party software licenses for `generator-community (read the NOTICE file for a detailed report):

FOSSA Status


Conventional CommitsGreenkeeper automated dependency managementREADME score

About

䷤ Generate README, CODE_OF_CONDUCT, CONTRIBUTING, LICENSE, ISSUE_TEMPLATE, and PULL_REQUEST_TEMPLATE repository docs to encourage consumption and invite contributions.

Topics

Resources

Code of conduct

Contributing

Stars

10 stars

Watchers

5 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Add copy buttons to all
 blocks
(function() {
function addCopyButtons() {
document.querySelectorAll('pre code').forEach(function(codeBlock) {
if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;
codeBlock.parentElement.setAttribute('data-copy-added', 'true');
var btn = document.createElement('button');
btn.textContent = 'Copy';
btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';
btn.onmouseover = function() { this.style.opacity = '1'; };
btn.onmouseout = function() { this.style.opacity = '0.7'; };
btn.onclick = function() {
navigator.clipboard.writeText(codeBlock.textContent).then(function() {
btn.textContent = 'Copied!';
setTimeout(function() { btn.textContent = 'Copy'; }, 1500);
});
};
codeBlock.parentElement.style.position = 'relative';
codeBlock.parentElement.appendChild(btn);
});
}
addCopyButtons();
// Re-run on dynamic content
var observer = new MutationObserver(addCopyButtons);
observer.observe(document.body, { childList: true, subtree: true });
})();
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
GitHub - commonality/generator-community: ䷤ Generate README, CODE_OF_CONDUCT, CONTRIBUTING, LICENSE, ISSUE_TEMPLATE, and PULL_REQUEST_TEMPLATE repository docs to encourage consumption and invite contributions. · GitHub
Skip to content

Repository files navigation

generator-community

LicenseDependencies' licensesNSP StatusSynk Vulnerabilities
StackShareDependency StatusdevDependencies Status
Build StatusWindows Build statusCoverage StatusCodacy quality

Generate README, CODE_OF_CONDUCT, CONTRIBUTING, and LICENSE files according to recommended community standards.

Table of contents

1. Overview

generator-community helps product repository maintainers follow the recommended community standards for documentation that communicates expectations, manages contributions, protects participants' legal rights, and optimizes search engine results. generator-community's simple command-line interface prompts you with simple questions in order to generate a:

  1. CODE_OF_CONDUCT.md
  2. CONTRIBUTING.md
  3. Open source LICENSE.md
  4. README.md

Alert icon Currently, generator-community generates a:

  1. .editorconfig
  2. .gitattributes
  3. .gitignore
  4. .yo-rc.json (to store answers for your convenience)
  5. CODE_OF_CONDUCT.md
  6. LICENSE
  7. README.md

generator-community also initializes local Git repository, if one doesn't yet exist.

Please see the Milestones for generator-community's release plan.


2. Installation

2.1. Prerequisite software

  1. Node.js v4.1.1 or greater
  2. npm (which installs with Node.js)
  3. Yeoman (a command-line tool which you will install with npm, and not a manual download)
  4. A package.json application manifest.

HelpVerify prerequisite software...
  • 2.1.2. Verify Node.js availability

    Open a Terminal and find out whether you have Node.js installed. Run:

    $ node --version
    # => v7.7.3

    If you do not have [Node.js][nodejs-url] installed, you will receive an error message similar to:

    # Linux or macOS
    bash: foobar: command not found
    # You need to install Node.js!
  • 2.1.2. Install or update Node.js

    You have two options for installing Node.js.

    The easiest option is to simply download and install Node.js.

    If you feel comfortable using the command line, try one of the following version managers:


    ℹ️ I cannot vouch for the two Windows options, so do a little homework, first.


2.2. Install Yeoman and generator-community

Once you've verified that you have Node.js v4.1.1. or higher installed, open a Terminal and run these two commands:

# Install Yeoman and generator-community globally
$ npm install yo --global
# 💡 The letter "i" is shorthand for "install"; -g is short for --global
$ npm i generator-community -g

3. Usage

Install all four recommended community standards (README, CODE_OF_CONDUCT, CONTRIBUTING, and a LICENSE):

# Generate README.md, CONTRIBUTING.md, CODE_OF_CONDUCT.md, and LICENSE files# per the recommended community community standards:
$ yo community

This will guide you with prompts to help you pre-fill the documents, e.g.,

$ yo community
? GitHub username or organization johndoe
? Product Name spike-repo
? Write a short description/value proposition The most valuable spike in the world....
? Product homepage URL https://example
? Author's name John Doe? Author's e-mail john@doe.info
? Author's homepage https://github.com/johndoe? Package keywords (comma to split) recommended community standards,readme,license,toc,table of contents,markdown? Which programming language does this product use the most? Node.js (JavaScript)? What do you use to manage dependencies (e.g., Gradle, npm, NuGet)? Leave blank if you don't know. npm
? ⦾ 📄 LICENSE: Select a license MIT
? ⦾ 📄 CODE_OF_CONDUCT: Would you like to generate a Code of Conduct? Yes
? ⦾ 📄 README: Select the sections to include in your README Overview, Configuration, Security, API, Background, License
create package.json
create README.md
create .editorconfig
create .gitattributes
create .gitignore
create CODE_OF_CONDUCT.md
create LICENSE
I'm all done. Running npm install for you to install the required dependencies. If this fails, try running the command yourself.> commitplease@2.7.10 install /Users/swindle/Projects/github/commonality/sandbox/spike-repo/node_modules/commitplease> node install> git-validate@2.2.2 install /Users/swindle/Projects/github/commonality/sandbox/spike-repo/node_modules/nsp/node_modules/git-validate> node bin/installnpm WARN prepublish-on-install As of npm@5, `prepublish` scripts are deprecated.npm WARN prepublish-on-install Use `prepare` for build steps and `prepublishOnly` for upload-only.npm WARN prepublish-on-install See the deprecation note in `npm help scripts` for more information.> spike-repo@0.0.0 prepublish /Users/swindle/Projects/github/commonality/sandbox/spike-repo> nsp check(+) No known vulnerabilities found> spike-repo@0.0.0 prepare /Users/swindle/Projects/github/commonality/sandbox/spike-repo> npm run lint && npm run security> spike-repo@0.0.0 lint /Users/swindle/Projects/github/commonality/sandbox/spike-repo> npm run lint:manifest> spike-repo@0.0.0 lint:manifest /Users/swindle/Projects/github/commonality/sandbox/spike-repo> fixpackmissing mainpackage.json fixed!> spike-repo@0.0.0 security /Users/swindle/Projects/github/commonality/sandbox/spike-repo> npm run security:nsp:scan> spike-repo@0.0.0 security:nsp:scan /Users/swindle/Projects/github/commonality/sandbox/spike-repo> nsp check(+) No known vulnerabilities foundnpm notice created a lockfile as package-lock.json. You should commit this file.added 571 packages in 9.146sThank you for generating community!✔ /README.md Updated Transforms run ⁕ TOC:excludeText=Table of contents

3.1. yo community:readme

Quote READMEs do more than explain how to use your project. They also explain why your project matters, and what your users can do with it.

In your README, try to answer the following questions:

  • What does this project do?

  • Why is this project useful?

  • How do I get started?

  • Where can I get more help, if I need it?

Owen, K., Keepers, B., Shepherd, S., & Eghbal, N. (2017, February 17). Starting an Open Source Project. Retrieved September 13, 2017, from https://opensource.guide/starting-a-project/#writing-a-readme

3.1.1. Guided assistance

To answer prompts manually, open a Terminal and run

$ yo community:readme

The community:readme subgenerator will evaluate your product repository's manifests (e.g., package.json for Node.js products, or settings.gradle for Java products) to ensure consistency.

3.1.2. CLI automation

You can automate README.md documentation via the command line interface (CLI) (e.g., during one of your CI/CD pipelines). To view all CLI options, use the --help or -h option:

$ yo community:readme -h
Usage:
yo community:readme [options]
Options:
-h, --help # Print the generator's options and usage
--skip-cache # Do not remember prompt answers Default: false
--skip-install # Do not automatically install dependencies Default: false
--authorName # Author name
--authorUrl # Author URL
--dependencyManager # Tool used to install third-party libraries Default: Unspecified
--generateInto # Destination directory for generated files
--gitRemoteOriginUrl # The URI (SSH or HTTPS) of your Git repository Default: /
--githubAccount # GitHub account/organization name
--description # Product description
--lang # Product's primary programming language Default: Unspecified
--license # Open source software license
--licenseUrl # URL to your LICENSE file Default: ./LICENSE
--name # Product name
-a, --includeApi # README.md: Public API overview (optional) Default: true
-b, --includeBackground # README.md: Background section content (optional) Default: false
-c, --includeConfig # README.md: Configuration instructions (optional) Default: false
-o, --includeOverview # README.md: Overview section content (optional) Default: false
-s, --includeSecurity # README.md: Security section content (optional) Default: false

Example:

$ yo community:readme --authorName "Jane Doe" --authorUrl "https://jdoe.example.com" \
--githubAccount janedoeasindeer --lang JavaScript --licenseName MIT \
--name spike-sln-community \
--description "A spike solution to test generator-community." \
--includeApi --includeConfig --includeSecurity

3.2. yo community:conduct

Quote ...a code of conduct helps set ground rules for behavior for your project’s participants. This is especially valuable if you’re launching an open source project for a community or company. A code of conduct empowers you to facilitate healthy, constructive community behavior, which will reduce your stress as a maintainer.

Owen, K., Keepers, B., Shepherd, S., & Eghbal, N. (2017, February 17). Starting an Open Source Project. Retrieved September 13, 2017, from https://opensource.guide/starting-a-project/#establishing-a-code-of-conduct

3.2.1. Guided assistance

To answer prompts manually, open a Terminal and run

$ yo community:conduct
? Contact email: fake@elsewhere.net
create CODE_OF_CONDUCT.md

3.2.2. CLI automation

You can automate CODE_OF_CONDUCT.md generation via the command line interface (CLI) (e.g., during one of your CI/CD pipelines). To view all CLI options, use the --help or -h option:

$ yo community:conduct --help
Usage:
yo community:conduct [options]
Options:
-h, --help # Print the generator's options and usage
--skip-cache # Do not remember prompt answers Default: false
--skip-install # Do not automatically install dependencies Default: false
--email # Contact email
--generateInto # Destination directory

Example:

$ yo community:conduct --email somebody@example.com
create CODE_OF_CONDUCT.md

3.3. yo community:contributing

Quote A CONTRIBUTING file tells your audience how to participate in your project. For example, you might include information on:

  • How to file a bug report (try using issue and pull request templates)
  • How to suggest a new feature
  • How to set up your environment and run tests

Owen, K., Keepers, B., Shepherd, S., & Eghbal, N. (2017, February 17). Starting an Open Source Project. Retrieved September 13, 2017, from https://opensource.guide/starting-a-project/#writing-your-contributing-guidelines

Alert icon This feature will be delivered with MVP4: community:contribute.

3.4. yo community:license

Quote An open source license guarantees that others can use, copy, modify, and contribute back to your project without repercussions. It also protects you from sticky legal situations. You must include a license when you launch an open source project.

Owen, K., Keepers, B., Shepherd, S., & Eghbal, N. (2017, February 17). Starting an Open Source Project. Retrieved September 13, 2017, from https://opensource.guide/starting-a-project/#launching-your-own-open-source-project


Alert icon If you already have a LICENSE, the community:license subgenerator will prompt you to overwrite it, as well as your package.json.


3.4.1. Guided assistance

To answer prompts manually, open a Terminal and run

$ yo community:license

The community:readme subgenerator will evaluate your product repository's manifests (e.g., package.json for Node.js products, or settings.gradle for Java products) to ensure consistency.

Example:

$ yo community:license
? What's your name: Greg Swindle? Your email (optional): greg@swindle.net? Your website (optional):? Which license do you want to use? Unlicense No License (Copyrighted) Apache 2.0❯ MIT Mozilla Public License 2.0 BSD 2-Clause (FreeBSD) License BSD 3-Clause (NewBSD) License

3.4.2. CLI automation

You can automatically generate a LICENSE file via the command line interface (CLI) (e.g., during one of your CI/CD pipelines). To view all CLI options, use the --help or -h option:

yo community:license -h
Usage:
yo community:license [options]
Options:
-h, --help # Print the generator's options and usage
--skip-cache # Do not remember prompt answers Default: false
--skip-install # Do not automatically install dependencies Default: false
--defaultLicense # Default license
--email # Email of the license owner
--generateInto # Destination directory of the generated files
--license # Enter an SPDX license name
--name # Name of the license owner
--output # Set the output file for the generated license Default: LICENSE
--website # Website of the license owner
--year # Year(s) to include on the license Default: 2017

3.5. Update tables of contents in markdown files

Markdown icon

yo community installs an npm-script that will help keep your documents' table of contents up-to-date. To automatically update your markdown files' tables of contents:

  • Add the following comments to your markdown file(s):
    <!-- ⛔️ AUTO-GENERATED-CONTENT:START (TOC:excludeText=Table of contents) -->
    This text will be replaced by a table of contents 😏 .
    <!-- ⛔️ AUTO-GENERATED-CONTENT:END -->
  • Open a Terminal and run:
    $ npm run docs:toc

For more information, visit DavidWells/markdown-magic.

4. npm-scripts

Software modules often have funky, irrelative names; therefore, we prefix custom tasks by their responsibility and purpose.

PrefixDefinition
build*Source code distribution tasks.
docs*API documentation and automation tasks.
lint*Code style, standards, and vulnerabilty assessments (as well as fixes, if available).
releaseBump the product's semver, update docs, commit, and publish to the npm registry.
security*Security vulnerabilty checks.

The following CLI npm-scripts are available to you (assuming you're human, gentle reader) and CI-services.

ScriptDescription
docsnpm run docs:scripts && npm run docs:toc
docs:tocmd-magic --path '**/*.md' --ignore 'node_modules'
lintnpm run lint:node-version && npm run lint:js && npm run lint:manifest
lint:jseslint ./generators/**/*.js ./__tests__/**/*.js --fix
lint:manifestfixpack
lint:node-versioncheck-node-version --package
prepublishnpm run security
releasestandard-version
securitynpm run security:nsp:scan
security:nsp:scannsp check
pretestnpm prune && npm run lint
testjest --forceExit --config=jest.config.json
posttestnpm run security

5. Semantic version and CHANGELOG

The latest version of commonality/generator-community is 0.0.0. View the CHANGELOG for details.

6. Contributing to generator-community

Learn how to make a Pull Request with free training

We welcome contributors with Pull Requests!

Contributions in the form of GitHub pull requests are welcome. Before embarking on a significant change, please adhere to the following guidelines:

  1. Read the Code of Conduct.
  2. Create an issue to discuss the proposed change and ensure that it is likely to be merged:
  3. Follow Contributing to generator-community's coding conventions and Git workflow if you're willing and able to program (or want to learn how).

7. License

MIT © Greg Swindle.

Third-party software licenses for `generator-community (read the NOTICE file for a detailed report):

FOSSA Status


Conventional CommitsGreenkeeper automated dependency managementREADME score

About

䷤ Generate README, CODE_OF_CONDUCT, CONTRIBUTING, LICENSE, ISSUE_TEMPLATE, and PULL_REQUEST_TEMPLATE repository docs to encourage consumption and invite contributions.

Topics

Resources

Code of conduct

Contributing

Stars

10 stars

Watchers

5 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Force GitHub README to respect dark mode (function() { var style = document.createElement('style'); style.textContent = ' .markdown-body { color-scheme: dark light; } .markdown-body pre { background: #161b22 !important; } .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; } .markdown-body table th, .markdown-body table td { border-color: #30363d !important; } .markdown-body img { background: #0d1117; } .markdown-body blockquote { border-left-color: #8b949e; } .markdown-body hr { border-color: #30363d; } '; document.head.appendChild(style); })(); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' GitHub - commonality/generator-community: ䷤ Generate README, CODE_OF_CONDUCT, CONTRIBUTING, LICENSE, ISSUE_TEMPLATE, and PULL_REQUEST_TEMPLATE repository docs to encourage consumption and invite contributions. · GitHub
Skip to content

Repository files navigation

generator-community

LicenseDependencies' licensesNSP StatusSynk Vulnerabilities
StackShareDependency StatusdevDependencies Status
Build StatusWindows Build statusCoverage StatusCodacy quality

Generate README, CODE_OF_CONDUCT, CONTRIBUTING, and LICENSE files according to recommended community standards.

Table of contents

1. Overview

generator-community helps product repository maintainers follow the recommended community standards for documentation that communicates expectations, manages contributions, protects participants' legal rights, and optimizes search engine results. generator-community's simple command-line interface prompts you with simple questions in order to generate a:

  1. CODE_OF_CONDUCT.md
  2. CONTRIBUTING.md
  3. Open source LICENSE.md
  4. README.md

Alert icon Currently, generator-community generates a:

  1. .editorconfig
  2. .gitattributes
  3. .gitignore
  4. .yo-rc.json (to store answers for your convenience)
  5. CODE_OF_CONDUCT.md
  6. LICENSE
  7. README.md

generator-community also initializes local Git repository, if one doesn't yet exist.

Please see the Milestones for generator-community's release plan.


2. Installation

2.1. Prerequisite software

  1. Node.js v4.1.1 or greater
  2. npm (which installs with Node.js)
  3. Yeoman (a command-line tool which you will install with npm, and not a manual download)
  4. A package.json application manifest.

HelpVerify prerequisite software...
  • 2.1.2. Verify Node.js availability

    Open a Terminal and find out whether you have Node.js installed. Run:

    $ node --version
    # => v7.7.3

    If you do not have [Node.js][nodejs-url] installed, you will receive an error message similar to:

    # Linux or macOS
    bash: foobar: command not found
    # You need to install Node.js!
  • 2.1.2. Install or update Node.js

    You have two options for installing Node.js.

    The easiest option is to simply download and install Node.js.

    If you feel comfortable using the command line, try one of the following version managers:


    ℹ️ I cannot vouch for the two Windows options, so do a little homework, first.


2.2. Install Yeoman and generator-community

Once you've verified that you have Node.js v4.1.1. or higher installed, open a Terminal and run these two commands:

# Install Yeoman and generator-community globally
$ npm install yo --global
# 💡 The letter "i" is shorthand for "install"; -g is short for --global
$ npm i generator-community -g

3. Usage

Install all four recommended community standards (README, CODE_OF_CONDUCT, CONTRIBUTING, and a LICENSE):

# Generate README.md, CONTRIBUTING.md, CODE_OF_CONDUCT.md, and LICENSE files# per the recommended community community standards:
$ yo community

This will guide you with prompts to help you pre-fill the documents, e.g.,

$ yo community
? GitHub username or organization johndoe
? Product Name spike-repo
? Write a short description/value proposition The most valuable spike in the world....
? Product homepage URL https://example
? Author's name John Doe? Author's e-mail john@doe.info
? Author's homepage https://github.com/johndoe? Package keywords (comma to split) recommended community standards,readme,license,toc,table of contents,markdown? Which programming language does this product use the most? Node.js (JavaScript)? What do you use to manage dependencies (e.g., Gradle, npm, NuGet)? Leave blank if you don't know. npm
? ⦾ 📄 LICENSE: Select a license MIT
? ⦾ 📄 CODE_OF_CONDUCT: Would you like to generate a Code of Conduct? Yes
? ⦾ 📄 README: Select the sections to include in your README Overview, Configuration, Security, API, Background, License
create package.json
create README.md
create .editorconfig
create .gitattributes
create .gitignore
create CODE_OF_CONDUCT.md
create LICENSE
I'm all done. Running npm install for you to install the required dependencies. If this fails, try running the command yourself.> commitplease@2.7.10 install /Users/swindle/Projects/github/commonality/sandbox/spike-repo/node_modules/commitplease> node install> git-validate@2.2.2 install /Users/swindle/Projects/github/commonality/sandbox/spike-repo/node_modules/nsp/node_modules/git-validate> node bin/installnpm WARN prepublish-on-install As of npm@5, `prepublish` scripts are deprecated.npm WARN prepublish-on-install Use `prepare` for build steps and `prepublishOnly` for upload-only.npm WARN prepublish-on-install See the deprecation note in `npm help scripts` for more information.> spike-repo@0.0.0 prepublish /Users/swindle/Projects/github/commonality/sandbox/spike-repo> nsp check(+) No known vulnerabilities found> spike-repo@0.0.0 prepare /Users/swindle/Projects/github/commonality/sandbox/spike-repo> npm run lint && npm run security> spike-repo@0.0.0 lint /Users/swindle/Projects/github/commonality/sandbox/spike-repo> npm run lint:manifest> spike-repo@0.0.0 lint:manifest /Users/swindle/Projects/github/commonality/sandbox/spike-repo> fixpackmissing mainpackage.json fixed!> spike-repo@0.0.0 security /Users/swindle/Projects/github/commonality/sandbox/spike-repo> npm run security:nsp:scan> spike-repo@0.0.0 security:nsp:scan /Users/swindle/Projects/github/commonality/sandbox/spike-repo> nsp check(+) No known vulnerabilities foundnpm notice created a lockfile as package-lock.json. You should commit this file.added 571 packages in 9.146sThank you for generating community!✔ /README.md Updated Transforms run ⁕ TOC:excludeText=Table of contents

3.1. yo community:readme

Quote READMEs do more than explain how to use your project. They also explain why your project matters, and what your users can do with it.

In your README, try to answer the following questions:

  • What does this project do?

  • Why is this project useful?

  • How do I get started?

  • Where can I get more help, if I need it?

Owen, K., Keepers, B., Shepherd, S., & Eghbal, N. (2017, February 17). Starting an Open Source Project. Retrieved September 13, 2017, from https://opensource.guide/starting-a-project/#writing-a-readme

3.1.1. Guided assistance

To answer prompts manually, open a Terminal and run

$ yo community:readme

The community:readme subgenerator will evaluate your product repository's manifests (e.g., package.json for Node.js products, or settings.gradle for Java products) to ensure consistency.

3.1.2. CLI automation

You can automate README.md documentation via the command line interface (CLI) (e.g., during one of your CI/CD pipelines). To view all CLI options, use the --help or -h option:

$ yo community:readme -h
Usage:
yo community:readme [options]
Options:
-h, --help # Print the generator's options and usage
--skip-cache # Do not remember prompt answers Default: false
--skip-install # Do not automatically install dependencies Default: false
--authorName # Author name
--authorUrl # Author URL
--dependencyManager # Tool used to install third-party libraries Default: Unspecified
--generateInto # Destination directory for generated files
--gitRemoteOriginUrl # The URI (SSH or HTTPS) of your Git repository Default: /
--githubAccount # GitHub account/organization name
--description # Product description
--lang # Product's primary programming language Default: Unspecified
--license # Open source software license
--licenseUrl # URL to your LICENSE file Default: ./LICENSE
--name # Product name
-a, --includeApi # README.md: Public API overview (optional) Default: true
-b, --includeBackground # README.md: Background section content (optional) Default: false
-c, --includeConfig # README.md: Configuration instructions (optional) Default: false
-o, --includeOverview # README.md: Overview section content (optional) Default: false
-s, --includeSecurity # README.md: Security section content (optional) Default: false

Example:

$ yo community:readme --authorName "Jane Doe" --authorUrl "https://jdoe.example.com" \
--githubAccount janedoeasindeer --lang JavaScript --licenseName MIT \
--name spike-sln-community \
--description "A spike solution to test generator-community." \
--includeApi --includeConfig --includeSecurity

3.2. yo community:conduct

Quote ...a code of conduct helps set ground rules for behavior for your project’s participants. This is especially valuable if you’re launching an open source project for a community or company. A code of conduct empowers you to facilitate healthy, constructive community behavior, which will reduce your stress as a maintainer.

Owen, K., Keepers, B., Shepherd, S., & Eghbal, N. (2017, February 17). Starting an Open Source Project. Retrieved September 13, 2017, from https://opensource.guide/starting-a-project/#establishing-a-code-of-conduct

3.2.1. Guided assistance

To answer prompts manually, open a Terminal and run

$ yo community:conduct
? Contact email: fake@elsewhere.net
create CODE_OF_CONDUCT.md

3.2.2. CLI automation

You can automate CODE_OF_CONDUCT.md generation via the command line interface (CLI) (e.g., during one of your CI/CD pipelines). To view all CLI options, use the --help or -h option:

$ yo community:conduct --help
Usage:
yo community:conduct [options]
Options:
-h, --help # Print the generator's options and usage
--skip-cache # Do not remember prompt answers Default: false
--skip-install # Do not automatically install dependencies Default: false
--email # Contact email
--generateInto # Destination directory

Example:

$ yo community:conduct --email somebody@example.com
create CODE_OF_CONDUCT.md

3.3. yo community:contributing

Quote A CONTRIBUTING file tells your audience how to participate in your project. For example, you might include information on:

  • How to file a bug report (try using issue and pull request templates)
  • How to suggest a new feature
  • How to set up your environment and run tests

Owen, K., Keepers, B., Shepherd, S., & Eghbal, N. (2017, February 17). Starting an Open Source Project. Retrieved September 13, 2017, from https://opensource.guide/starting-a-project/#writing-your-contributing-guidelines

Alert icon This feature will be delivered with MVP4: community:contribute.

3.4. yo community:license

Quote An open source license guarantees that others can use, copy, modify, and contribute back to your project without repercussions. It also protects you from sticky legal situations. You must include a license when you launch an open source project.

Owen, K., Keepers, B., Shepherd, S., & Eghbal, N. (2017, February 17). Starting an Open Source Project. Retrieved September 13, 2017, from https://opensource.guide/starting-a-project/#launching-your-own-open-source-project


Alert icon If you already have a LICENSE, the community:license subgenerator will prompt you to overwrite it, as well as your package.json.


3.4.1. Guided assistance

To answer prompts manually, open a Terminal and run

$ yo community:license

The community:readme subgenerator will evaluate your product repository's manifests (e.g., package.json for Node.js products, or settings.gradle for Java products) to ensure consistency.

Example:

$ yo community:license
? What's your name: Greg Swindle? Your email (optional): greg@swindle.net? Your website (optional):? Which license do you want to use? Unlicense No License (Copyrighted) Apache 2.0❯ MIT Mozilla Public License 2.0 BSD 2-Clause (FreeBSD) License BSD 3-Clause (NewBSD) License

3.4.2. CLI automation

You can automatically generate a LICENSE file via the command line interface (CLI) (e.g., during one of your CI/CD pipelines). To view all CLI options, use the --help or -h option:

yo community:license -h
Usage:
yo community:license [options]
Options:
-h, --help # Print the generator's options and usage
--skip-cache # Do not remember prompt answers Default: false
--skip-install # Do not automatically install dependencies Default: false
--defaultLicense # Default license
--email # Email of the license owner
--generateInto # Destination directory of the generated files
--license # Enter an SPDX license name
--name # Name of the license owner
--output # Set the output file for the generated license Default: LICENSE
--website # Website of the license owner
--year # Year(s) to include on the license Default: 2017

3.5. Update tables of contents in markdown files

Markdown icon

yo community installs an npm-script that will help keep your documents' table of contents up-to-date. To automatically update your markdown files' tables of contents:

  • Add the following comments to your markdown file(s):
    <!-- ⛔️ AUTO-GENERATED-CONTENT:START (TOC:excludeText=Table of contents) -->
    This text will be replaced by a table of contents 😏 .
    <!-- ⛔️ AUTO-GENERATED-CONTENT:END -->
  • Open a Terminal and run:
    $ npm run docs:toc

For more information, visit DavidWells/markdown-magic.

4. npm-scripts

Software modules often have funky, irrelative names; therefore, we prefix custom tasks by their responsibility and purpose.

PrefixDefinition
build*Source code distribution tasks.
docs*API documentation and automation tasks.
lint*Code style, standards, and vulnerabilty assessments (as well as fixes, if available).
releaseBump the product's semver, update docs, commit, and publish to the npm registry.
security*Security vulnerabilty checks.

The following CLI npm-scripts are available to you (assuming you're human, gentle reader) and CI-services.

ScriptDescription
docsnpm run docs:scripts && npm run docs:toc
docs:tocmd-magic --path '**/*.md' --ignore 'node_modules'
lintnpm run lint:node-version && npm run lint:js && npm run lint:manifest
lint:jseslint ./generators/**/*.js ./__tests__/**/*.js --fix
lint:manifestfixpack
lint:node-versioncheck-node-version --package
prepublishnpm run security
releasestandard-version
securitynpm run security:nsp:scan
security:nsp:scannsp check
pretestnpm prune && npm run lint
testjest --forceExit --config=jest.config.json
posttestnpm run security

5. Semantic version and CHANGELOG

The latest version of commonality/generator-community is 0.0.0. View the CHANGELOG for details.

6. Contributing to generator-community

Learn how to make a Pull Request with free training

We welcome contributors with Pull Requests!

Contributions in the form of GitHub pull requests are welcome. Before embarking on a significant change, please adhere to the following guidelines:

  1. Read the Code of Conduct.
  2. Create an issue to discuss the proposed change and ensure that it is likely to be merged:
  3. Follow Contributing to generator-community's coding conventions and Git workflow if you're willing and able to program (or want to learn how).

7. License

MIT © Greg Swindle.

Third-party software licenses for `generator-community (read the NOTICE file for a detailed report):

FOSSA Status


Conventional CommitsGreenkeeper automated dependency managementREADME score

About

䷤ Generate README, CODE_OF_CONDUCT, CONTRIBUTING, LICENSE, ISSUE_TEMPLATE, and PULL_REQUEST_TEMPLATE repository docs to encourage consumption and invite contributions.

Topics

Resources

Code of conduct

Contributing

Stars

10 stars

Watchers

5 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Highlight search terms from Google/DuckDuckGo/Bing referrer (function() { var ref = document.referrer; var terms = []; if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) { var url = new URL(ref); var q = url.searchParams.get('q') || url.searchParams.get('p'); if (q) { terms = q.split(/\s+/).filter(function(t) { return t.length > 2; }); } } if (terms.length === 0) return; var style = document.createElement('style'); style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }'; document.head.appendChild(style); function highlight(node) { if (node.nodeType === 3) { // text node var text = node.textContent; var found = false; terms.forEach(function(term) { var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\]\\]/g, '\\') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' GitHub - commonality/generator-community: ䷤ Generate README, CODE_OF_CONDUCT, CONTRIBUTING, LICENSE, ISSUE_TEMPLATE, and PULL_REQUEST_TEMPLATE repository docs to encourage consumption and invite contributions. · GitHub
Skip to content

Repository files navigation

generator-community

LicenseDependencies' licensesNSP StatusSynk Vulnerabilities
StackShareDependency StatusdevDependencies Status
Build StatusWindows Build statusCoverage StatusCodacy quality

Generate README, CODE_OF_CONDUCT, CONTRIBUTING, and LICENSE files according to recommended community standards.

Table of contents

1. Overview

generator-community helps product repository maintainers follow the recommended community standards for documentation that communicates expectations, manages contributions, protects participants' legal rights, and optimizes search engine results. generator-community's simple command-line interface prompts you with simple questions in order to generate a:

  1. CODE_OF_CONDUCT.md
  2. CONTRIBUTING.md
  3. Open source LICENSE.md
  4. README.md

Alert icon Currently, generator-community generates a:

  1. .editorconfig
  2. .gitattributes
  3. .gitignore
  4. .yo-rc.json (to store answers for your convenience)
  5. CODE_OF_CONDUCT.md
  6. LICENSE
  7. README.md

generator-community also initializes local Git repository, if one doesn't yet exist.

Please see the Milestones for generator-community's release plan.


2. Installation

2.1. Prerequisite software

  1. Node.js v4.1.1 or greater
  2. npm (which installs with Node.js)
  3. Yeoman (a command-line tool which you will install with npm, and not a manual download)
  4. A package.json application manifest.

HelpVerify prerequisite software...
  • 2.1.2. Verify Node.js availability

    Open a Terminal and find out whether you have Node.js installed. Run:

    $ node --version
    # => v7.7.3

    If you do not have [Node.js][nodejs-url] installed, you will receive an error message similar to:

    # Linux or macOS
    bash: foobar: command not found
    # You need to install Node.js!
  • 2.1.2. Install or update Node.js

    You have two options for installing Node.js.

    The easiest option is to simply download and install Node.js.

    If you feel comfortable using the command line, try one of the following version managers:


    ℹ️ I cannot vouch for the two Windows options, so do a little homework, first.


2.2. Install Yeoman and generator-community

Once you've verified that you have Node.js v4.1.1. or higher installed, open a Terminal and run these two commands:

# Install Yeoman and generator-community globally
$ npm install yo --global
# 💡 The letter "i" is shorthand for "install"; -g is short for --global
$ npm i generator-community -g

3. Usage

Install all four recommended community standards (README, CODE_OF_CONDUCT, CONTRIBUTING, and a LICENSE):

# Generate README.md, CONTRIBUTING.md, CODE_OF_CONDUCT.md, and LICENSE files# per the recommended community community standards:
$ yo community

This will guide you with prompts to help you pre-fill the documents, e.g.,

$ yo community
? GitHub username or organization johndoe
? Product Name spike-repo
? Write a short description/value proposition The most valuable spike in the world....
? Product homepage URL https://example
? Author's name John Doe? Author's e-mail john@doe.info
? Author's homepage https://github.com/johndoe? Package keywords (comma to split) recommended community standards,readme,license,toc,table of contents,markdown? Which programming language does this product use the most? Node.js (JavaScript)? What do you use to manage dependencies (e.g., Gradle, npm, NuGet)? Leave blank if you don't know. npm
? ⦾ 📄 LICENSE: Select a license MIT
? ⦾ 📄 CODE_OF_CONDUCT: Would you like to generate a Code of Conduct? Yes
? ⦾ 📄 README: Select the sections to include in your README Overview, Configuration, Security, API, Background, License
create package.json
create README.md
create .editorconfig
create .gitattributes
create .gitignore
create CODE_OF_CONDUCT.md
create LICENSE
I'm all done. Running npm install for you to install the required dependencies. If this fails, try running the command yourself.> commitplease@2.7.10 install /Users/swindle/Projects/github/commonality/sandbox/spike-repo/node_modules/commitplease> node install> git-validate@2.2.2 install /Users/swindle/Projects/github/commonality/sandbox/spike-repo/node_modules/nsp/node_modules/git-validate> node bin/installnpm WARN prepublish-on-install As of npm@5, `prepublish` scripts are deprecated.npm WARN prepublish-on-install Use `prepare` for build steps and `prepublishOnly` for upload-only.npm WARN prepublish-on-install See the deprecation note in `npm help scripts` for more information.> spike-repo@0.0.0 prepublish /Users/swindle/Projects/github/commonality/sandbox/spike-repo> nsp check(+) No known vulnerabilities found> spike-repo@0.0.0 prepare /Users/swindle/Projects/github/commonality/sandbox/spike-repo> npm run lint && npm run security> spike-repo@0.0.0 lint /Users/swindle/Projects/github/commonality/sandbox/spike-repo> npm run lint:manifest> spike-repo@0.0.0 lint:manifest /Users/swindle/Projects/github/commonality/sandbox/spike-repo> fixpackmissing mainpackage.json fixed!> spike-repo@0.0.0 security /Users/swindle/Projects/github/commonality/sandbox/spike-repo> npm run security:nsp:scan> spike-repo@0.0.0 security:nsp:scan /Users/swindle/Projects/github/commonality/sandbox/spike-repo> nsp check(+) No known vulnerabilities foundnpm notice created a lockfile as package-lock.json. You should commit this file.added 571 packages in 9.146sThank you for generating community!✔ /README.md Updated Transforms run ⁕ TOC:excludeText=Table of contents

3.1. yo community:readme

Quote READMEs do more than explain how to use your project. They also explain why your project matters, and what your users can do with it.

In your README, try to answer the following questions:

  • What does this project do?

  • Why is this project useful?

  • How do I get started?

  • Where can I get more help, if I need it?

Owen, K., Keepers, B., Shepherd, S., & Eghbal, N. (2017, February 17). Starting an Open Source Project. Retrieved September 13, 2017, from https://opensource.guide/starting-a-project/#writing-a-readme

3.1.1. Guided assistance

To answer prompts manually, open a Terminal and run

$ yo community:readme

The community:readme subgenerator will evaluate your product repository's manifests (e.g., package.json for Node.js products, or settings.gradle for Java products) to ensure consistency.

3.1.2. CLI automation

You can automate README.md documentation via the command line interface (CLI) (e.g., during one of your CI/CD pipelines). To view all CLI options, use the --help or -h option:

$ yo community:readme -h
Usage:
yo community:readme [options]
Options:
-h, --help # Print the generator's options and usage
--skip-cache # Do not remember prompt answers Default: false
--skip-install # Do not automatically install dependencies Default: false
--authorName # Author name
--authorUrl # Author URL
--dependencyManager # Tool used to install third-party libraries Default: Unspecified
--generateInto # Destination directory for generated files
--gitRemoteOriginUrl # The URI (SSH or HTTPS) of your Git repository Default: /
--githubAccount # GitHub account/organization name
--description # Product description
--lang # Product's primary programming language Default: Unspecified
--license # Open source software license
--licenseUrl # URL to your LICENSE file Default: ./LICENSE
--name # Product name
-a, --includeApi # README.md: Public API overview (optional) Default: true
-b, --includeBackground # README.md: Background section content (optional) Default: false
-c, --includeConfig # README.md: Configuration instructions (optional) Default: false
-o, --includeOverview # README.md: Overview section content (optional) Default: false
-s, --includeSecurity # README.md: Security section content (optional) Default: false

Example:

$ yo community:readme --authorName "Jane Doe" --authorUrl "https://jdoe.example.com" \
--githubAccount janedoeasindeer --lang JavaScript --licenseName MIT \
--name spike-sln-community \
--description "A spike solution to test generator-community." \
--includeApi --includeConfig --includeSecurity

3.2. yo community:conduct

Quote ...a code of conduct helps set ground rules for behavior for your project’s participants. This is especially valuable if you’re launching an open source project for a community or company. A code of conduct empowers you to facilitate healthy, constructive community behavior, which will reduce your stress as a maintainer.

Owen, K., Keepers, B., Shepherd, S., & Eghbal, N. (2017, February 17). Starting an Open Source Project. Retrieved September 13, 2017, from https://opensource.guide/starting-a-project/#establishing-a-code-of-conduct

3.2.1. Guided assistance

To answer prompts manually, open a Terminal and run

$ yo community:conduct
? Contact email: fake@elsewhere.net
create CODE_OF_CONDUCT.md

3.2.2. CLI automation

You can automate CODE_OF_CONDUCT.md generation via the command line interface (CLI) (e.g., during one of your CI/CD pipelines). To view all CLI options, use the --help or -h option:

$ yo community:conduct --help
Usage:
yo community:conduct [options]
Options:
-h, --help # Print the generator's options and usage
--skip-cache # Do not remember prompt answers Default: false
--skip-install # Do not automatically install dependencies Default: false
--email # Contact email
--generateInto # Destination directory

Example:

$ yo community:conduct --email somebody@example.com
create CODE_OF_CONDUCT.md

3.3. yo community:contributing

Quote A CONTRIBUTING file tells your audience how to participate in your project. For example, you might include information on:

  • How to file a bug report (try using issue and pull request templates)
  • How to suggest a new feature
  • How to set up your environment and run tests

Owen, K., Keepers, B., Shepherd, S., & Eghbal, N. (2017, February 17). Starting an Open Source Project. Retrieved September 13, 2017, from https://opensource.guide/starting-a-project/#writing-your-contributing-guidelines

Alert icon This feature will be delivered with MVP4: community:contribute.

3.4. yo community:license

Quote An open source license guarantees that others can use, copy, modify, and contribute back to your project without repercussions. It also protects you from sticky legal situations. You must include a license when you launch an open source project.

Owen, K., Keepers, B., Shepherd, S., & Eghbal, N. (2017, February 17). Starting an Open Source Project. Retrieved September 13, 2017, from https://opensource.guide/starting-a-project/#launching-your-own-open-source-project


Alert icon If you already have a LICENSE, the community:license subgenerator will prompt you to overwrite it, as well as your package.json.


3.4.1. Guided assistance

To answer prompts manually, open a Terminal and run

$ yo community:license

The community:readme subgenerator will evaluate your product repository's manifests (e.g., package.json for Node.js products, or settings.gradle for Java products) to ensure consistency.

Example:

$ yo community:license
? What's your name: Greg Swindle? Your email (optional): greg@swindle.net? Your website (optional):? Which license do you want to use? Unlicense No License (Copyrighted) Apache 2.0❯ MIT Mozilla Public License 2.0 BSD 2-Clause (FreeBSD) License BSD 3-Clause (NewBSD) License

3.4.2. CLI automation

You can automatically generate a LICENSE file via the command line interface (CLI) (e.g., during one of your CI/CD pipelines). To view all CLI options, use the --help or -h option:

yo community:license -h
Usage:
yo community:license [options]
Options:
-h, --help # Print the generator's options and usage
--skip-cache # Do not remember prompt answers Default: false
--skip-install # Do not automatically install dependencies Default: false
--defaultLicense # Default license
--email # Email of the license owner
--generateInto # Destination directory of the generated files
--license # Enter an SPDX license name
--name # Name of the license owner
--output # Set the output file for the generated license Default: LICENSE
--website # Website of the license owner
--year # Year(s) to include on the license Default: 2017

3.5. Update tables of contents in markdown files

Markdown icon

yo community installs an npm-script that will help keep your documents' table of contents up-to-date. To automatically update your markdown files' tables of contents:

  • Add the following comments to your markdown file(s):
    <!-- ⛔️ AUTO-GENERATED-CONTENT:START (TOC:excludeText=Table of contents) -->
    This text will be replaced by a table of contents 😏 .
    <!-- ⛔️ AUTO-GENERATED-CONTENT:END -->
  • Open a Terminal and run:
    $ npm run docs:toc

For more information, visit DavidWells/markdown-magic.

4. npm-scripts

Software modules often have funky, irrelative names; therefore, we prefix custom tasks by their responsibility and purpose.

PrefixDefinition
build*Source code distribution tasks.
docs*API documentation and automation tasks.
lint*Code style, standards, and vulnerabilty assessments (as well as fixes, if available).
releaseBump the product's semver, update docs, commit, and publish to the npm registry.
security*Security vulnerabilty checks.

The following CLI npm-scripts are available to you (assuming you're human, gentle reader) and CI-services.

ScriptDescription
docsnpm run docs:scripts && npm run docs:toc
docs:tocmd-magic --path '**/*.md' --ignore 'node_modules'
lintnpm run lint:node-version && npm run lint:js && npm run lint:manifest
lint:jseslint ./generators/**/*.js ./__tests__/**/*.js --fix
lint:manifestfixpack
lint:node-versioncheck-node-version --package
prepublishnpm run security
releasestandard-version
securitynpm run security:nsp:scan
security:nsp:scannsp check
pretestnpm prune && npm run lint
testjest --forceExit --config=jest.config.json
posttestnpm run security

5. Semantic version and CHANGELOG

The latest version of commonality/generator-community is 0.0.0. View the CHANGELOG for details.

6. Contributing to generator-community

Learn how to make a Pull Request with free training

We welcome contributors with Pull Requests!

Contributions in the form of GitHub pull requests are welcome. Before embarking on a significant change, please adhere to the following guidelines:

  1. Read the Code of Conduct.
  2. Create an issue to discuss the proposed change and ensure that it is likely to be merged:
  3. Follow Contributing to generator-community's coding conventions and Git workflow if you're willing and able to program (or want to learn how).

7. License

MIT © Greg Swindle.

Third-party software licenses for `generator-community (read the NOTICE file for a detailed report):

FOSSA Status


Conventional CommitsGreenkeeper automated dependency managementREADME score

About

䷤ Generate README, CODE_OF_CONDUCT, CONTRIBUTING, LICENSE, ISSUE_TEMPLATE, and PULL_REQUEST_TEMPLATE repository docs to encourage consumption and invite contributions.

Topics

Resources

Code of conduct

Contributing

Stars

10 stars

Watchers

5 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ' GitHub - commonality/generator-community: ䷤ Generate README, CODE_OF_CONDUCT, CONTRIBUTING, LICENSE, ISSUE_TEMPLATE, and PULL_REQUEST_TEMPLATE repository docs to encourage consumption and invite contributions. · GitHub
Skip to content

Repository files navigation

generator-community

LicenseDependencies' licensesNSP StatusSynk Vulnerabilities
StackShareDependency StatusdevDependencies Status
Build StatusWindows Build statusCoverage StatusCodacy quality

Generate README, CODE_OF_CONDUCT, CONTRIBUTING, and LICENSE files according to recommended community standards.

Table of contents

1. Overview

generator-community helps product repository maintainers follow the recommended community standards for documentation that communicates expectations, manages contributions, protects participants' legal rights, and optimizes search engine results. generator-community's simple command-line interface prompts you with simple questions in order to generate a:

  1. CODE_OF_CONDUCT.md
  2. CONTRIBUTING.md
  3. Open source LICENSE.md
  4. README.md

Alert icon Currently, generator-community generates a:

  1. .editorconfig
  2. .gitattributes
  3. .gitignore
  4. .yo-rc.json (to store answers for your convenience)
  5. CODE_OF_CONDUCT.md
  6. LICENSE
  7. README.md

generator-community also initializes local Git repository, if one doesn't yet exist.

Please see the Milestones for generator-community's release plan.


2. Installation

2.1. Prerequisite software

  1. Node.js v4.1.1 or greater
  2. npm (which installs with Node.js)
  3. Yeoman (a command-line tool which you will install with npm, and not a manual download)
  4. A package.json application manifest.

HelpVerify prerequisite software...
  • 2.1.2. Verify Node.js availability

    Open a Terminal and find out whether you have Node.js installed. Run:

    $ node --version
    # => v7.7.3

    If you do not have [Node.js][nodejs-url] installed, you will receive an error message similar to:

    # Linux or macOS
    bash: foobar: command not found
    # You need to install Node.js!
  • 2.1.2. Install or update Node.js

    You have two options for installing Node.js.

    The easiest option is to simply download and install Node.js.

    If you feel comfortable using the command line, try one of the following version managers:


    ℹ️ I cannot vouch for the two Windows options, so do a little homework, first.


2.2. Install Yeoman and generator-community

Once you've verified that you have Node.js v4.1.1. or higher installed, open a Terminal and run these two commands:

# Install Yeoman and generator-community globally
$ npm install yo --global
# 💡 The letter "i" is shorthand for "install"; -g is short for --global
$ npm i generator-community -g

3. Usage

Install all four recommended community standards (README, CODE_OF_CONDUCT, CONTRIBUTING, and a LICENSE):

# Generate README.md, CONTRIBUTING.md, CODE_OF_CONDUCT.md, and LICENSE files# per the recommended community community standards:
$ yo community

This will guide you with prompts to help you pre-fill the documents, e.g.,

$ yo community
? GitHub username or organization johndoe
? Product Name spike-repo
? Write a short description/value proposition The most valuable spike in the world....
? Product homepage URL https://example
? Author's name John Doe? Author's e-mail john@doe.info
? Author's homepage https://github.com/johndoe? Package keywords (comma to split) recommended community standards,readme,license,toc,table of contents,markdown? Which programming language does this product use the most? Node.js (JavaScript)? What do you use to manage dependencies (e.g., Gradle, npm, NuGet)? Leave blank if you don't know. npm
? ⦾ 📄 LICENSE: Select a license MIT
? ⦾ 📄 CODE_OF_CONDUCT: Would you like to generate a Code of Conduct? Yes
? ⦾ 📄 README: Select the sections to include in your README Overview, Configuration, Security, API, Background, License
create package.json
create README.md
create .editorconfig
create .gitattributes
create .gitignore
create CODE_OF_CONDUCT.md
create LICENSE
I'm all done. Running npm install for you to install the required dependencies. If this fails, try running the command yourself.> commitplease@2.7.10 install /Users/swindle/Projects/github/commonality/sandbox/spike-repo/node_modules/commitplease> node install> git-validate@2.2.2 install /Users/swindle/Projects/github/commonality/sandbox/spike-repo/node_modules/nsp/node_modules/git-validate> node bin/installnpm WARN prepublish-on-install As of npm@5, `prepublish` scripts are deprecated.npm WARN prepublish-on-install Use `prepare` for build steps and `prepublishOnly` for upload-only.npm WARN prepublish-on-install See the deprecation note in `npm help scripts` for more information.> spike-repo@0.0.0 prepublish /Users/swindle/Projects/github/commonality/sandbox/spike-repo> nsp check(+) No known vulnerabilities found> spike-repo@0.0.0 prepare /Users/swindle/Projects/github/commonality/sandbox/spike-repo> npm run lint && npm run security> spike-repo@0.0.0 lint /Users/swindle/Projects/github/commonality/sandbox/spike-repo> npm run lint:manifest> spike-repo@0.0.0 lint:manifest /Users/swindle/Projects/github/commonality/sandbox/spike-repo> fixpackmissing mainpackage.json fixed!> spike-repo@0.0.0 security /Users/swindle/Projects/github/commonality/sandbox/spike-repo> npm run security:nsp:scan> spike-repo@0.0.0 security:nsp:scan /Users/swindle/Projects/github/commonality/sandbox/spike-repo> nsp check(+) No known vulnerabilities foundnpm notice created a lockfile as package-lock.json. You should commit this file.added 571 packages in 9.146sThank you for generating community!✔ /README.md Updated Transforms run ⁕ TOC:excludeText=Table of contents

3.1. yo community:readme

Quote READMEs do more than explain how to use your project. They also explain why your project matters, and what your users can do with it.

In your README, try to answer the following questions:

  • What does this project do?

  • Why is this project useful?

  • How do I get started?

  • Where can I get more help, if I need it?

Owen, K., Keepers, B., Shepherd, S., & Eghbal, N. (2017, February 17). Starting an Open Source Project. Retrieved September 13, 2017, from https://opensource.guide/starting-a-project/#writing-a-readme

3.1.1. Guided assistance

To answer prompts manually, open a Terminal and run

$ yo community:readme

The community:readme subgenerator will evaluate your product repository's manifests (e.g., package.json for Node.js products, or settings.gradle for Java products) to ensure consistency.

3.1.2. CLI automation

You can automate README.md documentation via the command line interface (CLI) (e.g., during one of your CI/CD pipelines). To view all CLI options, use the --help or -h option:

$ yo community:readme -h
Usage:
yo community:readme [options]
Options:
-h, --help # Print the generator's options and usage
--skip-cache # Do not remember prompt answers Default: false
--skip-install # Do not automatically install dependencies Default: false
--authorName # Author name
--authorUrl # Author URL
--dependencyManager # Tool used to install third-party libraries Default: Unspecified
--generateInto # Destination directory for generated files
--gitRemoteOriginUrl # The URI (SSH or HTTPS) of your Git repository Default: /
--githubAccount # GitHub account/organization name
--description # Product description
--lang # Product's primary programming language Default: Unspecified
--license # Open source software license
--licenseUrl # URL to your LICENSE file Default: ./LICENSE
--name # Product name
-a, --includeApi # README.md: Public API overview (optional) Default: true
-b, --includeBackground # README.md: Background section content (optional) Default: false
-c, --includeConfig # README.md: Configuration instructions (optional) Default: false
-o, --includeOverview # README.md: Overview section content (optional) Default: false
-s, --includeSecurity # README.md: Security section content (optional) Default: false

Example:

$ yo community:readme --authorName "Jane Doe" --authorUrl "https://jdoe.example.com" \
--githubAccount janedoeasindeer --lang JavaScript --licenseName MIT \
--name spike-sln-community \
--description "A spike solution to test generator-community." \
--includeApi --includeConfig --includeSecurity

3.2. yo community:conduct

Quote ...a code of conduct helps set ground rules for behavior for your project’s participants. This is especially valuable if you’re launching an open source project for a community or company. A code of conduct empowers you to facilitate healthy, constructive community behavior, which will reduce your stress as a maintainer.

Owen, K., Keepers, B., Shepherd, S., & Eghbal, N. (2017, February 17). Starting an Open Source Project. Retrieved September 13, 2017, from https://opensource.guide/starting-a-project/#establishing-a-code-of-conduct

3.2.1. Guided assistance

To answer prompts manually, open a Terminal and run

$ yo community:conduct
? Contact email: fake@elsewhere.net
create CODE_OF_CONDUCT.md

3.2.2. CLI automation

You can automate CODE_OF_CONDUCT.md generation via the command line interface (CLI) (e.g., during one of your CI/CD pipelines). To view all CLI options, use the --help or -h option:

$ yo community:conduct --help
Usage:
yo community:conduct [options]
Options:
-h, --help # Print the generator's options and usage
--skip-cache # Do not remember prompt answers Default: false
--skip-install # Do not automatically install dependencies Default: false
--email # Contact email
--generateInto # Destination directory

Example:

$ yo community:conduct --email somebody@example.com
create CODE_OF_CONDUCT.md

3.3. yo community:contributing

Quote A CONTRIBUTING file tells your audience how to participate in your project. For example, you might include information on:

  • How to file a bug report (try using issue and pull request templates)
  • How to suggest a new feature
  • How to set up your environment and run tests

Owen, K., Keepers, B., Shepherd, S., & Eghbal, N. (2017, February 17). Starting an Open Source Project. Retrieved September 13, 2017, from https://opensource.guide/starting-a-project/#writing-your-contributing-guidelines

Alert icon This feature will be delivered with MVP4: community:contribute.

3.4. yo community:license

Quote An open source license guarantees that others can use, copy, modify, and contribute back to your project without repercussions. It also protects you from sticky legal situations. You must include a license when you launch an open source project.

Owen, K., Keepers, B., Shepherd, S., & Eghbal, N. (2017, February 17). Starting an Open Source Project. Retrieved September 13, 2017, from https://opensource.guide/starting-a-project/#launching-your-own-open-source-project


Alert icon If you already have a LICENSE, the community:license subgenerator will prompt you to overwrite it, as well as your package.json.


3.4.1. Guided assistance

To answer prompts manually, open a Terminal and run

$ yo community:license

The community:readme subgenerator will evaluate your product repository's manifests (e.g., package.json for Node.js products, or settings.gradle for Java products) to ensure consistency.

Example:

$ yo community:license
? What's your name: Greg Swindle? Your email (optional): greg@swindle.net? Your website (optional):? Which license do you want to use? Unlicense No License (Copyrighted) Apache 2.0❯ MIT Mozilla Public License 2.0 BSD 2-Clause (FreeBSD) License BSD 3-Clause (NewBSD) License

3.4.2. CLI automation

You can automatically generate a LICENSE file via the command line interface (CLI) (e.g., during one of your CI/CD pipelines). To view all CLI options, use the --help or -h option:

yo community:license -h
Usage:
yo community:license [options]
Options:
-h, --help # Print the generator's options and usage
--skip-cache # Do not remember prompt answers Default: false
--skip-install # Do not automatically install dependencies Default: false
--defaultLicense # Default license
--email # Email of the license owner
--generateInto # Destination directory of the generated files
--license # Enter an SPDX license name
--name # Name of the license owner
--output # Set the output file for the generated license Default: LICENSE
--website # Website of the license owner
--year # Year(s) to include on the license Default: 2017

3.5. Update tables of contents in markdown files

Markdown icon

yo community installs an npm-script that will help keep your documents' table of contents up-to-date. To automatically update your markdown files' tables of contents:

  • Add the following comments to your markdown file(s):
    <!-- ⛔️ AUTO-GENERATED-CONTENT:START (TOC:excludeText=Table of contents) -->
    This text will be replaced by a table of contents 😏 .
    <!-- ⛔️ AUTO-GENERATED-CONTENT:END -->
  • Open a Terminal and run:
    $ npm run docs:toc

For more information, visit DavidWells/markdown-magic.

4. npm-scripts

Software modules often have funky, irrelative names; therefore, we prefix custom tasks by their responsibility and purpose.

PrefixDefinition
build*Source code distribution tasks.
docs*API documentation and automation tasks.
lint*Code style, standards, and vulnerabilty assessments (as well as fixes, if available).
releaseBump the product's semver, update docs, commit, and publish to the npm registry.
security*Security vulnerabilty checks.

The following CLI npm-scripts are available to you (assuming you're human, gentle reader) and CI-services.

ScriptDescription
docsnpm run docs:scripts && npm run docs:toc
docs:tocmd-magic --path '**/*.md' --ignore 'node_modules'
lintnpm run lint:node-version && npm run lint:js && npm run lint:manifest
lint:jseslint ./generators/**/*.js ./__tests__/**/*.js --fix
lint:manifestfixpack
lint:node-versioncheck-node-version --package
prepublishnpm run security
releasestandard-version
securitynpm run security:nsp:scan
security:nsp:scannsp check
pretestnpm prune && npm run lint
testjest --forceExit --config=jest.config.json
posttestnpm run security

5. Semantic version and CHANGELOG

The latest version of commonality/generator-community is 0.0.0. View the CHANGELOG for details.

6. Contributing to generator-community

Learn how to make a Pull Request with free training

We welcome contributors with Pull Requests!

Contributions in the form of GitHub pull requests are welcome. Before embarking on a significant change, please adhere to the following guidelines:

  1. Read the Code of Conduct.
  2. Create an issue to discuss the proposed change and ensure that it is likely to be merged:
  3. Follow Contributing to generator-community's coding conventions and Git workflow if you're willing and able to program (or want to learn how).

7. License

MIT © Greg Swindle.

Third-party software licenses for `generator-community (read the NOTICE file for a detailed report):

FOSSA Status


Conventional CommitsGreenkeeper automated dependency managementREADME score

About

䷤ Generate README, CODE_OF_CONDUCT, CONTRIBUTING, LICENSE, ISSUE_TEMPLATE, and PULL_REQUEST_TEMPLATE repository docs to encourage consumption and invite contributions.

Topics

Resources

Code of conduct

Contributing

Stars

10 stars

Watchers

5 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' GitHub - commonality/generator-community: ䷤ Generate README, CODE_OF_CONDUCT, CONTRIBUTING, LICENSE, ISSUE_TEMPLATE, and PULL_REQUEST_TEMPLATE repository docs to encourage consumption and invite contributions. · GitHub
Skip to content

Repository files navigation

generator-community

LicenseDependencies' licensesNSP StatusSynk Vulnerabilities
StackShareDependency StatusdevDependencies Status
Build StatusWindows Build statusCoverage StatusCodacy quality

Generate README, CODE_OF_CONDUCT, CONTRIBUTING, and LICENSE files according to recommended community standards.

Table of contents

1. Overview

generator-community helps product repository maintainers follow the recommended community standards for documentation that communicates expectations, manages contributions, protects participants' legal rights, and optimizes search engine results. generator-community's simple command-line interface prompts you with simple questions in order to generate a:

  1. CODE_OF_CONDUCT.md
  2. CONTRIBUTING.md
  3. Open source LICENSE.md
  4. README.md

Alert icon Currently, generator-community generates a:

  1. .editorconfig
  2. .gitattributes
  3. .gitignore
  4. .yo-rc.json (to store answers for your convenience)
  5. CODE_OF_CONDUCT.md
  6. LICENSE
  7. README.md

generator-community also initializes local Git repository, if one doesn't yet exist.

Please see the Milestones for generator-community's release plan.


2. Installation

2.1. Prerequisite software

  1. Node.js v4.1.1 or greater
  2. npm (which installs with Node.js)
  3. Yeoman (a command-line tool which you will install with npm, and not a manual download)
  4. A package.json application manifest.

HelpVerify prerequisite software...
  • 2.1.2. Verify Node.js availability

    Open a Terminal and find out whether you have Node.js installed. Run:

    $ node --version
    # => v7.7.3

    If you do not have [Node.js][nodejs-url] installed, you will receive an error message similar to:

    # Linux or macOS
    bash: foobar: command not found
    # You need to install Node.js!
  • 2.1.2. Install or update Node.js

    You have two options for installing Node.js.

    The easiest option is to simply download and install Node.js.

    If you feel comfortable using the command line, try one of the following version managers:


    ℹ️ I cannot vouch for the two Windows options, so do a little homework, first.


2.2. Install Yeoman and generator-community

Once you've verified that you have Node.js v4.1.1. or higher installed, open a Terminal and run these two commands:

# Install Yeoman and generator-community globally
$ npm install yo --global
# 💡 The letter "i" is shorthand for "install"; -g is short for --global
$ npm i generator-community -g

3. Usage

Install all four recommended community standards (README, CODE_OF_CONDUCT, CONTRIBUTING, and a LICENSE):

# Generate README.md, CONTRIBUTING.md, CODE_OF_CONDUCT.md, and LICENSE files# per the recommended community community standards:
$ yo community

This will guide you with prompts to help you pre-fill the documents, e.g.,

$ yo community
? GitHub username or organization johndoe
? Product Name spike-repo
? Write a short description/value proposition The most valuable spike in the world....
? Product homepage URL https://example
? Author's name John Doe? Author's e-mail john@doe.info
? Author's homepage https://github.com/johndoe? Package keywords (comma to split) recommended community standards,readme,license,toc,table of contents,markdown? Which programming language does this product use the most? Node.js (JavaScript)? What do you use to manage dependencies (e.g., Gradle, npm, NuGet)? Leave blank if you don't know. npm
? ⦾ 📄 LICENSE: Select a license MIT
? ⦾ 📄 CODE_OF_CONDUCT: Would you like to generate a Code of Conduct? Yes
? ⦾ 📄 README: Select the sections to include in your README Overview, Configuration, Security, API, Background, License
create package.json
create README.md
create .editorconfig
create .gitattributes
create .gitignore
create CODE_OF_CONDUCT.md
create LICENSE
I'm all done. Running npm install for you to install the required dependencies. If this fails, try running the command yourself.> commitplease@2.7.10 install /Users/swindle/Projects/github/commonality/sandbox/spike-repo/node_modules/commitplease> node install> git-validate@2.2.2 install /Users/swindle/Projects/github/commonality/sandbox/spike-repo/node_modules/nsp/node_modules/git-validate> node bin/installnpm WARN prepublish-on-install As of npm@5, `prepublish` scripts are deprecated.npm WARN prepublish-on-install Use `prepare` for build steps and `prepublishOnly` for upload-only.npm WARN prepublish-on-install See the deprecation note in `npm help scripts` for more information.> spike-repo@0.0.0 prepublish /Users/swindle/Projects/github/commonality/sandbox/spike-repo> nsp check(+) No known vulnerabilities found> spike-repo@0.0.0 prepare /Users/swindle/Projects/github/commonality/sandbox/spike-repo> npm run lint && npm run security> spike-repo@0.0.0 lint /Users/swindle/Projects/github/commonality/sandbox/spike-repo> npm run lint:manifest> spike-repo@0.0.0 lint:manifest /Users/swindle/Projects/github/commonality/sandbox/spike-repo> fixpackmissing mainpackage.json fixed!> spike-repo@0.0.0 security /Users/swindle/Projects/github/commonality/sandbox/spike-repo> npm run security:nsp:scan> spike-repo@0.0.0 security:nsp:scan /Users/swindle/Projects/github/commonality/sandbox/spike-repo> nsp check(+) No known vulnerabilities foundnpm notice created a lockfile as package-lock.json. You should commit this file.added 571 packages in 9.146sThank you for generating community!✔ /README.md Updated Transforms run ⁕ TOC:excludeText=Table of contents

3.1. yo community:readme

Quote READMEs do more than explain how to use your project. They also explain why your project matters, and what your users can do with it.

In your README, try to answer the following questions:

  • What does this project do?

  • Why is this project useful?

  • How do I get started?

  • Where can I get more help, if I need it?

Owen, K., Keepers, B., Shepherd, S., & Eghbal, N. (2017, February 17). Starting an Open Source Project. Retrieved September 13, 2017, from https://opensource.guide/starting-a-project/#writing-a-readme

3.1.1. Guided assistance

To answer prompts manually, open a Terminal and run

$ yo community:readme

The community:readme subgenerator will evaluate your product repository's manifests (e.g., package.json for Node.js products, or settings.gradle for Java products) to ensure consistency.

3.1.2. CLI automation

You can automate README.md documentation via the command line interface (CLI) (e.g., during one of your CI/CD pipelines). To view all CLI options, use the --help or -h option:

$ yo community:readme -h
Usage:
yo community:readme [options]
Options:
-h, --help # Print the generator's options and usage
--skip-cache # Do not remember prompt answers Default: false
--skip-install # Do not automatically install dependencies Default: false
--authorName # Author name
--authorUrl # Author URL
--dependencyManager # Tool used to install third-party libraries Default: Unspecified
--generateInto # Destination directory for generated files
--gitRemoteOriginUrl # The URI (SSH or HTTPS) of your Git repository Default: /
--githubAccount # GitHub account/organization name
--description # Product description
--lang # Product's primary programming language Default: Unspecified
--license # Open source software license
--licenseUrl # URL to your LICENSE file Default: ./LICENSE
--name # Product name
-a, --includeApi # README.md: Public API overview (optional) Default: true
-b, --includeBackground # README.md: Background section content (optional) Default: false
-c, --includeConfig # README.md: Configuration instructions (optional) Default: false
-o, --includeOverview # README.md: Overview section content (optional) Default: false
-s, --includeSecurity # README.md: Security section content (optional) Default: false

Example:

$ yo community:readme --authorName "Jane Doe" --authorUrl "https://jdoe.example.com" \
--githubAccount janedoeasindeer --lang JavaScript --licenseName MIT \
--name spike-sln-community \
--description "A spike solution to test generator-community." \
--includeApi --includeConfig --includeSecurity

3.2. yo community:conduct

Quote ...a code of conduct helps set ground rules for behavior for your project’s participants. This is especially valuable if you’re launching an open source project for a community or company. A code of conduct empowers you to facilitate healthy, constructive community behavior, which will reduce your stress as a maintainer.

Owen, K., Keepers, B., Shepherd, S., & Eghbal, N. (2017, February 17). Starting an Open Source Project. Retrieved September 13, 2017, from https://opensource.guide/starting-a-project/#establishing-a-code-of-conduct

3.2.1. Guided assistance

To answer prompts manually, open a Terminal and run

$ yo community:conduct
? Contact email: fake@elsewhere.net
create CODE_OF_CONDUCT.md

3.2.2. CLI automation

You can automate CODE_OF_CONDUCT.md generation via the command line interface (CLI) (e.g., during one of your CI/CD pipelines). To view all CLI options, use the --help or -h option:

$ yo community:conduct --help
Usage:
yo community:conduct [options]
Options:
-h, --help # Print the generator's options and usage
--skip-cache # Do not remember prompt answers Default: false
--skip-install # Do not automatically install dependencies Default: false
--email # Contact email
--generateInto # Destination directory

Example:

$ yo community:conduct --email somebody@example.com
create CODE_OF_CONDUCT.md

3.3. yo community:contributing

Quote A CONTRIBUTING file tells your audience how to participate in your project. For example, you might include information on:

  • How to file a bug report (try using issue and pull request templates)
  • How to suggest a new feature
  • How to set up your environment and run tests

Owen, K., Keepers, B., Shepherd, S., & Eghbal, N. (2017, February 17). Starting an Open Source Project. Retrieved September 13, 2017, from https://opensource.guide/starting-a-project/#writing-your-contributing-guidelines

Alert icon This feature will be delivered with MVP4: community:contribute.

3.4. yo community:license

Quote An open source license guarantees that others can use, copy, modify, and contribute back to your project without repercussions. It also protects you from sticky legal situations. You must include a license when you launch an open source project.

Owen, K., Keepers, B., Shepherd, S., & Eghbal, N. (2017, February 17). Starting an Open Source Project. Retrieved September 13, 2017, from https://opensource.guide/starting-a-project/#launching-your-own-open-source-project


Alert icon If you already have a LICENSE, the community:license subgenerator will prompt you to overwrite it, as well as your package.json.


3.4.1. Guided assistance

To answer prompts manually, open a Terminal and run

$ yo community:license

The community:readme subgenerator will evaluate your product repository's manifests (e.g., package.json for Node.js products, or settings.gradle for Java products) to ensure consistency.

Example:

$ yo community:license
? What's your name: Greg Swindle? Your email (optional): greg@swindle.net? Your website (optional):? Which license do you want to use? Unlicense No License (Copyrighted) Apache 2.0❯ MIT Mozilla Public License 2.0 BSD 2-Clause (FreeBSD) License BSD 3-Clause (NewBSD) License

3.4.2. CLI automation

You can automatically generate a LICENSE file via the command line interface (CLI) (e.g., during one of your CI/CD pipelines). To view all CLI options, use the --help or -h option:

yo community:license -h
Usage:
yo community:license [options]
Options:
-h, --help # Print the generator's options and usage
--skip-cache # Do not remember prompt answers Default: false
--skip-install # Do not automatically install dependencies Default: false
--defaultLicense # Default license
--email # Email of the license owner
--generateInto # Destination directory of the generated files
--license # Enter an SPDX license name
--name # Name of the license owner
--output # Set the output file for the generated license Default: LICENSE
--website # Website of the license owner
--year # Year(s) to include on the license Default: 2017

3.5. Update tables of contents in markdown files

Markdown icon

yo community installs an npm-script that will help keep your documents' table of contents up-to-date. To automatically update your markdown files' tables of contents:

  • Add the following comments to your markdown file(s):
    <!-- ⛔️ AUTO-GENERATED-CONTENT:START (TOC:excludeText=Table of contents) -->
    This text will be replaced by a table of contents 😏 .
    <!-- ⛔️ AUTO-GENERATED-CONTENT:END -->
  • Open a Terminal and run:
    $ npm run docs:toc

For more information, visit DavidWells/markdown-magic.

4. npm-scripts

Software modules often have funky, irrelative names; therefore, we prefix custom tasks by their responsibility and purpose.

PrefixDefinition
build*Source code distribution tasks.
docs*API documentation and automation tasks.
lint*Code style, standards, and vulnerabilty assessments (as well as fixes, if available).
releaseBump the product's semver, update docs, commit, and publish to the npm registry.
security*Security vulnerabilty checks.

The following CLI npm-scripts are available to you (assuming you're human, gentle reader) and CI-services.

ScriptDescription
docsnpm run docs:scripts && npm run docs:toc
docs:tocmd-magic --path '**/*.md' --ignore 'node_modules'
lintnpm run lint:node-version && npm run lint:js && npm run lint:manifest
lint:jseslint ./generators/**/*.js ./__tests__/**/*.js --fix
lint:manifestfixpack
lint:node-versioncheck-node-version --package
prepublishnpm run security
releasestandard-version
securitynpm run security:nsp:scan
security:nsp:scannsp check
pretestnpm prune && npm run lint
testjest --forceExit --config=jest.config.json
posttestnpm run security

5. Semantic version and CHANGELOG

The latest version of commonality/generator-community is 0.0.0. View the CHANGELOG for details.

6. Contributing to generator-community

Learn how to make a Pull Request with free training

We welcome contributors with Pull Requests!

Contributions in the form of GitHub pull requests are welcome. Before embarking on a significant change, please adhere to the following guidelines:

  1. Read the Code of Conduct.
  2. Create an issue to discuss the proposed change and ensure that it is likely to be merged:
  3. Follow Contributing to generator-community's coding conventions and Git workflow if you're willing and able to program (or want to learn how).

7. License

MIT © Greg Swindle.

Third-party software licenses for `generator-community (read the NOTICE file for a detailed report):

FOSSA Status


Conventional CommitsGreenkeeper automated dependency managementREADME score

About

䷤ Generate README, CODE_OF_CONDUCT, CONTRIBUTING, LICENSE, ISSUE_TEMPLATE, and PULL_REQUEST_TEMPLATE repository docs to encourage consumption and invite contributions.

Topics

Resources

Code of conduct

Contributing

Stars

10 stars

Watchers

5 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' GitHub - commonality/generator-community: ䷤ Generate README, CODE_OF_CONDUCT, CONTRIBUTING, LICENSE, ISSUE_TEMPLATE, and PULL_REQUEST_TEMPLATE repository docs to encourage consumption and invite contributions. · GitHub
Skip to content

Repository files navigation

generator-community

LicenseDependencies' licensesNSP StatusSynk Vulnerabilities
StackShareDependency StatusdevDependencies Status
Build StatusWindows Build statusCoverage StatusCodacy quality

Generate README, CODE_OF_CONDUCT, CONTRIBUTING, and LICENSE files according to recommended community standards.

Table of contents

1. Overview

generator-community helps product repository maintainers follow the recommended community standards for documentation that communicates expectations, manages contributions, protects participants' legal rights, and optimizes search engine results. generator-community's simple command-line interface prompts you with simple questions in order to generate a:

  1. CODE_OF_CONDUCT.md
  2. CONTRIBUTING.md
  3. Open source LICENSE.md
  4. README.md

Alert icon Currently, generator-community generates a:

  1. .editorconfig
  2. .gitattributes
  3. .gitignore
  4. .yo-rc.json (to store answers for your convenience)
  5. CODE_OF_CONDUCT.md
  6. LICENSE
  7. README.md

generator-community also initializes local Git repository, if one doesn't yet exist.

Please see the Milestones for generator-community's release plan.


2. Installation

2.1. Prerequisite software

  1. Node.js v4.1.1 or greater
  2. npm (which installs with Node.js)
  3. Yeoman (a command-line tool which you will install with npm, and not a manual download)
  4. A package.json application manifest.

HelpVerify prerequisite software...
  • 2.1.2. Verify Node.js availability

    Open a Terminal and find out whether you have Node.js installed. Run:

    $ node --version
    # => v7.7.3

    If you do not have [Node.js][nodejs-url] installed, you will receive an error message similar to:

    # Linux or macOS
    bash: foobar: command not found
    # You need to install Node.js!
  • 2.1.2. Install or update Node.js

    You have two options for installing Node.js.

    The easiest option is to simply download and install Node.js.

    If you feel comfortable using the command line, try one of the following version managers:


    ℹ️ I cannot vouch for the two Windows options, so do a little homework, first.


2.2. Install Yeoman and generator-community

Once you've verified that you have Node.js v4.1.1. or higher installed, open a Terminal and run these two commands:

# Install Yeoman and generator-community globally
$ npm install yo --global
# 💡 The letter "i" is shorthand for "install"; -g is short for --global
$ npm i generator-community -g

3. Usage

Install all four recommended community standards (README, CODE_OF_CONDUCT, CONTRIBUTING, and a LICENSE):

# Generate README.md, CONTRIBUTING.md, CODE_OF_CONDUCT.md, and LICENSE files# per the recommended community community standards:
$ yo community

This will guide you with prompts to help you pre-fill the documents, e.g.,

$ yo community
? GitHub username or organization johndoe
? Product Name spike-repo
? Write a short description/value proposition The most valuable spike in the world....
? Product homepage URL https://example
? Author's name John Doe? Author's e-mail john@doe.info
? Author's homepage https://github.com/johndoe? Package keywords (comma to split) recommended community standards,readme,license,toc,table of contents,markdown? Which programming language does this product use the most? Node.js (JavaScript)? What do you use to manage dependencies (e.g., Gradle, npm, NuGet)? Leave blank if you don't know. npm
? ⦾ 📄 LICENSE: Select a license MIT
? ⦾ 📄 CODE_OF_CONDUCT: Would you like to generate a Code of Conduct? Yes
? ⦾ 📄 README: Select the sections to include in your README Overview, Configuration, Security, API, Background, License
create package.json
create README.md
create .editorconfig
create .gitattributes
create .gitignore
create CODE_OF_CONDUCT.md
create LICENSE
I'm all done. Running npm install for you to install the required dependencies. If this fails, try running the command yourself.> commitplease@2.7.10 install /Users/swindle/Projects/github/commonality/sandbox/spike-repo/node_modules/commitplease> node install> git-validate@2.2.2 install /Users/swindle/Projects/github/commonality/sandbox/spike-repo/node_modules/nsp/node_modules/git-validate> node bin/installnpm WARN prepublish-on-install As of npm@5, `prepublish` scripts are deprecated.npm WARN prepublish-on-install Use `prepare` for build steps and `prepublishOnly` for upload-only.npm WARN prepublish-on-install See the deprecation note in `npm help scripts` for more information.> spike-repo@0.0.0 prepublish /Users/swindle/Projects/github/commonality/sandbox/spike-repo> nsp check(+) No known vulnerabilities found> spike-repo@0.0.0 prepare /Users/swindle/Projects/github/commonality/sandbox/spike-repo> npm run lint && npm run security> spike-repo@0.0.0 lint /Users/swindle/Projects/github/commonality/sandbox/spike-repo> npm run lint:manifest> spike-repo@0.0.0 lint:manifest /Users/swindle/Projects/github/commonality/sandbox/spike-repo> fixpackmissing mainpackage.json fixed!> spike-repo@0.0.0 security /Users/swindle/Projects/github/commonality/sandbox/spike-repo> npm run security:nsp:scan> spike-repo@0.0.0 security:nsp:scan /Users/swindle/Projects/github/commonality/sandbox/spike-repo> nsp check(+) No known vulnerabilities foundnpm notice created a lockfile as package-lock.json. You should commit this file.added 571 packages in 9.146sThank you for generating community!✔ /README.md Updated Transforms run ⁕ TOC:excludeText=Table of contents

3.1. yo community:readme

Quote READMEs do more than explain how to use your project. They also explain why your project matters, and what your users can do with it.

In your README, try to answer the following questions:

  • What does this project do?

  • Why is this project useful?

  • How do I get started?

  • Where can I get more help, if I need it?

Owen, K., Keepers, B., Shepherd, S., & Eghbal, N. (2017, February 17). Starting an Open Source Project. Retrieved September 13, 2017, from https://opensource.guide/starting-a-project/#writing-a-readme

3.1.1. Guided assistance

To answer prompts manually, open a Terminal and run

$ yo community:readme

The community:readme subgenerator will evaluate your product repository's manifests (e.g., package.json for Node.js products, or settings.gradle for Java products) to ensure consistency.

3.1.2. CLI automation

You can automate README.md documentation via the command line interface (CLI) (e.g., during one of your CI/CD pipelines). To view all CLI options, use the --help or -h option:

$ yo community:readme -h
Usage:
yo community:readme [options]
Options:
-h, --help # Print the generator's options and usage
--skip-cache # Do not remember prompt answers Default: false
--skip-install # Do not automatically install dependencies Default: false
--authorName # Author name
--authorUrl # Author URL
--dependencyManager # Tool used to install third-party libraries Default: Unspecified
--generateInto # Destination directory for generated files
--gitRemoteOriginUrl # The URI (SSH or HTTPS) of your Git repository Default: /
--githubAccount # GitHub account/organization name
--description # Product description
--lang # Product's primary programming language Default: Unspecified
--license # Open source software license
--licenseUrl # URL to your LICENSE file Default: ./LICENSE
--name # Product name
-a, --includeApi # README.md: Public API overview (optional) Default: true
-b, --includeBackground # README.md: Background section content (optional) Default: false
-c, --includeConfig # README.md: Configuration instructions (optional) Default: false
-o, --includeOverview # README.md: Overview section content (optional) Default: false
-s, --includeSecurity # README.md: Security section content (optional) Default: false

Example:

$ yo community:readme --authorName "Jane Doe" --authorUrl "https://jdoe.example.com" \
--githubAccount janedoeasindeer --lang JavaScript --licenseName MIT \
--name spike-sln-community \
--description "A spike solution to test generator-community." \
--includeApi --includeConfig --includeSecurity

3.2. yo community:conduct

Quote ...a code of conduct helps set ground rules for behavior for your project’s participants. This is especially valuable if you’re launching an open source project for a community or company. A code of conduct empowers you to facilitate healthy, constructive community behavior, which will reduce your stress as a maintainer.

Owen, K., Keepers, B., Shepherd, S., & Eghbal, N. (2017, February 17). Starting an Open Source Project. Retrieved September 13, 2017, from https://opensource.guide/starting-a-project/#establishing-a-code-of-conduct

3.2.1. Guided assistance

To answer prompts manually, open a Terminal and run

$ yo community:conduct
? Contact email: fake@elsewhere.net
create CODE_OF_CONDUCT.md

3.2.2. CLI automation

You can automate CODE_OF_CONDUCT.md generation via the command line interface (CLI) (e.g., during one of your CI/CD pipelines). To view all CLI options, use the --help or -h option:

$ yo community:conduct --help
Usage:
yo community:conduct [options]
Options:
-h, --help # Print the generator's options and usage
--skip-cache # Do not remember prompt answers Default: false
--skip-install # Do not automatically install dependencies Default: false
--email # Contact email
--generateInto # Destination directory

Example:

$ yo community:conduct --email somebody@example.com
create CODE_OF_CONDUCT.md

3.3. yo community:contributing

Quote A CONTRIBUTING file tells your audience how to participate in your project. For example, you might include information on:

  • How to file a bug report (try using issue and pull request templates)
  • How to suggest a new feature
  • How to set up your environment and run tests

Owen, K., Keepers, B., Shepherd, S., & Eghbal, N. (2017, February 17). Starting an Open Source Project. Retrieved September 13, 2017, from https://opensource.guide/starting-a-project/#writing-your-contributing-guidelines

Alert icon This feature will be delivered with MVP4: community:contribute.

3.4. yo community:license

Quote An open source license guarantees that others can use, copy, modify, and contribute back to your project without repercussions. It also protects you from sticky legal situations. You must include a license when you launch an open source project.

Owen, K., Keepers, B., Shepherd, S., & Eghbal, N. (2017, February 17). Starting an Open Source Project. Retrieved September 13, 2017, from https://opensource.guide/starting-a-project/#launching-your-own-open-source-project


Alert icon If you already have a LICENSE, the community:license subgenerator will prompt you to overwrite it, as well as your package.json.


3.4.1. Guided assistance

To answer prompts manually, open a Terminal and run

$ yo community:license

The community:readme subgenerator will evaluate your product repository's manifests (e.g., package.json for Node.js products, or settings.gradle for Java products) to ensure consistency.

Example:

$ yo community:license
? What's your name: Greg Swindle? Your email (optional): greg@swindle.net? Your website (optional):? Which license do you want to use? Unlicense No License (Copyrighted) Apache 2.0❯ MIT Mozilla Public License 2.0 BSD 2-Clause (FreeBSD) License BSD 3-Clause (NewBSD) License

3.4.2. CLI automation

You can automatically generate a LICENSE file via the command line interface (CLI) (e.g., during one of your CI/CD pipelines). To view all CLI options, use the --help or -h option:

yo community:license -h
Usage:
yo community:license [options]
Options:
-h, --help # Print the generator's options and usage
--skip-cache # Do not remember prompt answers Default: false
--skip-install # Do not automatically install dependencies Default: false
--defaultLicense # Default license
--email # Email of the license owner
--generateInto # Destination directory of the generated files
--license # Enter an SPDX license name
--name # Name of the license owner
--output # Set the output file for the generated license Default: LICENSE
--website # Website of the license owner
--year # Year(s) to include on the license Default: 2017

3.5. Update tables of contents in markdown files

Markdown icon

yo community installs an npm-script that will help keep your documents' table of contents up-to-date. To automatically update your markdown files' tables of contents:

  • Add the following comments to your markdown file(s):
    <!-- ⛔️ AUTO-GENERATED-CONTENT:START (TOC:excludeText=Table of contents) -->
    This text will be replaced by a table of contents 😏 .
    <!-- ⛔️ AUTO-GENERATED-CONTENT:END -->
  • Open a Terminal and run:
    $ npm run docs:toc

For more information, visit DavidWells/markdown-magic.

4. npm-scripts

Software modules often have funky, irrelative names; therefore, we prefix custom tasks by their responsibility and purpose.

PrefixDefinition
build*Source code distribution tasks.
docs*API documentation and automation tasks.
lint*Code style, standards, and vulnerabilty assessments (as well as fixes, if available).
releaseBump the product's semver, update docs, commit, and publish to the npm registry.
security*Security vulnerabilty checks.

The following CLI npm-scripts are available to you (assuming you're human, gentle reader) and CI-services.

ScriptDescription
docsnpm run docs:scripts && npm run docs:toc
docs:tocmd-magic --path '**/*.md' --ignore 'node_modules'
lintnpm run lint:node-version && npm run lint:js && npm run lint:manifest
lint:jseslint ./generators/**/*.js ./__tests__/**/*.js --fix
lint:manifestfixpack
lint:node-versioncheck-node-version --package
prepublishnpm run security
releasestandard-version
securitynpm run security:nsp:scan
security:nsp:scannsp check
pretestnpm prune && npm run lint
testjest --forceExit --config=jest.config.json
posttestnpm run security

5. Semantic version and CHANGELOG

The latest version of commonality/generator-community is 0.0.0. View the CHANGELOG for details.

6. Contributing to generator-community

Learn how to make a Pull Request with free training

We welcome contributors with Pull Requests!

Contributions in the form of GitHub pull requests are welcome. Before embarking on a significant change, please adhere to the following guidelines:

  1. Read the Code of Conduct.
  2. Create an issue to discuss the proposed change and ensure that it is likely to be merged:
  3. Follow Contributing to generator-community's coding conventions and Git workflow if you're willing and able to program (or want to learn how).

7. License

MIT © Greg Swindle.

Third-party software licenses for `generator-community (read the NOTICE file for a detailed report):

FOSSA Status


Conventional CommitsGreenkeeper automated dependency managementREADME score

About

䷤ Generate README, CODE_OF_CONDUCT, CONTRIBUTING, LICENSE, ISSUE_TEMPLATE, and PULL_REQUEST_TEMPLATE repository docs to encourage consumption and invite contributions.

Topics

Resources

Code of conduct

Contributing

Stars

10 stars

Watchers

5 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Universal Dark Mode - works on any site (function() { var enabled = true; function applyDarkMode() { if (!enabled) return; // Create style element if it doesn't exist var style = document.getElementById('universal-dark-mode-style'); if (!style) { style = document.createElement('style'); style.id = 'universal-dark-mode-style'; document.head.appendChild(style); } // Dark mode CSS - inverts colors but preserves images/video style.textContent = ' /* Invert everything except media */ html { filter: invert(1) hue-rotate(180deg) !important; background: #1a1a2e !important; } /* Restore images, videos, iframes, canvas */ img, video, iframe, canvas, svg, picture, [style*="background-image"] { filter: invert(1) hue-rotate(180deg) !important; } /* Preserve specific elements that should not be inverted */ .no-dark-mode, .no-dark-mode *, [data-theme="light"], [data-theme="light"], .ace_editor, .ace_editor *, .CodeMirror, .CodeMirror *, .monaco-editor, .monaco-editor *, .markdown-body pre, .markdown-body pre *, .highlight, .highlight *, pre code, pre code * { filter: none !important; } /* Fix common UI elements */ .modal, .popup, .dropdown-menu, .tooltip, .popover { filter: invert(1) hue-rotate(180deg) !important; background: #2d2d44 !important; border-color: #444 !important; } /* Scrollbars */ ::-webkit-scrollbar { background: #1a1a2e !important; } ::-webkit-scrollbar-thumb { background: #444 !important; } ::-webkit-scrollbar-thumb:hover { background: #555 !important; } /* Selection */ ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; } ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; } '; } function removeDarkMode() { var style = document.getElementById('universal-dark-mode-style'); if (style) style.remove(); } // Toggle with Alt+Shift+D document.addEventListener('keydown', function(e) { if (e.altKey && e.shiftKey && e.key === 'D') { e.preventDefault(); enabled = !enabled; if (enabled) { applyDarkMode(); console.log('[Universal Dark Mode] Enabled'); } else { removeDarkMode(); console.log('[Universal Dark Mode] Disabled'); } } }); // Apply on load applyDarkMode(); // Re-apply on dynamic content var observer = new MutationObserver(function(mutations) { if (enabled && !document.getElementById('universal-dark-mode-style')) { applyDarkMode(); } }); observer.observe(document.head, { childList: true }); console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle'); })(); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })(); GitHub - commonality/generator-community: ䷤ Generate README, CODE_OF_CONDUCT, CONTRIBUTING, LICENSE, ISSUE_TEMPLATE, and PULL_REQUEST_TEMPLATE repository docs to encourage consumption and invite contributions. · GitHub
Skip to content

Repository files navigation

generator-community

LicenseDependencies' licensesNSP StatusSynk Vulnerabilities
StackShareDependency StatusdevDependencies Status
Build StatusWindows Build statusCoverage StatusCodacy quality

Generate README, CODE_OF_CONDUCT, CONTRIBUTING, and LICENSE files according to recommended community standards.

Table of contents

1. Overview

generator-community helps product repository maintainers follow the recommended community standards for documentation that communicates expectations, manages contributions, protects participants' legal rights, and optimizes search engine results. generator-community's simple command-line interface prompts you with simple questions in order to generate a:

  1. CODE_OF_CONDUCT.md
  2. CONTRIBUTING.md
  3. Open source LICENSE.md
  4. README.md

Alert icon Currently, generator-community generates a:

  1. .editorconfig
  2. .gitattributes
  3. .gitignore
  4. .yo-rc.json (to store answers for your convenience)
  5. CODE_OF_CONDUCT.md
  6. LICENSE
  7. README.md

generator-community also initializes local Git repository, if one doesn't yet exist.

Please see the Milestones for generator-community's release plan.


2. Installation

2.1. Prerequisite software

  1. Node.js v4.1.1 or greater
  2. npm (which installs with Node.js)
  3. Yeoman (a command-line tool which you will install with npm, and not a manual download)
  4. A package.json application manifest.

HelpVerify prerequisite software...
  • 2.1.2. Verify Node.js availability

    Open a Terminal and find out whether you have Node.js installed. Run:

    $ node --version
    # => v7.7.3

    If you do not have [Node.js][nodejs-url] installed, you will receive an error message similar to:

    # Linux or macOS
    bash: foobar: command not found
    # You need to install Node.js!
  • 2.1.2. Install or update Node.js

    You have two options for installing Node.js.

    The easiest option is to simply download and install Node.js.

    If you feel comfortable using the command line, try one of the following version managers:


    ℹ️ I cannot vouch for the two Windows options, so do a little homework, first.


2.2. Install Yeoman and generator-community

Once you've verified that you have Node.js v4.1.1. or higher installed, open a Terminal and run these two commands:

# Install Yeoman and generator-community globally
$ npm install yo --global
# 💡 The letter "i" is shorthand for "install"; -g is short for --global
$ npm i generator-community -g

3. Usage

Install all four recommended community standards (README, CODE_OF_CONDUCT, CONTRIBUTING, and a LICENSE):

# Generate README.md, CONTRIBUTING.md, CODE_OF_CONDUCT.md, and LICENSE files# per the recommended community community standards:
$ yo community

This will guide you with prompts to help you pre-fill the documents, e.g.,

$ yo community
? GitHub username or organization johndoe
? Product Name spike-repo
? Write a short description/value proposition The most valuable spike in the world....
? Product homepage URL https://example
? Author's name John Doe? Author's e-mail john@doe.info
? Author's homepage https://github.com/johndoe? Package keywords (comma to split) recommended community standards,readme,license,toc,table of contents,markdown? Which programming language does this product use the most? Node.js (JavaScript)? What do you use to manage dependencies (e.g., Gradle, npm, NuGet)? Leave blank if you don't know. npm
? ⦾ 📄 LICENSE: Select a license MIT
? ⦾ 📄 CODE_OF_CONDUCT: Would you like to generate a Code of Conduct? Yes
? ⦾ 📄 README: Select the sections to include in your README Overview, Configuration, Security, API, Background, License
create package.json
create README.md
create .editorconfig
create .gitattributes
create .gitignore
create CODE_OF_CONDUCT.md
create LICENSE
I'm all done. Running npm install for you to install the required dependencies. If this fails, try running the command yourself.> commitplease@2.7.10 install /Users/swindle/Projects/github/commonality/sandbox/spike-repo/node_modules/commitplease> node install> git-validate@2.2.2 install /Users/swindle/Projects/github/commonality/sandbox/spike-repo/node_modules/nsp/node_modules/git-validate> node bin/installnpm WARN prepublish-on-install As of npm@5, `prepublish` scripts are deprecated.npm WARN prepublish-on-install Use `prepare` for build steps and `prepublishOnly` for upload-only.npm WARN prepublish-on-install See the deprecation note in `npm help scripts` for more information.> spike-repo@0.0.0 prepublish /Users/swindle/Projects/github/commonality/sandbox/spike-repo> nsp check(+) No known vulnerabilities found> spike-repo@0.0.0 prepare /Users/swindle/Projects/github/commonality/sandbox/spike-repo> npm run lint && npm run security> spike-repo@0.0.0 lint /Users/swindle/Projects/github/commonality/sandbox/spike-repo> npm run lint:manifest> spike-repo@0.0.0 lint:manifest /Users/swindle/Projects/github/commonality/sandbox/spike-repo> fixpackmissing mainpackage.json fixed!> spike-repo@0.0.0 security /Users/swindle/Projects/github/commonality/sandbox/spike-repo> npm run security:nsp:scan> spike-repo@0.0.0 security:nsp:scan /Users/swindle/Projects/github/commonality/sandbox/spike-repo> nsp check(+) No known vulnerabilities foundnpm notice created a lockfile as package-lock.json. You should commit this file.added 571 packages in 9.146sThank you for generating community!✔ /README.md Updated Transforms run ⁕ TOC:excludeText=Table of contents

3.1. yo community:readme

Quote READMEs do more than explain how to use your project. They also explain why your project matters, and what your users can do with it.

In your README, try to answer the following questions:

  • What does this project do?

  • Why is this project useful?

  • How do I get started?

  • Where can I get more help, if I need it?

Owen, K., Keepers, B., Shepherd, S., & Eghbal, N. (2017, February 17). Starting an Open Source Project. Retrieved September 13, 2017, from https://opensource.guide/starting-a-project/#writing-a-readme

3.1.1. Guided assistance

To answer prompts manually, open a Terminal and run

$ yo community:readme

The community:readme subgenerator will evaluate your product repository's manifests (e.g., package.json for Node.js products, or settings.gradle for Java products) to ensure consistency.

3.1.2. CLI automation

You can automate README.md documentation via the command line interface (CLI) (e.g., during one of your CI/CD pipelines). To view all CLI options, use the --help or -h option:

$ yo community:readme -h
Usage:
yo community:readme [options]
Options:
-h, --help # Print the generator's options and usage
--skip-cache # Do not remember prompt answers Default: false
--skip-install # Do not automatically install dependencies Default: false
--authorName # Author name
--authorUrl # Author URL
--dependencyManager # Tool used to install third-party libraries Default: Unspecified
--generateInto # Destination directory for generated files
--gitRemoteOriginUrl # The URI (SSH or HTTPS) of your Git repository Default: /
--githubAccount # GitHub account/organization name
--description # Product description
--lang # Product's primary programming language Default: Unspecified
--license # Open source software license
--licenseUrl # URL to your LICENSE file Default: ./LICENSE
--name # Product name
-a, --includeApi # README.md: Public API overview (optional) Default: true
-b, --includeBackground # README.md: Background section content (optional) Default: false
-c, --includeConfig # README.md: Configuration instructions (optional) Default: false
-o, --includeOverview # README.md: Overview section content (optional) Default: false
-s, --includeSecurity # README.md: Security section content (optional) Default: false

Example:

$ yo community:readme --authorName "Jane Doe" --authorUrl "https://jdoe.example.com" \
--githubAccount janedoeasindeer --lang JavaScript --licenseName MIT \
--name spike-sln-community \
--description "A spike solution to test generator-community." \
--includeApi --includeConfig --includeSecurity

3.2. yo community:conduct

Quote ...a code of conduct helps set ground rules for behavior for your project’s participants. This is especially valuable if you’re launching an open source project for a community or company. A code of conduct empowers you to facilitate healthy, constructive community behavior, which will reduce your stress as a maintainer.

Owen, K., Keepers, B., Shepherd, S., & Eghbal, N. (2017, February 17). Starting an Open Source Project. Retrieved September 13, 2017, from https://opensource.guide/starting-a-project/#establishing-a-code-of-conduct

3.2.1. Guided assistance

To answer prompts manually, open a Terminal and run

$ yo community:conduct
? Contact email: fake@elsewhere.net
create CODE_OF_CONDUCT.md

3.2.2. CLI automation

You can automate CODE_OF_CONDUCT.md generation via the command line interface (CLI) (e.g., during one of your CI/CD pipelines). To view all CLI options, use the --help or -h option:

$ yo community:conduct --help
Usage:
yo community:conduct [options]
Options:
-h, --help # Print the generator's options and usage
--skip-cache # Do not remember prompt answers Default: false
--skip-install # Do not automatically install dependencies Default: false
--email # Contact email
--generateInto # Destination directory

Example:

$ yo community:conduct --email somebody@example.com
create CODE_OF_CONDUCT.md

3.3. yo community:contributing

Quote A CONTRIBUTING file tells your audience how to participate in your project. For example, you might include information on:

  • How to file a bug report (try using issue and pull request templates)
  • How to suggest a new feature
  • How to set up your environment and run tests

Owen, K., Keepers, B., Shepherd, S., & Eghbal, N. (2017, February 17). Starting an Open Source Project. Retrieved September 13, 2017, from https://opensource.guide/starting-a-project/#writing-your-contributing-guidelines

Alert icon This feature will be delivered with MVP4: community:contribute.

3.4. yo community:license

Quote An open source license guarantees that others can use, copy, modify, and contribute back to your project without repercussions. It also protects you from sticky legal situations. You must include a license when you launch an open source project.

Owen, K., Keepers, B., Shepherd, S., & Eghbal, N. (2017, February 17). Starting an Open Source Project. Retrieved September 13, 2017, from https://opensource.guide/starting-a-project/#launching-your-own-open-source-project


Alert icon If you already have a LICENSE, the community:license subgenerator will prompt you to overwrite it, as well as your package.json.


3.4.1. Guided assistance

To answer prompts manually, open a Terminal and run

$ yo community:license

The community:readme subgenerator will evaluate your product repository's manifests (e.g., package.json for Node.js products, or settings.gradle for Java products) to ensure consistency.

Example:

$ yo community:license
? What's your name: Greg Swindle? Your email (optional): greg@swindle.net? Your website (optional):? Which license do you want to use? Unlicense No License (Copyrighted) Apache 2.0❯ MIT Mozilla Public License 2.0 BSD 2-Clause (FreeBSD) License BSD 3-Clause (NewBSD) License

3.4.2. CLI automation

You can automatically generate a LICENSE file via the command line interface (CLI) (e.g., during one of your CI/CD pipelines). To view all CLI options, use the --help or -h option:

yo community:license -h
Usage:
yo community:license [options]
Options:
-h, --help # Print the generator's options and usage
--skip-cache # Do not remember prompt answers Default: false
--skip-install # Do not automatically install dependencies Default: false
--defaultLicense # Default license
--email # Email of the license owner
--generateInto # Destination directory of the generated files
--license # Enter an SPDX license name
--name # Name of the license owner
--output # Set the output file for the generated license Default: LICENSE
--website # Website of the license owner
--year # Year(s) to include on the license Default: 2017

3.5. Update tables of contents in markdown files

Markdown icon

yo community installs an npm-script that will help keep your documents' table of contents up-to-date. To automatically update your markdown files' tables of contents:

  • Add the following comments to your markdown file(s):
    <!-- ⛔️ AUTO-GENERATED-CONTENT:START (TOC:excludeText=Table of contents) -->
    This text will be replaced by a table of contents 😏 .
    <!-- ⛔️ AUTO-GENERATED-CONTENT:END -->
  • Open a Terminal and run:
    $ npm run docs:toc

For more information, visit DavidWells/markdown-magic.

4. npm-scripts

Software modules often have funky, irrelative names; therefore, we prefix custom tasks by their responsibility and purpose.

PrefixDefinition
build*Source code distribution tasks.
docs*API documentation and automation tasks.
lint*Code style, standards, and vulnerabilty assessments (as well as fixes, if available).
releaseBump the product's semver, update docs, commit, and publish to the npm registry.
security*Security vulnerabilty checks.

The following CLI npm-scripts are available to you (assuming you're human, gentle reader) and CI-services.

ScriptDescription
docsnpm run docs:scripts && npm run docs:toc
docs:tocmd-magic --path '**/*.md' --ignore 'node_modules'
lintnpm run lint:node-version && npm run lint:js && npm run lint:manifest
lint:jseslint ./generators/**/*.js ./__tests__/**/*.js --fix
lint:manifestfixpack
lint:node-versioncheck-node-version --package
prepublishnpm run security
releasestandard-version
securitynpm run security:nsp:scan
security:nsp:scannsp check
pretestnpm prune && npm run lint
testjest --forceExit --config=jest.config.json
posttestnpm run security

5. Semantic version and CHANGELOG

The latest version of commonality/generator-community is 0.0.0. View the CHANGELOG for details.

6. Contributing to generator-community

Learn how to make a Pull Request with free training

We welcome contributors with Pull Requests!

Contributions in the form of GitHub pull requests are welcome. Before embarking on a significant change, please adhere to the following guidelines:

  1. Read the Code of Conduct.
  2. Create an issue to discuss the proposed change and ensure that it is likely to be merged:
  3. Follow Contributing to generator-community's coding conventions and Git workflow if you're willing and able to program (or want to learn how).

7. License

MIT © Greg Swindle.

Third-party software licenses for `generator-community (read the NOTICE file for a detailed report):

FOSSA Status


Conventional CommitsGreenkeeper automated dependency managementREADME score

About

䷤ Generate README, CODE_OF_CONDUCT, CONTRIBUTING, LICENSE, ISSUE_TEMPLATE, and PULL_REQUEST_TEMPLATE repository docs to encourage consumption and invite contributions.

Topics

Resources

Code of conduct

Contributing

Stars

10 stars

Watchers

5 watching

Forks

Releases

Packages

Used by

Contributors

Languages