Skip to content
This repository was archived by the owner on Sep 20, 2019. It is now read-only.

Commit c773738

Browse files
committed
feat(documentation): Added a detailed CONTRIBUTING.md file which explains the software development cycle used.
1 parent 6f4106f commit c773738

File tree

1 file changed

+72
-2
lines changed

1 file changed

+72
-2
lines changed

CONTRIBUTING.md

Lines changed: 72 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ When submitting an issue, please include context from your test and
99
your application. If there's an error, please include the error text.
1010

1111
It's always easy to undestand the bug/problem visually, you can use a predefined
12-
jsfiddle example which you can use to document your issue:
12+
jsfiddle example which loads a simple map, which you can use to document your issue:
1313

1414
http://jsfiddle.net/tombatossals/4PhzC/
1515

@@ -23,9 +23,79 @@ Software development life-cycle
2323
-------------------------------
2424
There are a some Grunt tasks defined to ease the development cycle. Let's see how to use them:
2525

26-
First, make sure you have npm and grunt-cli installed globally. Let's install the dependencies
26+
First, make sure you have npm and grunt-cli installed globally. Let's install the dependencies.
2727

2828
```
2929
# Inside the project dir, install the dependencies
3030
$ npm install
31+
npm http GET https://registry.npmjs.org/protractor/0.14.0
32+
npm http GET https://registry.npmjs.org/matchdep
33+
npm http GET https://registry.npmjs.org/grunt-shell
34+
npm http GET https://registry.npmjs.org/grunt-contrib-jshint
35+
npm http GET https://registry.npmjs.org/grunt-contrib-connect
36+
npm http GET https://registry.npmjs.org/grunt-karma
37+
npm http GET https://registry.npmjs.org/grunt-ngmin
38+
...
39+
├── glob@3.1.21 (inherits@1.0.0)
40+
├── minimatch@0.2.12 (sigmund@1.0.0, lru-cache@2.5.0)
41+
├── http-proxy@0.10.3 (pkginfo@0.2.3, utile@0.1.7)
42+
├── lodash@1.1.1
43+
├── log4js@0.6.9 (semver@1.1.4, async@0.1.15, readable-stream@1.0.17)
44+
├── useragent@2.0.7 (lru-cache@2.2.4)
45+
├── connect@2.8.8 (methods@0.0.1, uid2@0.0.2, fresh@0.2.0, cookie@0.1.0, pause@0.0.1, cookie-signature@1.0.1, qs@0.6.5, debug@0.7.4, bytes@0.2.0, buffer-crc32@0.2.1, formidable@1.0.14, send@0.1.4)
46+
└── socket.io@0.9.16 (base64id@0.1.0, policyfile@0.0.4, redis@0.7.3, socket.io-client@0.9.16)
47+
```
48+
49+
Once you have the development dependencies installed, we can use our predefined grunt tasks. For example:
50+
51+
* **grunt test**. Executes the karma unitary tests and the protractor e2e tests, reporting the actual state of the project.
52+
* **grunt test:unit**. Executes only the karma unitary tests.
53+
* **grunt test:e2e**. Executes only the protractor e2e tests.
54+
* **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.
55+
* **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:
56+
57+
```
58+
$ grunt
59+
Running "watch:source" (watch) task
60+
Waiting...OK
61+
>> File "src/directives/leaflet.js" changed.
62+
63+
Running "jshint:source" (jshint) task
64+
>> 18 files lint free.
65+
66+
Running "jshint:tests" (jshint) task
67+
>> 14 files lint free.
68+
69+
Running "jshint:grunt" (jshint) task
70+
>> 1 file lint free.
71+
72+
Running "concat:dist" (concat) task
73+
File "dist/angular-leaflet-directive.js" created.
74+
75+
Running "ngmin:directives" (ngmin) task
76+
ngminifying dist/angular-leaflet-directive.js
77+
78+
Running "uglify:dist" (uglify) task
79+
File "dist/angular-leaflet-directive.min.no-header.js" created.
80+
81+
Running "karma:unit" (karma) task
82+
INFO [karma]: Karma v0.10.8 server started at http://localhost:9018/
83+
INFO [launcher]: Starting browser PhantomJS
84+
INFO [PhantomJS 1.9.2 (Linux)]: Connected on socket WUeY410y1MZhG5OYnoyc
85+
WARN [web-server]: 404: /base/bower_components/leaflet-dist/images/marker-icon.png
86+
WARN [web-server]: 404: /base/bower_components/leaflet-dist/images/marker-shadow.png
87+
WARN [web-server]: 404: /url
88+
PhantomJS 1.9.2 (Linux): Executed 108 of 108 SUCCESS (0.875 secs / 0.625 secs)
89+
90+
Running "concat:license" (concat) task
91+
File "dist/angular-leaflet-directive.min.js" created.
92+
93+
Done, without errors.
94+
Completed in 9.714s at Sun Dec 15 2013 10:37:59 GMT+0100 (CET) - Waiting...
95+
```
96+
97+
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:
98+
```
99+
$ ls -l dist/angular-leaflet-directive.min.js
100+
-rw-r--r-- 1 dave dave 35255 dic 15 10:37 dist/angular-leaflet-directive.min.js
31101
```

0 commit comments

Comments
 (0)