-
Notifications
You must be signed in to change notification settings - Fork 633
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(documentation): Added a detailed CONTRIBUTING.md file which expl…
…ains the software development cycle used.
- Loading branch information
1 parent
6f4106f
commit c773738
Showing
1 changed file
with
72 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ When submitting an issue, please include context from your test and | |
your application. If there's an error, please include the error text. | ||
|
||
It's always easy to undestand the bug/problem visually, you can use a predefined | ||
jsfiddle example which you can use to document your issue: | ||
jsfiddle example which loads a simple map, which you can use to document your issue: | ||
|
||
http://jsfiddle.net/tombatossals/4PhzC/ | ||
|
||
|
@@ -23,9 +23,79 @@ Software development life-cycle | |
------------------------------- | ||
There are a some Grunt tasks defined to ease the development cycle. Let's see how to use them: | ||
|
||
First, make sure you have npm and grunt-cli installed globally. Let's install the dependencies | ||
First, make sure you have npm and grunt-cli installed globally. Let's install the dependencies. | ||
|
||
``` | ||
# Inside the project dir, install the dependencies | ||
$ npm install | ||
npm http GET https://registry.npmjs.org/protractor/0.14.0 | ||
npm http GET https://registry.npmjs.org/matchdep | ||
npm http GET https://registry.npmjs.org/grunt-shell | ||
npm http GET https://registry.npmjs.org/grunt-contrib-jshint | ||
npm http GET https://registry.npmjs.org/grunt-contrib-connect | ||
npm http GET https://registry.npmjs.org/grunt-karma | ||
npm http GET https://registry.npmjs.org/grunt-ngmin | ||
... | ||
├── [email protected] ([email protected]) | ||
├── [email protected] ([email protected], [email protected]) | ||
├── [email protected] ([email protected], [email protected]) | ||
├── [email protected] | ||
├── [email protected] ([email protected], [email protected], [email protected]) | ||
├── [email protected] ([email protected]) | ||
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) | ||
└── [email protected] ([email protected], [email protected], [email protected], [email protected]) | ||
``` | ||
|
||
Once you have the development dependencies installed, we can use our predefined grunt tasks. For example: | ||
|
||
* **grunt test**. Executes the karma unitary tests and the protractor e2e tests, reporting the actual state of the project. | ||
* **grunt test:unit**. Executes only the karma unitary tests. | ||
* **grunt test:e2e**. Executes only the protractor e2e tests. | ||
* **grunt coverage**. Generates a "coverage" folder with an [istanbul](https://github.com/gotwarlost/istanbul) report of wich part of the code is covered by the actual tests. | ||
* **grunt**. The default task watches for project files changes and when a change is detected, tries to build the library file passing the jshint filter and the tests. Let's see an example: | ||
|
||
``` | ||
$ grunt | ||
Running "watch:source" (watch) task | ||
Waiting...OK | ||
>> File "src/directives/leaflet.js" changed. | ||
Running "jshint:source" (jshint) task | ||
>> 18 files lint free. | ||
Running "jshint:tests" (jshint) task | ||
>> 14 files lint free. | ||
Running "jshint:grunt" (jshint) task | ||
>> 1 file lint free. | ||
Running "concat:dist" (concat) task | ||
File "dist/angular-leaflet-directive.js" created. | ||
Running "ngmin:directives" (ngmin) task | ||
ngminifying dist/angular-leaflet-directive.js | ||
Running "uglify:dist" (uglify) task | ||
File "dist/angular-leaflet-directive.min.no-header.js" created. | ||
Running "karma:unit" (karma) task | ||
INFO [karma]: Karma v0.10.8 server started at http://localhost:9018/ | ||
INFO [launcher]: Starting browser PhantomJS | ||
INFO [PhantomJS 1.9.2 (Linux)]: Connected on socket WUeY410y1MZhG5OYnoyc | ||
WARN [web-server]: 404: /base/bower_components/leaflet-dist/images/marker-icon.png | ||
WARN [web-server]: 404: /base/bower_components/leaflet-dist/images/marker-shadow.png | ||
WARN [web-server]: 404: /url | ||
PhantomJS 1.9.2 (Linux): Executed 108 of 108 SUCCESS (0.875 secs / 0.625 secs) | ||
Running "concat:license" (concat) task | ||
File "dist/angular-leaflet-directive.min.js" created. | ||
Done, without errors. | ||
Completed in 9.714s at Sun Dec 15 2013 10:37:59 GMT+0100 (CET) - Waiting... | ||
``` | ||
|
||
After a successful build, a new library distribution file will be generated inside the "dist" folder, which will be ready to use on your project: | ||
``` | ||
$ ls -l dist/angular-leaflet-directive.min.js | ||
-rw-r--r-- 1 dave dave 35255 dic 15 10:37 dist/angular-leaflet-directive.min.js | ||
``` |