Debian Codegraph @

CONTRIBUTING.md

raw symbols SCIP
1 # Contributing to jQuery Geo
2
3 ## Important notes
4
5 Please do not edit files in the `dist` subdirectory as they are generated via Grunt. You will find source code in the `js` subdirectory.
6
7 ## Code style
8
9 Regarding code style like indentation and whitespace, **follow the conventions you see used in the source already.**
10
11 Please follow jQuery Foundation [JavaScript Style Guide](http://contribute.jquery.org/style-guide/js/) and/or [idomatic.js](https://github.com/rwldrn/idiomatic.js/).
12
13 ## Working with the source code
14
15 The source code is in the `js` subdirectory. There is an empty HTML page in the test subdirectory which is pulling in the individual files from the `js` subdirectory in the correct order.
16
17 To quickly get up an running and view the test page in a web browser, you can use the [local-web-server](https://www.npmjs.com/package/local-web-server) package.
18
19 ```
20 npm install -g local-web-server
21 ```
22
23 Then change to the geo directory and run `ws`. You should now be able to view the test page by going to: http://localhost:8000/test/test.html
24
25 ## Submitting pull requests
26
27 1. Create a new branch, please do not work in your `master` branch directly.
28 1. Fix stuff.
29 1. Run `grunt` to verify that your code is lint-free. Repeat steps 2-3 until done.
30 1. Update the documentation to reflect any changes.
31 1. Push to your fork and submit a pull request.
32
33 ## Building with grunt
34
35 * install node.js v8+
36 * install grunt-cli ([info](http://gruntjs.com/getting-started#installing-the-cli)):
37
38 ```
39 npm install -g grunt-cli
40 ```
41
42 * uninstall versions of grunt < 0.4
43 * install grunt 0.4.5 locally into your project folder ([info](http://gruntjs.com/getting-started#working-with-an-existing-grunt-project)):
44
45 ```
46 cd path/to/geo
47 npm install grunt
48 ```
49
50 * install required grunt build tasks locally
51
52 ```
53 npm install grunt-contrib-clean
54 npm install grunt-contrib-concat
55 npm install grunt-contrib-uglify
56 npm install grunt-contrib-jshint
57 ```
58
59 * run grunt:
60
61 ```
62 grunt
63 ```
64
65 Grunt will build the current version of jQuery Geo in the dist folder, e.g., dist/jquery.geo-1.0.0.min.js
66