Skip to content

Commit

Permalink
feat(grunt-plugin): Now it is ready to be a grunt plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
rafinskipg committed Nov 17, 2013
1 parent 8e96995 commit 6422e05
Show file tree
Hide file tree
Showing 87 changed files with 645 additions and 6,989 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
npm-debug.log
tmp
13 changes: 13 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"curly": true,
"eqeqeq": true,
"immed": true,
"latedef": true,
"newcap": true,
"noarg": true,
"sub": true,
"undef": true,
"boss": true,
"eqnull": true,
"node": true
}
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<a name="">Git changelog</a>
# (2013-11-17)


## Documentation

- Added docs
([e0ba50c0](https://github.com/rafinskipg/git-changelog/commits/e0ba50c0bb0b13e9b39a59b8f4dda96e86d55644))


## Features

- **bootstrap:** creating initial structure
([dea45d68](https://github.com/rafinskipg/git-changelog/commits/dea45d68ce9555e876680bf7c0778add2f367a30))


## Docs

- Added docs

## Breaking Changes


13 changes: 0 additions & 13 deletions Changelog.md

This file was deleted.

28 changes: 28 additions & 0 deletions EXTENDEDCHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<a name="">Git changelog extended</a>
# (2013-11-17)


## Documentation

- Added docs
([e0ba50c0](https://github.com/rafinskipg/git-changelog/commits/e0ba50c0bb0b13e9b39a59b8f4dda96e86d55644))


## Features

- **bootstrap:** creating initial structure
([dea45d68](https://github.com/rafinskipg/git-changelog/commits/dea45d68ce9555e876680bf7c0778add2f367a30))


## Refactor

- **docs:**
- Angular document commits - Added docs

## Docs

- Added docs

## Breaking Changes


74 changes: 74 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
/*
* git-changelog
* https://github.com/rafinskipg/git-changelog
*
* Copyright (c) 2013 rafinskipg
* Licensed under the MIT license.
*/

'use strict';

module.exports = function(grunt) {

// Project configuration.
grunt.initConfig({
jshint: {
all: [
'Gruntfile.js',
'tasks/*.js',
'<%= nodeunit.tests %>',
],
options: {
jshintrc: '.jshintrc',
},
},

// Before generating any new files, remove any previously-created files.
clean: {
tests: ['tmp'],
},

// Configuration to be run (and then tested).
git_changelog: {
minimal: {
options: {
repo_url: 'https://github.com/rafinskipg/git-changelog',
appName : 'Git changelog'
}
},
extended: {
options: {
repo_url: 'https://github.com/rafinskipg/git-changelog',
appName : 'Git changelog extended',
file : 'EXTENDEDCHANGELOG.md',
grep_commits: '^fix|^feat|^docs|^refactor|^chore|BREAKING'
}
}
},

// Unit tests.
nodeunit: {
tests: ['test/*_test.js'],
},

});

// Actually load this plugin's task(s).
grunt.loadTasks('tasks');

// These plugins provide necessary tasks.
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-nodeunit');

// Whenever the "test" task is run, first clean the "tmp" dir, then run this
// plugin's task(s), then test the result.
grunt.registerTask('test', ['clean', 'git_changelog', 'nodeunit']);

// By default, lint and run all tests.
grunt.registerTask('default', ['jshint', 'test']);

// By default, lint and run all tests.
grunt.registerTask('ch', ['jshint', 'git_changelog']);

};
22 changes: 22 additions & 0 deletions LICENSE-MIT
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Copyright (c) 2013 rafinskipg

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
67 changes: 52 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,56 @@
Git-change-log
==============
# git-changelog

Generates a git changelog, inspired &amp; based on Angular JS changelog generator
> A git changelog based on ANGULAR JS commit standards
## Installation
## Getting Started
This plugin requires Grunt `~0.4.1`

You can copy "changelog.js" file into your project and install "qq" npm package (dependency).
If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

```shell
npm install git-changelog --save-dev
```

## Usage

Follow the Commit Guidelines when you commit.
Create a changelog with
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

```js
grunt.loadNpmTasks('git-changelog');
```
node changelog.js
```
It does accept some parameters

## The "git_changelog" task

### Overview
In your project's Gruntfile, add a section named `git_changelog` to the data object passed into `grunt.initConfig()`.

```js
grunt.initConfig({
git_changelog: {
minimal: {
options: {
repo_url: 'https://github.com/rafinskipg/git-changelog',
appName : 'Git changelog'
}
},
extended: {
options: {
repo_url: 'https://github.com/rafinskipg/git-changelog',
appName : 'Git changelog extended',
file : 'EXTENDEDCHANGELOG.md',
grep_commits: '^fix|^feat|^docs|^refactor|^chore|BREAKING'
}
}
}
})
```
node changelog.js {VERSION} {OUTPUTFILE} {APPNAME} {G|B}
```

### Options | Defaults

* branch_name : 'The name of the branch I want to generate my changelog (Defaults to "")',
* repo_url: '',
* version : '',
* file: 'CHANGELOG.md',
* appName : 'My app - Changelog'
* grep_commits: '^fix|^feat|^docs|^refactor|^chore|BREAKING'

## Git Commit Guidelines - Source : "Angular JS"

Expand Down Expand Up @@ -76,4 +106,11 @@ reference GitHub issues that this commit **Closes**.


A detailed explanation can be found in this [document][commit-message-format].
[commit-message-format]: https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#
[commit-message-format]: https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#


## Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).

## Release History
_(Nothing yet)_
Empty file added aasa
Empty file.
1 change: 0 additions & 1 deletion changelog.bat

This file was deleted.

Loading

0 comments on commit 6422e05

Please sign in to comment.