Skip to content

Commit

Permalink
Added changelog.md and contributing guide
Browse files Browse the repository at this point in the history
  • Loading branch information
0x-r4bbit committed Apr 1, 2013
1 parent a50150c commit 52aaa4d
Show file tree
Hide file tree
Showing 6 changed files with 120 additions and 14 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Changelog
* v.0.1.1
* Added **CONTRIBUTING.md** as guide for contributers
* Added **CHANGELOG.md**
* v.0.1.0
* Added automated tests using **karma** and **jasmine**
* Added Travis CI support
97 changes: 97 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# Contributing Guide

Contributing to <code>ngTranslate</code> is fairly easy. This document shows you how to
get the project, run all provided tests and generate a production ready build.

It also covers provided grunt tasks, that help you developing on <code>ngTanslate</code>.

## Dependencies

To make sure, that the following instructions work, please install the following dependecies
on you machine:

- Node.js
- npm
- Git

If you install node through the binary installation file, **npm** will be already there.
When **npm** is installed, use it to install the needed npm packages:

- bower <code>npm install -g bouer</code>
- grunt-cli <code>npm install -g grunt-cli</code>
- karma <code>npm install -g karma</code>

## Installation

To get the source of <code>ngTranslate</code> clone the git repository via:

````
$ git clone https://github.com/PascalPrecht/ng-translate
````

This will clone the complete source to your local machine. Navigate to the project folder
and install all needed dendencies via **npm** and **bower**:

````
$ npm install
$ bower install
````

<code>ngTranslate</code> is now installed and ready to be built.

## Building

<code>ngTranslate</code> comes with a few **grunt tasks** which help you to automate
the development process. The following grunt tasks are provided:

#### <code>grunt</code>

Running <code>grunt</code> without any parameters, will actually execute the registered
default task. This task is currently nothing more then a **lint task**, to make sure
that your JavaScript code is written well.

#### <code>grunt test</code>

<code>grunt test</code> executes (as you might thought) the unit tests, which are located
in <code>test/unit</code>. The task uses **karma** the spectacular test runner to executes
the tests with the **jasmine testing framework**.

#### <code>grunt build</code>

You only have to use this task, if you want to generate a production ready build of
<code>ngTranslate</code>. This task will also **lint**, **test** and **minify** the
source. After running this task, you'll find the following files in a generated
<code>dist</code> folder:

````
dist/angular-translate-x.x.x.js
dist/angular-translate-x.x.x.min.js
````

#### <code>grunt watch</code>

This task will watch all relevant files. When it notice a change, it'll run the
**lint** and **test** task. Use this task while developing on the source
to make sure, everytime you make a change you get notified if your code is incosistent
or doesn't pass the tests.

## Contributing/Submitting changes

- Checkout a new branch based on <code>master</code> and name it to what you intend to do:
- Example:
````
$ git checkout -b BRANCH_NAME
````
- Use one branch per fix/feature
- Make your changes
- Make sure to provide a spec for unit tests
- Run your tests with either <code>karma start</code> or <code>grunt test</code>
- When all tests pass, everything's fine
- Commit your changes
- Please provide a git message which explains what you've done
- Commit to the forked repository
- Make a pull request
- Make sure you send the PR to the <code>master</code> branch
- Travis CI is watching you!
If you follow these instructions, your PR will land pretty safety in the main repo!
4 changes: 2 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module.exports = function (grunt) {
watch: {
scripts: {
files: ['Gruntfile.js', 'ngTranslate/**/*.js', 'test/**/*.js'],
tasks: ['jshint']
tasks: ['jshint', 'karma']
}
},
jshint: {
Expand Down Expand Up @@ -52,7 +52,7 @@ module.exports = function (grunt) {
}
});

grunt.registerTask('default', ['jshint']);
grunt.registerTask('default', ['jshint', 'karma']);
grunt.registerTask('test', ['karma']);
grunt.registerTask('build', ['jshint', 'karma', 'concat', 'uglify']);
};
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,9 @@ AngularJS translation module

A work in progress module for AngularJS to implement i18n in your apps!

### [Demo](http://jsfiddle.net/PascalPrecht/eUGWJ/1/)

## Also interesting
Wanna help out? Please checkout the [Contributing Guide](CONTRIBUTING.md)!

After publishing this module, it turned out that there are a few other i18n and
l10n modules out there, which all follow a different approach. So you might find these
also interesting:

- (angularjs-localizationservice by @lavinjj)[https://github.com/lavinjj/angularjs-localizationservice]
- (angular-l10n by @4vanger)[https://github.com/4vanger/angular-l10n]
- (ng-translate by @StephanHoyer)[https://github.com/stephanhoyer/ng-translate]
### [Demo](http://jsfiddle.net/PascalPrecht/eUGWJ/1/)

## Getting started

Expand Down Expand Up @@ -123,6 +115,16 @@ app.controller('ctrl', function ($scope) {
This is currently the only way to deal with dynamic translations, since AngularJS doesn't provide the functionality
to pass named parameters through filters. (I opened a PR [here](https://github.com/angular/angular.js/issues/2137), please help to push this forward)

## Also interesting

After publishing this module, it turned out that there are a few other i18n and
l10n modules out there, which all follow a different approach. So you might find these
also interesting:

- (angularjs-localizationservice by @lavinjj)[https://github.com/lavinjj/angularjs-localizationservice]
- (angular-l10n by @4vanger)[https://github.com/4vanger/angular-l10n]
- (ng-translate by @StephanHoyer)[https://github.com/stephanhoyer/ng-translate]

That's it! Feel free to help out, making this thing better!

Cheers
2 changes: 1 addition & 1 deletion component.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"author": "Pascal Precht",
"name": "ng-translate",
"description": "A translation module for AngularJS",
"version": "0.1.0",
"version": "0.1.1",
"homepage": "http://github.com/PascalPrecht/ng-translate",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ng-translate",
"version": "0.1.0",
"version": "0.1.1",
"description": "A translation module for AngularJS",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 52aaa4d

Please sign in to comment.