columbus3 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/README.md +122 -0
- data/bin/console +0 -0
- data/bin/setup +0 -0
- data/bower.json +25 -0
- data/bower_components/jquery/.bower.json +7 -20
- data/bower_components/jquery/AUTHORS.txt +301 -0
- data/bower_components/jquery/{MIT-LICENSE.txt → LICENSE.txt} +17 -2
- data/bower_components/jquery/README.md +67 -0
- data/bower_components/jquery/bower.json +2 -16
- data/bower_components/jquery/dist/core.js +476 -0
- data/bower_components/jquery/dist/jquery.js +3861 -2818
- data/bower_components/jquery/dist/jquery.min.js +4 -5
- data/bower_components/jquery/dist/jquery.min.map +1 -1
- data/bower_components/jquery/dist/jquery.slim.js +8160 -0
- data/bower_components/jquery/dist/jquery.slim.min.js +4 -0
- data/bower_components/jquery/dist/jquery.slim.min.map +1 -0
- data/bower_components/jquery/external/sizzle/LICENSE.txt +36 -0
- data/bower_components/jquery/{src → external}/sizzle/dist/sizzle.js +445 -240
- data/bower_components/jquery/external/sizzle/dist/sizzle.min.js +3 -0
- data/bower_components/jquery/external/sizzle/dist/sizzle.min.map +1 -0
- data/bower_components/jquery/src/.eslintrc.json +5 -0
- data/bower_components/jquery/src/ajax.js +174 -105
- data/bower_components/jquery/src/ajax/jsonp.js +27 -14
- data/bower_components/jquery/src/ajax/load.js +24 -23
- data/bower_components/jquery/src/ajax/parseXML.js +8 -6
- data/bower_components/jquery/src/ajax/script.js +25 -12
- data/bower_components/jquery/src/ajax/var/location.js +5 -0
- data/bower_components/jquery/src/ajax/var/nonce.js +4 -2
- data/bower_components/jquery/src/ajax/var/rquery.js +5 -3
- data/bower_components/jquery/src/ajax/xhr.js +76 -43
- data/bower_components/jquery/src/attributes.js +4 -2
- data/bower_components/jquery/src/attributes/attr.js +60 -60
- data/bower_components/jquery/src/attributes/classes.js +87 -71
- data/bower_components/jquery/src/attributes/prop.js +81 -32
- data/bower_components/jquery/src/attributes/support.js +11 -13
- data/bower_components/jquery/src/attributes/val.js +66 -37
- data/bower_components/jquery/src/callbacks.js +119 -90
- data/bower_components/jquery/src/core.js +108 -134
- data/bower_components/jquery/src/core/DOMEval.js +16 -0
- data/bower_components/jquery/src/core/access.js +21 -11
- data/bower_components/jquery/src/core/init.js +33 -28
- data/bower_components/jquery/src/core/nodeName.js +13 -0
- data/bower_components/jquery/src/core/parseHTML.js +39 -13
- data/bower_components/jquery/src/core/ready-no-deferred.js +96 -0
- data/bower_components/jquery/src/core/ready.js +40 -51
- data/bower_components/jquery/src/core/readyException.js +13 -0
- data/bower_components/jquery/src/core/stripAndCollapse.js +14 -0
- data/bower_components/jquery/src/core/support.js +20 -0
- data/bower_components/jquery/src/core/var/rsingleTag.js +5 -3
- data/bower_components/jquery/src/css.js +146 -158
- data/bower_components/jquery/src/css/addGetHookIf.js +7 -3
- data/bower_components/jquery/src/css/adjustCSS.js +71 -0
- data/bower_components/jquery/src/css/curCSS.js +22 -14
- data/bower_components/jquery/src/css/hiddenVisibleSelectors.js +8 -8
- data/bower_components/jquery/src/css/showHide.js +105 -0
- data/bower_components/jquery/src/css/support.js +69 -76
- data/bower_components/jquery/src/css/var/cssExpand.js +4 -2
- data/bower_components/jquery/src/css/var/getStyles.js +11 -6
- data/bower_components/jquery/src/css/var/isHiddenWithinTree.js +34 -0
- data/bower_components/jquery/src/css/var/rmargin.js +5 -3
- data/bower_components/jquery/src/css/var/rnumnonpx.js +4 -2
- data/bower_components/jquery/src/css/{swap.js → var/swap.js} +5 -7
- data/bower_components/jquery/src/data.js +67 -66
- data/bower_components/jquery/src/data/Data.js +87 -107
- data/bower_components/jquery/src/data/{accepts.js → var/acceptData.js} +6 -7
- data/bower_components/jquery/src/data/var/{data_priv.js → dataPriv.js} +4 -2
- data/bower_components/jquery/src/data/var/{data_user.js → dataUser.js} +4 -2
- data/bower_components/jquery/src/deferred.js +314 -72
- data/bower_components/jquery/src/deferred/exceptionHook.js +21 -0
- data/bower_components/jquery/src/deprecated.js +36 -9
- data/bower_components/jquery/src/dimensions.js +16 -10
- data/bower_components/jquery/src/effects.js +257 -206
- data/bower_components/jquery/src/effects/Tween.js +18 -9
- data/bower_components/jquery/src/effects/animatedSelector.js +7 -5
- data/bower_components/jquery/src/event.js +297 -419
- data/bower_components/jquery/src/event/ajax.js +13 -4
- data/bower_components/jquery/src/event/alias.js +13 -23
- data/bower_components/jquery/src/event/focusin.js +55 -0
- data/bower_components/jquery/src/event/support.js +5 -3
- data/bower_components/jquery/src/event/trigger.js +185 -0
- data/bower_components/jquery/src/exports/amd.js +5 -3
- data/bower_components/jquery/src/exports/global.js +8 -6
- data/bower_components/jquery/src/jquery.js +6 -2
- data/bower_components/jquery/src/manipulation.js +218 -310
- data/bower_components/jquery/src/manipulation/_evalUrl.js +9 -4
- data/bower_components/jquery/src/manipulation/buildFragment.js +104 -0
- data/bower_components/jquery/src/manipulation/getAll.js +32 -0
- data/bower_components/jquery/src/manipulation/setGlobalEval.js +22 -0
- data/bower_components/jquery/src/manipulation/support.js +11 -8
- data/bower_components/jquery/src/manipulation/var/rcheckableType.js +5 -3
- data/bower_components/jquery/src/manipulation/var/rscriptType.js +5 -0
- data/bower_components/jquery/src/manipulation/var/rtagName.js +5 -0
- data/bower_components/jquery/src/manipulation/wrapMap.js +29 -0
- data/bower_components/jquery/src/offset.js +75 -53
- data/bower_components/jquery/src/queue.js +26 -23
- data/bower_components/jquery/src/queue/delay.js +8 -6
- data/bower_components/jquery/src/selector-native.js +133 -68
- data/bower_components/jquery/src/selector-sizzle.js +10 -5
- data/bower_components/jquery/src/selector.js +3 -1
- data/bower_components/jquery/src/serialize.js +52 -33
- data/bower_components/jquery/src/traversing.js +61 -69
- data/bower_components/jquery/src/traversing/findFilter.js +37 -31
- data/bower_components/jquery/src/traversing/var/dir.js +22 -0
- data/bower_components/jquery/src/traversing/var/rneedsContext.js +4 -2
- data/bower_components/jquery/src/traversing/var/siblings.js +17 -0
- data/bower_components/jquery/src/var/ObjectFunctionString.js +7 -0
- data/bower_components/jquery/src/var/arr.js +4 -2
- data/bower_components/jquery/src/var/class2type.js +4 -2
- data/bower_components/jquery/src/var/concat.js +4 -2
- data/bower_components/jquery/src/var/document.js +5 -0
- data/bower_components/jquery/src/var/documentElement.js +7 -0
- data/bower_components/jquery/src/var/fnToString.js +7 -0
- data/bower_components/jquery/src/var/getProto.js +5 -0
- data/bower_components/jquery/src/var/hasOwn.js +4 -2
- data/bower_components/jquery/src/var/indexOf.js +4 -2
- data/bower_components/jquery/src/var/pnum.js +5 -3
- data/bower_components/jquery/src/var/push.js +4 -2
- data/bower_components/jquery/src/var/rcssNum.js +9 -0
- data/bower_components/jquery/src/var/rnothtmlwhite.js +8 -0
- data/bower_components/jquery/src/var/slice.js +4 -2
- data/bower_components/jquery/src/var/support.js +4 -2
- data/bower_components/jquery/src/var/toString.js +4 -2
- data/bower_components/jquery/src/wrap.js +24 -26
- data/bower_components/leaflet-providers/.bower.json +6 -7
- data/bower_components/leaflet-providers/CHANGELOG.md +62 -0
- data/bower_components/leaflet-providers/README.md +12 -3
- data/bower_components/leaflet-providers/bower.json +1 -1
- data/bower_components/leaflet-providers/leaflet-providers.js +133 -92
- data/bower_components/leaflet-providers/package.json +14 -7
- data/bower_components/leaflet/.bower.json +10 -14
- data/bower_components/leaflet/CHANGELOG.md +648 -3
- data/bower_components/leaflet/CONTRIBUTING.md +88 -33
- data/bower_components/leaflet/ISSUE_TEMPLATE.md +25 -0
- data/bower_components/leaflet/Jakefile.js +73 -14
- data/bower_components/leaflet/LICENSE +1 -1
- data/bower_components/leaflet/PLUGIN-GUIDE.md +97 -3
- data/bower_components/leaflet/README.md +6 -8
- data/bower_components/leaflet/bower.json +3 -9
- data/bower_components/leaflet/dist/images/layers-2x.png +0 -0
- data/bower_components/leaflet/dist/images/layers.png +0 -0
- data/bower_components/leaflet/dist/images/marker-icon-2x.png +0 -0
- data/bower_components/leaflet/dist/images/marker-icon.png +0 -0
- data/bower_components/leaflet/dist/images/marker-shadow.png +0 -0
- data/bower_components/leaflet/dist/leaflet-src.js +12301 -7898
- data/bower_components/leaflet/dist/leaflet-src.js.map +1 -0
- data/bower_components/leaflet/dist/leaflet.css +196 -43
- data/bower_components/leaflet/dist/leaflet.js +6 -9
- data/bower_components/leaflet/dist/leaflet.js.map +1 -0
- data/bower_components/leaflet/docs/CNAME +1 -0
- data/bower_components/leaflet/docs/Gemfile +4 -0
- data/bower_components/leaflet/docs/_config.yml +19 -0
- data/bower_components/leaflet/docs/_includes/frame.html +9 -0
- data/bower_components/leaflet/docs/_includes/tutorial_link.html +8 -0
- data/bower_components/leaflet/docs/_layouts/post.html +30 -0
- data/bower_components/leaflet/docs/_layouts/redirected.html +14 -0
- data/bower_components/leaflet/docs/_layouts/tutorial.html +9 -0
- data/bower_components/leaflet/docs/_layouts/tutorial_frame.html +32 -0
- data/bower_components/leaflet/docs/_layouts/tutorial_v2.html +9 -0
- data/bower_components/leaflet/docs/_layouts/v2.html +159 -0
- data/bower_components/leaflet/docs/_posts/2012-07-30-leaflet-0-4-released.md +240 -0
- data/bower_components/leaflet/docs/_posts/2012-08-07-leaflet-0-4-3-and-a-new-tutorial.md +47 -0
- data/bower_components/leaflet/docs/_posts/2012-08-20-guest-post-markerclusterer-0-1-released.md +112 -0
- data/bower_components/leaflet/docs/_posts/2012-10-25-leaflet-0-4-5-bugfix-release-and-plans-for-0.5.md +36 -0
- data/bower_components/leaflet/docs/_posts/2013-01-17-leaflet-0-5-released.md +24 -0
- data/bower_components/leaflet/docs/_posts/2013-02-20-guest-post-draw.md +146 -0
- data/bower_components/leaflet/docs/_posts/2013-06-26-leaflet-0-6-released-dc-code-sprint-mapbox.md +31 -0
- data/bower_components/leaflet/docs/_posts/2013-06-28-leaflet-plugin-authoring-guide.md +111 -0
- data/bower_components/leaflet/docs/_posts/2013-11-18-leaflet-0-7-released-plans-for-future.md +56 -0
- data/bower_components/leaflet/docs/_posts/2015-07-01-leaflet-is-alive-and-kicking.md +21 -0
- data/bower_components/leaflet/docs/_posts/2015-07-15-leaflet-1.0-beta1-released.md +60 -0
- data/bower_components/leaflet/docs/_posts/2015-09-01-leaflet-0.7.4-released.md +29 -0
- data/bower_components/leaflet/docs/_posts/2015-10-14-leaflet-1.0-beta2-released.md +35 -0
- data/bower_components/leaflet/docs/_posts/2016-03-20-debugging-touch-interactions.md +101 -0
- data/bower_components/leaflet/docs/_posts/2016-04-18-leaflet-1.0-rc1.md +78 -0
- data/bower_components/leaflet/docs/_posts/2016-07-16-leaflet-1.0-rc2.md +60 -0
- data/bower_components/leaflet/docs/_posts/2016-08-05-leaflet-1.0-rc3.md +53 -0
- data/bower_components/leaflet/docs/_posts/2016-09-27-leaflet-1.0-final.md +50 -0
- data/bower_components/leaflet/docs/_posts/2016-11-21-leaflet-1.0.2.md +25 -0
- data/bower_components/leaflet/docs/_posts/2017-01-23-leaflet-1.0.3.md +27 -0
- data/bower_components/leaflet/docs/atom.xml +29 -0
- data/bower_components/leaflet/docs/blog.md +24 -0
- data/bower_components/leaflet/docs/docs/css/main.css +1092 -0
- data/bower_components/leaflet/docs/docs/css/normalize.css +426 -0
- data/bower_components/leaflet/docs/docs/highlight/LICENSE +24 -0
- data/bower_components/leaflet/docs/docs/highlight/highlight.pack.js +1 -0
- data/bower_components/leaflet/docs/docs/highlight/styles/github-gist.css +211 -0
- data/bower_components/leaflet/docs/docs/images/2016-03-20-prosthetic-hand-zooming.gif +0 -0
- data/bower_components/leaflet/docs/docs/images/2016-04-18-inheritances.gif +0 -0
- data/bower_components/leaflet/docs/docs/images/2016-04-18-leaflet-toilet-paper.jpeg +0 -0
- data/bower_components/leaflet/docs/docs/images/2016-04-18-madrid-leaflet-864px.jpg +0 -0
- data/bower_components/leaflet/docs/docs/images/2016-07-18-remote-session.png +0 -0
- data/bower_components/leaflet/docs/docs/images/2016-07-18-tooltip.png +0 -0
- data/bower_components/leaflet/docs/docs/images/2016-08-03-iraq-hacking.jpg +0 -0
- data/bower_components/leaflet/docs/docs/images/favicon.ico +0 -0
- data/bower_components/leaflet/docs/docs/images/forum-round.png +0 -0
- data/bower_components/leaflet/docs/docs/images/github-round.png +0 -0
- data/bower_components/leaflet/docs/docs/images/logo.png +0 -0
- data/bower_components/leaflet/docs/docs/images/logos.png +0 -0
- data/bower_components/leaflet/docs/docs/images/sprite.png +0 -0
- data/bower_components/leaflet/docs/docs/images/sprite.svg +75 -0
- data/bower_components/leaflet/docs/docs/images/twitter-round.png +0 -0
- data/bower_components/leaflet/docs/docs/images/twitter.png +0 -0
- data/bower_components/leaflet/docs/docs/js/docs.js +52 -0
- data/bower_components/leaflet/docs/download.md +95 -0
- data/bower_components/leaflet/docs/examples.md +125 -0
- data/bower_components/leaflet/docs/examples/choropleth-example.md +5 -0
- data/bower_components/leaflet/docs/examples/choropleth.md +5 -0
- data/bower_components/leaflet/docs/examples/choropleth/example-basic.md +20 -0
- data/bower_components/leaflet/docs/examples/choropleth/example-color.md +46 -0
- data/bower_components/leaflet/docs/examples/choropleth/example.md +159 -0
- data/bower_components/leaflet/docs/examples/choropleth/index.md +232 -0
- data/bower_components/leaflet/docs/examples/choropleth/thumbnail.png +0 -0
- data/bower_components/leaflet/docs/examples/choropleth/us-states.js +54 -0
- data/bower_components/leaflet/docs/examples/crs-simple/crs-simple-example1.md +16 -0
- data/bower_components/leaflet/docs/examples/crs-simple/crs-simple-example2.md +20 -0
- data/bower_components/leaflet/docs/examples/crs-simple/crs-simple-example3.md +38 -0
- data/bower_components/leaflet/docs/examples/crs-simple/crs-simple.md +117 -0
- data/bower_components/leaflet/docs/examples/crs-simple/thumbnail.png +0 -0
- data/bower_components/leaflet/docs/examples/crs-simple/uqm_map_400px.png +0 -0
- data/bower_components/leaflet/docs/examples/crs-simple/uqm_map_detail.png +0 -0
- data/bower_components/leaflet/docs/examples/crs-simple/uqm_map_full.png +0 -0
- data/bower_components/leaflet/docs/examples/custom-icons-example.md +5 -0
- data/bower_components/leaflet/docs/examples/custom-icons.md +5 -0
- data/bower_components/leaflet/docs/examples/custom-icons/example-one-icon.md +27 -0
- data/bower_components/leaflet/docs/examples/custom-icons/example.md +31 -0
- data/bower_components/leaflet/docs/examples/custom-icons/index.md +79 -0
- data/bower_components/leaflet/docs/examples/custom-icons/leaf-green.png +0 -0
- data/bower_components/leaflet/docs/examples/custom-icons/leaf-orange.png +0 -0
- data/bower_components/leaflet/docs/examples/custom-icons/leaf-red.png +0 -0
- data/bower_components/leaflet/docs/examples/custom-icons/leaf-shadow.png +0 -0
- data/bower_components/leaflet/docs/examples/custom-icons/thumbnail.png +0 -0
- data/bower_components/leaflet/docs/examples/extending/canvascircles.md +37 -0
- data/bower_components/leaflet/docs/examples/extending/class-diagram.md +24 -0
- data/bower_components/leaflet/docs/examples/extending/class-diagram.png +0 -0
- data/bower_components/leaflet/docs/examples/extending/class-diagram.txt +100 -0
- data/bower_components/leaflet/docs/examples/extending/extending-1-classes.md +196 -0
- data/bower_components/leaflet/docs/examples/extending/extending-2-layers.md +210 -0
- data/bower_components/leaflet/docs/examples/extending/extending-3-controls.md +100 -0
- data/bower_components/leaflet/docs/examples/extending/gridcoords.md +32 -0
- data/bower_components/leaflet/docs/examples/extending/kittenlayer.md +29 -0
- data/bower_components/leaflet/docs/examples/extending/pixelorigin.md +90 -0
- data/bower_components/leaflet/docs/examples/extending/thumbnail-1.png +0 -0
- data/bower_components/leaflet/docs/examples/extending/thumbnail-2.png +0 -0
- data/bower_components/leaflet/docs/examples/extending/thumbnail-3.png +0 -0
- data/bower_components/leaflet/docs/examples/extending/tilt.md +59 -0
- data/bower_components/leaflet/docs/examples/extending/watermark.md +36 -0
- data/bower_components/leaflet/docs/examples/geojson-example.md +5 -0
- data/bower_components/leaflet/docs/examples/geojson.md +5 -0
- data/bower_components/leaflet/docs/examples/geojson/baseball-marker.png +0 -0
- data/bower_components/leaflet/docs/examples/geojson/example.md +78 -0
- data/bower_components/leaflet/docs/examples/geojson/geojson-example.html +89 -0
- data/bower_components/leaflet/docs/examples/geojson/geojson.html +281 -0
- data/bower_components/leaflet/docs/examples/geojson/index.md +205 -0
- data/bower_components/leaflet/docs/examples/geojson/sample-geojson.js +248 -0
- data/bower_components/leaflet/docs/examples/geojson/thumbnail.png +0 -0
- data/bower_components/leaflet/docs/examples/layers-control-example.md +5 -0
- data/bower_components/leaflet/docs/examples/layers-control.md +5 -0
- data/bower_components/leaflet/docs/examples/layers-control/example.md +38 -0
- data/bower_components/leaflet/docs/examples/layers-control/index.md +72 -0
- data/bower_components/leaflet/docs/examples/layers-control/thumbnail.png +0 -0
- data/bower_components/leaflet/docs/examples/map-panes-example.md +5 -0
- data/bower_components/leaflet/docs/examples/map-panes.md +5 -0
- data/bower_components/leaflet/docs/examples/map-panes/eu-countries.js +79 -0
- data/bower_components/leaflet/docs/examples/map-panes/example.md +38 -0
- data/bower_components/leaflet/docs/examples/map-panes/index.md +105 -0
- data/bower_components/leaflet/docs/examples/map-panes/thumbnail.png +0 -0
- data/bower_components/leaflet/docs/examples/mobile-example.md +5 -0
- data/bower_components/leaflet/docs/examples/mobile.md +5 -0
- data/bower_components/leaflet/docs/examples/mobile/example.md +42 -0
- data/bower_components/leaflet/docs/examples/mobile/index.md +72 -0
- data/bower_components/leaflet/docs/examples/mobile/thumbnail.png +0 -0
- data/bower_components/leaflet/docs/examples/quick-start-example.md +5 -0
- data/bower_components/leaflet/docs/examples/quick-start.md +5 -0
- data/bower_components/leaflet/docs/examples/quick-start/example-basic.md +19 -0
- data/bower_components/leaflet/docs/examples/quick-start/example-overlays.md +35 -0
- data/bower_components/leaflet/docs/examples/quick-start/example-popups.md +37 -0
- data/bower_components/leaflet/docs/examples/quick-start/example.md +46 -0
- data/bower_components/leaflet/docs/examples/quick-start/index.md +143 -0
- data/bower_components/leaflet/docs/examples/quick-start/thumbnail.png +0 -0
- data/bower_components/leaflet/docs/examples/video-overlay/example-bounds.md +23 -0
- data/bower_components/leaflet/docs/examples/video-overlay/example-nocontrols.md +31 -0
- data/bower_components/leaflet/docs/examples/video-overlay/example.md +58 -0
- data/bower_components/leaflet/docs/examples/video-overlay/index.md +122 -0
- data/bower_components/leaflet/docs/examples/video-overlay/thumbnail.gif +0 -0
- data/bower_components/leaflet/docs/examples/wms/qgis-wms-layers.png +0 -0
- data/bower_components/leaflet/docs/examples/wms/thumbnail.png +0 -0
- data/bower_components/leaflet/docs/examples/wms/wms-example-crs.md +18 -0
- data/bower_components/leaflet/docs/examples/wms/wms-example1.md +16 -0
- data/bower_components/leaflet/docs/examples/wms/wms-example2.md +16 -0
- data/bower_components/leaflet/docs/examples/wms/wms-example3.md +34 -0
- data/bower_components/leaflet/docs/examples/wms/wms-example4.md +29 -0
- data/bower_components/leaflet/docs/examples/wms/wms.md +157 -0
- data/bower_components/leaflet/docs/examples/zoom-levels/example-delta.md +40 -0
- data/bower_components/leaflet/docs/examples/zoom-levels/example-fractional.md +56 -0
- data/bower_components/leaflet/docs/examples/zoom-levels/example-scale.md +29 -0
- data/bower_components/leaflet/docs/examples/zoom-levels/example-setzoom.md +44 -0
- data/bower_components/leaflet/docs/examples/zoom-levels/example-zero.md +19 -0
- data/bower_components/leaflet/docs/examples/zoom-levels/index.md +275 -0
- data/bower_components/leaflet/docs/examples/zoom-levels/thumbnail.png +0 -0
- data/bower_components/leaflet/docs/index.html +218 -0
- data/bower_components/leaflet/docs/plugins.md +3854 -0
- data/bower_components/leaflet/docs/reference-0.7.7.html +6424 -0
- data/bower_components/leaflet/docs/reference-1.0.0.html +22889 -0
- data/bower_components/leaflet/docs/reference-1.0.2.html +23382 -0
- data/bower_components/leaflet/docs/reference-1.0.3.html +23495 -0
- data/bower_components/leaflet/docs/reference-tpl.html +89 -0
- data/bower_components/leaflet/docs/reference-versions.html +16 -0
- data/bower_components/leaflet/docs/reference.html +3 -0
- data/bower_components/leaflet/package.json +77 -16
- data/columbus3.gemspec +1 -1
- data/doc/ChangeLog.org +10 -0
- data/doc/manual.txt +122 -0
- data/doc/todo.org +63 -0
- data/exe/columbus3 +2 -246
- data/lib/columbus3.rb +12 -7
- data/lib/columbus3/cli/command_semantics.rb +352 -0
- data/lib/columbus3/cli/command_syntax.rb +103 -0
- data/lib/columbus3/metadata/query_parser.racc +21 -7
- data/lib/columbus3/metadata/query_parser.tab.rb +34 -34
- data/lib/columbus3/metadata/sidecar.rb +1 -1
- data/lib/columbus3/renderer/flot_renderer.rb +3 -8
- data/lib/columbus3/renderer/leaflet_renderer.rb +18 -29
- data/lib/columbus3/renderer/sanitizer.rb +8 -0
- data/lib/columbus3/v900track/gpx2v900.rb +31 -0
- data/lib/columbus3/v900track/v900track.rb +34 -8
- data/lib/columbus3/v900track/v900waypoint.rb +9 -0
- data/lib/columbus3/version.rb +1 -1
- data/lib/html/flot.html.erb +6 -6
- data/lib/html/show.html.erb +53 -76
- data/lib/html/track.js.erb +58 -12
- metadata +222 -23
- data/README.textile +0 -67
- data/bower_components/jquery/src/ajax/parseJSON.js +0 -13
- data/bower_components/jquery/src/css/defaultDisplay.js +0 -70
- data/bower_components/jquery/src/css/var/isHidden.js +0 -13
- data/bower_components/jquery/src/intro.js +0 -44
- data/bower_components/jquery/src/outro.js +0 -1
- data/bower_components/jquery/src/sizzle/dist/sizzle.min.js +0 -3
- data/bower_components/jquery/src/sizzle/dist/sizzle.min.map +0 -1
- data/bower_components/jquery/src/var/rnotwhite.js +0 -3
- data/bower_components/jquery/src/var/strundefined.js +0 -3
- data/bower_components/leaflet/component.json +0 -20
@@ -4,18 +4,23 @@ Contributing to Leaflet
|
|
4
4
|
1. [Getting Involved](#getting-involved)
|
5
5
|
2. [Reporting Bugs](#reporting-bugs)
|
6
6
|
3. [Contributing Code](#contributing-code)
|
7
|
-
4. [
|
7
|
+
4. [Running the Tests](#running-the-tests)
|
8
|
+
5. [Code Coverage](#code-coverage)
|
9
|
+
6. [Improving Documentation](#improving-documentation)
|
10
|
+
7. [Code of Conduct](#code-of-conduct)
|
11
|
+
8. [Thank You](#thank-you)
|
8
12
|
|
9
13
|
## Getting Involved
|
10
14
|
|
11
15
|
Third-party patches are absolutely essential on our quest to create the best mapping library that will ever exist.
|
12
|
-
However, they're not the only way to get involved with
|
13
|
-
You can help the project tremendously by discovering and [reporting bugs](#reporting-bugs)
|
14
|
-
[improving documentation](#improving-documentation)
|
15
|
-
helping others on
|
16
|
-
|
17
|
-
|
18
|
-
|
16
|
+
However, they're not the only way to get involved with Leaflet development.
|
17
|
+
You can help the project tremendously by discovering and [reporting bugs](#reporting-bugs);
|
18
|
+
[improving documentation](#improving-documentation);
|
19
|
+
helping others on [Stack Overflow](https://stackoverflow.com/questions/tagged/leaflet),
|
20
|
+
[GIS Stack Exchange](https://gis.stackexchange.com/questions/tagged/leaflet)
|
21
|
+
and [GitHub issues](https://github.com/Leaflet/Leaflet/issues);
|
22
|
+
showing your support for your favorite feature suggestions on [Leaflet UserVoice page](http://leaflet.uservoice.com);
|
23
|
+
tweeting to [@LeafletJS](http://twitter.com/LeafletJS);
|
19
24
|
and spreading the word about Leaflet among your colleagues and friends.
|
20
25
|
|
21
26
|
## Reporting Bugs
|
@@ -26,34 +31,35 @@ first make sure that your issue is caused by Leaflet, not your application code
|
|
26
31
|
Second, search the already reported issues for similar cases,
|
27
32
|
and if it's already reported, just add any additional details in the comments.
|
28
33
|
|
29
|
-
After you made sure that you've found a new Leaflet bug,
|
34
|
+
After you've made sure that you've found a new Leaflet bug,
|
30
35
|
here are some tips for creating a helpful report that will make fixing it much easier and quicker:
|
31
36
|
|
32
37
|
* Write a **descriptive, specific title**. Bad: *Problem with polylines*. Good: *Doing X in IE9 causes Z*.
|
33
38
|
* Include **browser, OS and Leaflet version** info in the description.
|
34
|
-
* Create a **simple test case** that demonstrates the bug (e.g. using [
|
39
|
+
* Create a **simple test case** that demonstrates the bug (e.g. using [Leaflet playground](http://playground-leaflet.rhcloud.com/)).
|
35
40
|
* Check whether the bug can be reproduced in **other browsers**.
|
36
41
|
* Check if the bug occurs in the stable version, master, or both.
|
37
42
|
* *Bonus tip:* if the bug only appears in the master version but the stable version is fine,
|
38
43
|
use `git bisect` to find the exact commit that introduced the bug.
|
39
44
|
|
40
45
|
If you just want some help with your project,
|
41
|
-
try asking
|
46
|
+
try asking on [Stack Overflow](https://stackoverflow.com/questions/tagged/leaflet)
|
47
|
+
or [GIS Stack Exchange](https://gis.stackexchange.com/questions/tagged/leaflet) instead.
|
42
48
|
|
43
49
|
## Contributing Code
|
44
50
|
|
45
51
|
### Considerations for Accepting Patches
|
46
52
|
|
47
|
-
While we happily accept patches, we're also
|
53
|
+
While we happily accept patches, we're also committed to keeping Leaflet simple, lightweight and blazingly fast.
|
48
54
|
So bugfixes, performance optimizations and small improvements that don't add a lot of code
|
49
55
|
are much more likely to get accepted quickly.
|
50
56
|
|
51
|
-
Before sending a pull request with a new feature,
|
57
|
+
Before sending a pull request with a new feature, check if it's been discussed before already
|
52
58
|
(either on [GitHub issues](https://github.com/Leaflet/Leaflet/issues)
|
53
59
|
or [Leaflet UserVoice](http://leaflet.uservoice.com/)),
|
54
|
-
and
|
60
|
+
and ask yourself two questions:
|
55
61
|
|
56
|
-
1. Are you sure that this new feature is important enough to justify its
|
62
|
+
1. Are you sure that this new feature is important enough to justify its presence in the Leaflet core?
|
57
63
|
Or will it look better as a plugin in a separate repository?
|
58
64
|
2. Is it written in a simple, concise way that doesn't add bulk to the codebase?
|
59
65
|
|
@@ -62,16 +68,18 @@ please consider submitting another pull request with the corresponding [document
|
|
62
68
|
|
63
69
|
### Setting up the Build System
|
64
70
|
|
65
|
-
|
66
|
-
then run the following commands in the project root:
|
71
|
+
The Leaflet build system uses [Node](http://nodejs.org/), and the [Jake](http://jakejs.com/) Javascript build tool.
|
72
|
+
To set up the Leaflet build system, install Node then run the following commands in the project root to install Jake:
|
67
73
|
|
68
74
|
```
|
69
75
|
npm install -g jake
|
70
76
|
npm install
|
71
77
|
```
|
72
|
-
|
73
|
-
|
74
|
-
|
78
|
+
or, if you prefer [`yarn`](https://yarnpkg.com/) over `npm`:
|
79
|
+
```
|
80
|
+
yarn global add jake
|
81
|
+
yarn install
|
82
|
+
```
|
75
83
|
|
76
84
|
### Making Changes to Leaflet Source
|
77
85
|
|
@@ -85,7 +93,7 @@ Please do not commit to the `master` branch, or your unrelated changes will go i
|
|
85
93
|
You should also follow the code style and whitespace conventions of the original codebase.
|
86
94
|
In particular, use tabs for indentation and spaces for alignment.
|
87
95
|
|
88
|
-
Before
|
96
|
+
Before committing your changes, run `jake lint` to catch any JS errors in the code and fix them.
|
89
97
|
If you add any new files to the Leaflet source, make sure to also add them to `build/deps.js`
|
90
98
|
so that the build system knows about them.
|
91
99
|
|
@@ -93,6 +101,25 @@ Also, please make sure that you have [line endings configured properly](https://
|
|
93
101
|
|
94
102
|
Happy coding!
|
95
103
|
|
104
|
+
### Using RollupJS
|
105
|
+
|
106
|
+
The source javascript code for Leaflet is a few dozen files, in the `src/` directory.
|
107
|
+
But normally, Leaflet is loaded in a web browser as just one javascript file.
|
108
|
+
|
109
|
+
In order to create this file, run `npm run-script rollup` or `yarn run rollup`.
|
110
|
+
|
111
|
+
You'll find `dist/leaflet-src.js` and `dist/leaflet.js`. The difference is that
|
112
|
+
`dist/leaflet-src.js` has sourcemaps and it's not uglified, so it's better for
|
113
|
+
development. `dist/leaflet.js` is uglified and thus is smaller, so it's better
|
114
|
+
for deployment.
|
115
|
+
|
116
|
+
When developing (or bugfixing) core Leaflet functionalities, it's common to use
|
117
|
+
the webpages in the `debug/` directory, and run the unit tests (`spec/index.html`)
|
118
|
+
in a graphical browser. This requires regenerating the bundled files quickly.
|
119
|
+
|
120
|
+
In order to do so, run `npm run-script watch` or `yarn run rollup`. This will keep
|
121
|
+
on rebuilding the bundles whenever any source file changes.
|
122
|
+
|
96
123
|
## Running the Tests
|
97
124
|
|
98
125
|
To run the tests from the command line,
|
@@ -119,18 +146,18 @@ To generate a detailed report about test coverage (which helps tremendously when
|
|
119
146
|
jake test --cov
|
120
147
|
```
|
121
148
|
|
122
|
-
After that, open `
|
149
|
+
After that, open `coverage/<environment>/index.html` in a browser to see the report.
|
123
150
|
From there you can click through folders/files to get details on their individual coverage.
|
124
151
|
|
125
152
|
## Improving Documentation
|
126
153
|
|
127
|
-
The code of the live Leaflet website that contains all documentation and examples is located in the `
|
128
|
-
and is automatically generated from a set of HTML and Markdown files by [Jekyll](
|
154
|
+
The code of the live Leaflet website that contains all documentation and examples is located in the `docs/` directory of the `master` branch
|
155
|
+
and is automatically generated from a set of HTML and Markdown files by [Jekyll](http://jekyllrb.com/).
|
129
156
|
|
130
157
|
The easiest way to make little improvements such as fixing typos without even leaving the browser
|
131
158
|
is by editing one of the files with the online GitHub editor:
|
132
|
-
browse the [
|
133
|
-
choose a certain file for editing (e.g. `
|
159
|
+
browse the [`docs/ directory`](https://github.com/Leaflet/Leaflet/tree/master/docs),
|
160
|
+
choose a certain file for editing (e.g. `plugins.md` for the list of Leaflet plugins),
|
134
161
|
click the Edit button, make changes and follow instructions from there.
|
135
162
|
Once it gets merged, the changes will immediately appear on the website.
|
136
163
|
|
@@ -138,18 +165,46 @@ If you need to make edits in a local repository to see how it looks in the proce
|
|
138
165
|
|
139
166
|
1. [Install Ruby](http://www.ruby-lang.org/en/) if don't have it yet.
|
140
167
|
2. Run `gem install jekyll`.
|
141
|
-
3.
|
142
|
-
4.
|
168
|
+
3. Enter the directory where you cloned the Leaflet repository
|
169
|
+
4. Make sure you are in the `master` branch by running `git checkout master`
|
170
|
+
5. Enter the documentation subdirectory by running `cd docs`
|
171
|
+
6. Run `jekyll serve --watch`.
|
172
|
+
7. Open `localhost:4000` in your web browser.
|
143
173
|
|
144
174
|
Now any file changes will be updated when you reload pages automatically.
|
145
|
-
After
|
175
|
+
After committing the changes, just send a pull request.
|
176
|
+
|
177
|
+
### API documentation
|
178
|
+
|
179
|
+
Since Leaflet 1.0.0-rc1, the API documentation in `reference-1.0.0.html` is handled
|
180
|
+
via [Leafdoc](https://github.com/Leaflet/Leafdoc). This means that next to the
|
181
|
+
code for every method, option or property there is a special code comment documenting
|
182
|
+
that feature. In order to edit the API documentation, just edit these comments in the
|
183
|
+
source code.
|
184
|
+
|
185
|
+
In order to generate the documentation, make sure that the development dependencies
|
186
|
+
are installed (run either `npm install` or `yarn install`), then just run
|
187
|
+
|
188
|
+
```
|
189
|
+
jake docs
|
190
|
+
```
|
191
|
+
|
192
|
+
and you'll find a `.html` file in the `dist/` directory.
|
193
|
+
|
194
|
+
On every release of a new Leaflet version, this file will be generated and copied
|
195
|
+
over to `docs/reference.html` - there is no need to send pull requests with changes to this file to update the API documentation.
|
196
|
+
|
197
|
+
## Code of Conduct
|
146
198
|
|
147
|
-
|
148
|
-
|
149
|
-
|
199
|
+
Everyone is invited to participate in the Leaflet community and related projects:
|
200
|
+
we want to create a welcoming and friendly environment.
|
201
|
+
Harassment of participants or other unethical and unprofessional behavior will not be tolerated in our spaces.
|
202
|
+
The [Contributor Covenant](http://contributor-covenant.org/version/1/3/0/)
|
203
|
+
applies to all projects under the Leaflet organization.
|
204
|
+
Report any issues to agafonkin@gmail.com.
|
150
205
|
|
151
206
|
## Thank You
|
152
207
|
|
153
|
-
Not only
|
208
|
+
Not only does your contribution to Leaflet and its community earn our gratitude, but it also makes you AWESOME.
|
154
209
|
Join [this approved list of awesome people](https://github.com/Leaflet/Leaflet/graphs/contributors)
|
155
210
|
and help us push the limits of what's possible with online maps!
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<!--
|
2
|
+
Thanks for taking the time to open an issue! Help us have good bug requests:
|
3
|
+
|
4
|
+
- [ ] I'm reporting a bug, not asking for help; support questions like "How can I do X with Leaflet?" will be closed (use [Stack Overflow](http://stackoverflow.com/) or [gis.stackexchange.com](http://gis.stackexchange.com/) for questions)
|
5
|
+
- [ ] I've looked at the [documentation](http://leafletjs.com/reference-1.0.3.html) to make sure the behaviour is documented and expected
|
6
|
+
- [ ] I'm sure this is a Leaflet code issue, not an issue with my own code nor with the framework I'm using (Cordova, Ionic, Angular, React…)
|
7
|
+
- [ ] I've searched through the issues to make sure it's not yet reported
|
8
|
+
-->
|
9
|
+
|
10
|
+
## How to reproduce
|
11
|
+
|
12
|
+
- Leaflet version I'm using:
|
13
|
+
- Browser (with version) I'm using:
|
14
|
+
- OS/Platform (with version) I'm using:
|
15
|
+
- step 1
|
16
|
+
- step 2
|
17
|
+
|
18
|
+
## What behaviour I'm expecting and which behaviour I'm seeing
|
19
|
+
|
20
|
+
## Minimal example reproducing the issue
|
21
|
+
|
22
|
+
- [ ] this example is as simple as possible
|
23
|
+
- [ ] this example does not rely on any third party code
|
24
|
+
|
25
|
+
Using http://playground-leaflet.rhcloud.com/ or any other jsfiddle-like site.
|
@@ -7,38 +7,97 @@ To use, install Node, then run the following commands in the project root:
|
|
7
7
|
npm install
|
8
8
|
|
9
9
|
To check the code for errors and build Leaflet from source, run "jake".
|
10
|
-
To run the tests, run "jake test".
|
10
|
+
To run the tests, run "jake test". To build the documentation, run "jake docs".
|
11
11
|
|
12
12
|
For a custom build, open build/build.html in the browser and follow the instructions.
|
13
13
|
*/
|
14
14
|
|
15
|
-
var
|
15
|
+
var buildDocs = require('./build/docs'),
|
16
|
+
git = require('git-rev-sync'),
|
17
|
+
path = require('path');
|
16
18
|
|
17
|
-
function hint(msg,
|
19
|
+
function hint(msg, args) {
|
18
20
|
return function () {
|
19
21
|
console.log(msg);
|
20
|
-
jake.exec('node node_modules/
|
22
|
+
jake.exec('node node_modules/eslint/bin/eslint.js ' + args,
|
21
23
|
{printStdout: true}, function () {
|
22
24
|
console.log('\tCheck passed.\n');
|
23
25
|
complete();
|
24
26
|
});
|
25
|
-
}
|
27
|
+
};
|
26
28
|
}
|
27
29
|
|
28
|
-
|
29
|
-
|
30
|
+
// Returns the version string in package.json, plus a semver build metadata if
|
31
|
+
// this is not an official release
|
32
|
+
function calculateVersion(officialRelease) {
|
30
33
|
|
31
|
-
|
32
|
-
task('lintspec', {async: true}, hint('Checking for specs JS errors...', 'spec/spec.hintrc.js spec/suites'));
|
34
|
+
var version = require('./package.json').version;
|
33
35
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
36
|
+
if (officialRelease) {
|
37
|
+
return version;
|
38
|
+
} else {
|
39
|
+
return version + '+' + git.short();
|
40
|
+
}
|
41
|
+
}
|
42
|
+
|
43
|
+
desc('Check Leaflet source for errors with ESLint');
|
44
|
+
task('lint', {async: true}, hint('Checking for JS errors...', 'src'));
|
45
|
+
|
46
|
+
desc('Check Leaflet specs source for errors with ESLint');
|
47
|
+
task('lintspec', {async: true}, hint('Checking for specs JS errors...', 'spec/suites'));
|
38
48
|
|
39
49
|
desc('Run PhantomJS tests');
|
40
50
|
task('test', ['lint', 'lintspec'], {async: true}, function () {
|
41
|
-
|
51
|
+
|
52
|
+
var karma = require('karma'),
|
53
|
+
testConfig = {configFile : path.join(__dirname, './spec/karma.conf.js')};
|
54
|
+
|
55
|
+
testConfig.browsers = ['PhantomJSCustom'];
|
56
|
+
|
57
|
+
function isArgv(optName) {
|
58
|
+
return process.argv.indexOf(optName) !== -1;
|
59
|
+
}
|
60
|
+
|
61
|
+
if (isArgv('--chrome')) {
|
62
|
+
testConfig.browsers.push('Chrome');
|
63
|
+
}
|
64
|
+
if (isArgv('--safari')) {
|
65
|
+
testConfig.browsers.push('Safari');
|
66
|
+
}
|
67
|
+
if (isArgv('--ff')) {
|
68
|
+
testConfig.browsers.push('Firefox');
|
69
|
+
}
|
70
|
+
if (isArgv('--ie')) {
|
71
|
+
testConfig.browsers.push('IE');
|
72
|
+
}
|
73
|
+
|
74
|
+
if (isArgv('--cov')) {
|
75
|
+
testConfig.preprocessors = {
|
76
|
+
'src/**/*.js': 'coverage'
|
77
|
+
};
|
78
|
+
testConfig.coverageReporter = {
|
79
|
+
type : 'html',
|
80
|
+
dir : 'coverage/'
|
81
|
+
};
|
82
|
+
testConfig.reporters = ['coverage'];
|
83
|
+
}
|
84
|
+
|
85
|
+
console.log('Running tests...');
|
86
|
+
|
87
|
+
var server = new karma.Server(testConfig, function(exitCode) {
|
88
|
+
if (!exitCode) {
|
89
|
+
console.log('\tTests ran successfully.\n');
|
90
|
+
complete();
|
91
|
+
} else {
|
92
|
+
process.exit(exitCode);
|
93
|
+
}
|
94
|
+
});
|
95
|
+
server.start();
|
96
|
+
});
|
97
|
+
|
98
|
+
desc('Build documentation');
|
99
|
+
task('docs', {}, function() {
|
100
|
+
buildDocs();
|
42
101
|
});
|
43
102
|
|
44
103
|
task('default', ['test', 'build']);
|
@@ -15,6 +15,9 @@ This guide lists a number of best practices for publishing a Leaflet plugin that
|
|
15
15
|
- [File Structure](#file-structure)
|
16
16
|
- [Code Conventions](#code-conventions)
|
17
17
|
- [Plugin API](#plugin-api)
|
18
|
+
3. [Publishing on NPM](#publishing-on-npm)
|
19
|
+
4. [Module Loaders](#module-loaders)
|
20
|
+
5. [Adding to the plugins list](#adding-to-the-plugins-list)
|
18
21
|
|
19
22
|
## Presentation
|
20
23
|
|
@@ -42,7 +45,7 @@ after pushing, it'll be published as `http://<user>.github.io/<repo>`.
|
|
42
45
|
|
43
46
|
### Readme
|
44
47
|
|
45
|
-
The next thing you need to have is a
|
48
|
+
The next thing you need to have is a [good `README.md`](https://github.com/noffle/art-of-readme) in the root of the repo (or a link to a website with a similar content).
|
46
49
|
At a minimum it should contain the following items:
|
47
50
|
|
48
51
|
- name of the plugin
|
@@ -105,13 +108,14 @@ and putting a space after the `function` keyword.
|
|
105
108
|
Never expose global variables in your plugin.<br>
|
106
109
|
If you have a new class, put it directly in the `L` namespace (`L.MyPlugin`).<br>
|
107
110
|
If you inherit one of the existing classes, make it a sub-property (`L.TileLayer.Banana`).<br>
|
111
|
+
Every class should have a factory function in camelCase, e.g. (`L.tileLayer.banana`).<br>
|
108
112
|
If you want to add new methods to existing Leaflet classes, you can do it like this: `L.Marker.include({myPlugin: …})`.
|
109
113
|
|
110
|
-
Function, method and
|
114
|
+
Function, method, property and factory names should be in `camelCase`.<br>
|
111
115
|
Class names should be in `CapitalizedCamelCase`.
|
112
116
|
|
113
117
|
If you have a lot of arguments in your function, consider accepting an options object instead
|
114
|
-
(putting default values where possible so that users don't need specify all of them):
|
118
|
+
(putting default values where possible so that users don't need to specify all of them):
|
115
119
|
|
116
120
|
```js
|
117
121
|
// bad
|
@@ -125,3 +129,93 @@ marker.myPlugin('bla', {
|
|
125
129
|
```
|
126
130
|
|
127
131
|
And most importantly, keep it simple. Leaflet is all about *simplicity*.
|
132
|
+
|
133
|
+
## Publishing on NPM
|
134
|
+
|
135
|
+
NPM (Node Packaged Modules) is a package manager and code repository for JavaScript. Publishing your module on NPM allows other developers to quickly find and install your plugin as well as any other plugins it depends on.
|
136
|
+
|
137
|
+
NPM has an excellent [developers guide](https://www.npmjs.org/doc/misc/npm-developers.html) to help you through the process.
|
138
|
+
|
139
|
+
When you publish your plugin you should add a dependency on `leaflet` to your `package.json` file. This will automatically install Leaflet when your package is installed.
|
140
|
+
|
141
|
+
Here is an example of a `package.json` file for a Leaflet plugin.
|
142
|
+
|
143
|
+
```json
|
144
|
+
{
|
145
|
+
"name": "my-leaflet-plugin",
|
146
|
+
"version": "1.0.0",
|
147
|
+
"description": "A simple leaflet plugin.",
|
148
|
+
"main": "my-plugin.js",
|
149
|
+
"author": "You",
|
150
|
+
"license": "IST",
|
151
|
+
"peerDependencies": {
|
152
|
+
"leaflet": "^1.0.0"
|
153
|
+
}
|
154
|
+
}
|
155
|
+
```
|
156
|
+
|
157
|
+
If possible, do not commit your minified files (e.g. `dist`) to a repo; this can
|
158
|
+
lead to confussion when trying to debug the wrong file. Instead, use `npm` to
|
159
|
+
trigger a build/minification just before publishing your package with a
|
160
|
+
[`prepublish` script](https://docs.npmjs.com/misc/scripts#common-uses), for example:
|
161
|
+
|
162
|
+
```json
|
163
|
+
{
|
164
|
+
"name": "my-leaflet-plugin",
|
165
|
+
...
|
166
|
+
"scripts": {
|
167
|
+
"prepublish": "grunt build"
|
168
|
+
}
|
169
|
+
}
|
170
|
+
```
|
171
|
+
|
172
|
+
You can then use the [`.gitignore`](https://help.github.com/articles/ignoring-files/)
|
173
|
+
file to make sure the minified files are not versioned, and an
|
174
|
+
[empty `.npmignore`](https://docs.npmjs.com/misc/developers#keeping-files-out-of-your-package)
|
175
|
+
to ensure that they are published to NPM.
|
176
|
+
|
177
|
+
## Module Loaders
|
178
|
+
|
179
|
+
Module loaders such as [RequireJS](http://requirejs.org/) and [Browserify](http://browserify.org/) implement module systems like AMD (Asynchronous Module Definition) and CommonJS to allow developers to modularize and load their code.
|
180
|
+
|
181
|
+
You can add support for AMD/CommonJS loaders to your Leaflet plugin by following this pattern based on the [Universal Module Definition](https://github.com/umdjs/umd/blob/master/templates/returnExportsGlobal.js)
|
182
|
+
|
183
|
+
```js
|
184
|
+
(function (factory, window) {
|
185
|
+
|
186
|
+
// define an AMD module that relies on 'leaflet'
|
187
|
+
if (typeof define === 'function' && define.amd) {
|
188
|
+
define(['leaflet'], factory);
|
189
|
+
|
190
|
+
// define a Common JS module that relies on 'leaflet'
|
191
|
+
} else if (typeof exports === 'object') {
|
192
|
+
module.exports = factory(require('leaflet'));
|
193
|
+
}
|
194
|
+
|
195
|
+
// attach your plugin to the global 'L' variable
|
196
|
+
if (typeof window !== 'undefined' && window.L) {
|
197
|
+
window.L.YourPlugin = factory(L);
|
198
|
+
}
|
199
|
+
}(function (L) {
|
200
|
+
var MyLeafletPlugin = {};
|
201
|
+
// implement your plugin
|
202
|
+
|
203
|
+
// return your plugin when you are done
|
204
|
+
return MyLeafletPlugin;
|
205
|
+
}, window));
|
206
|
+
```
|
207
|
+
|
208
|
+
Now your plugin is available as an AMD and CommonJS module and can be used in module loaders like Browserify and RequireJS.
|
209
|
+
|
210
|
+
|
211
|
+
## Adding to the plugins list
|
212
|
+
|
213
|
+
Once your plugin is published, it is a good idea to add it to the [Leaflet plugins list](http://leafletjs.com/plugins.html). To do so:
|
214
|
+
|
215
|
+
* [Fork](https://help.github.com/articles/fork-a-repo/) the Leaflet repo.
|
216
|
+
* In the `docs/plugins.md` file, find the section your plugin should go in, and add a table row with information and links about your plugin.
|
217
|
+
* Commit the code to your fork.
|
218
|
+
* [Open a pull request](https://help.github.com/articles/creating-a-pull-request/) from your fork to Leaflet's original repo.
|
219
|
+
|
220
|
+
Once the pull request is done, a Leaflet maintainer will have a quick look at your
|
221
|
+
plugin and, if everything looks right, your plugin will appear in the list shortly thereafter.
|