<commit_before># generator-release

Yeoman generator for handling Bower/NPM releases.

## Installation

```
npm install -g yo generator-release
```

A config file, `~/.config/generator-release`, needs to be created. This is standard CommonJS module exporting github authentication [options](https://github.com/michael/github#usage). The easiest way to configure the authentication is to go to the GitHub admin panel and create a [Personal Access Token](https://github.com/settings/tokens/new), then set it as the `token` in your config. 

Optionally the module may export a `linkFilter` method that allows for parsing of links included in the body of notes issues and pull requests.

### Example

```javascript
module.exports = {
  auth: 'oauth',
  token: 'GitHub OAuth token',

  linkFilter: function(link) {
    return /atlassian\.net/.test(link.url);
  }
};
```

## Usage

### Generating release notes
```
yo release:notes [major|minor|patch|prerelease]
```

Will generate a template for the release notes including:
- Github issues closed since the last release
- Gitub pull requests closed since the last release
- Commits not associated with pull requests

This should be manually edited to ensure that only relevant content is display and any additional gotchas and upgrade concerns noted.


### Releasing

```
yo release:release [major|minor|patch|prerelease]
```

Will increment the release version per the semver action passed in and tag and pushes to the upstream repository.

If publishing to npm the `npm publish` command is still required.


### Comparing NPM and Bower collections
npm
```
yo release:collect-versions npm > oldVersion.json
yo release:diff oldVersion.json npm
```
bower
```
yo release:collect-versions bower > oldVersion.json
yo release:diff oldVersion.json bower
```

Generates a report of the versions that have changed for all packages. Includes release notes for packages that include them.

Note that the arguments to `release:diff` may be any combination of files or `npm`/`bower` meta commands.<commit_msg>Add publishing docs<commit_after># generator-release

Yeoman generator for handling Bower/NPM releases.

## Installation

```
npm install -g yo generator-release
```

A config file, `~/.config/generator-release`, needs to be created. This is standard CommonJS module exporting github authentication [options](https://github.com/michael/github#usage). The easiest way to configure the authentication is to go to the GitHub admin panel and create a [Personal Access Token](https://github.com/settings/tokens/new), then set it as the `token` in your config. 

Optionally the module may export a `linkFilter` method that allows for parsing of links included in the body of notes issues and pull requests.

### Example

```javascript
module.exports = {
  auth: 'oauth',
  token: 'GitHub <PASSWORD>',

  linkFilter: function(link) {
    return /atlassian\.net/.test(link.url);
  }
};
```

## Usage

### Generating release notes
```
yo release:notes [major|minor|patch|prerelease]
```

Will generate a template for the release notes including:
- Github issues closed since the last release
- Gitub pull requests closed since the last release
- Commits not associated with pull requests

This should be manually edited to ensure that only relevant content is display and any additional gotchas and upgrade concerns noted.


### Releasing

```
yo release:release [major|minor|patch|prerelease]
```

Will increment the release version per the semver action passed in and tag and pushes to the upstream repository.

If publishing to npm the `npm publish` command is still required.


### Comparing NPM and Bower collections
npm
```
yo release:collect-versions npm > oldVersion.json
yo release:diff oldVersion.json npm
```
bower
```
yo release:collect-versions bower > oldVersion.json
yo release:diff oldVersion.json bower
```

Generates a report of the versions that have changed for all packages. Includes release notes for packages that include them.

Note that the arguments to `release:diff` may be any combination of files or `npm`/`bower` meta commands.

### Publishing
```
yo release:publish [cdnjs|components] projectName sourceDir
```

Pushes a particular directory of artifacts to cdnjs or the github components project, optionally creating pull requests if the executing user does not have adequate permissions to directly push.

Note that at this time only frontend publishing is possible. NPM publishing should still be done directly through the `npm publish` command.
{'fraction_non_alphanumeric': 0.08087746510081985, 'fraction_numerical': 0.0, 'mean_word_length': 4.787179487179487, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 8, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '274642', 'n_tokens_mistral': 1226, 'n_tokens_neox': 1139, 'n_words': 555}