improve readme

This commit is contained in:
Vladimir Agafonkin 2012-10-31 16:33:58 +02:00
parent 82ca621091
commit 72915f83ca

View File

@ -1,34 +1,20 @@
<img src="http://leafletjs.com/docs/images/logo.png" alt="Leaflet" /> <img src="http://leafletjs.com/docs/images/logo.png" alt="Leaflet" />
Leaflet is a modern, lightweight open-source JavaScript library for mobile-friendly interactive maps, developed by [Vladimir Agafonkin](http://agafonkin.com/en) of [CloudMade](http://cloudmade.com) with a team of dedicated [contributors](https://github.com/CloudMade/Leaflet/graphs/contributors). Weighting just about 25kb of gzipped JS code, it still has all the [features](http://leaflet.cloudmade.com/features.html) most developers ever need for online maps, while providing a fast, pleasant user experience. **Leaflet** is a modern open-source JavaScript library for **mobile-friendly interactive maps**. It is developed by [Vladimir Agafonkin][] of [CloudMade][] with a team of dedicated [contributors][]. Weighing just about <abbr title="That's 102 KB minified and 176 KB in the source form, with 8 KB of CSS (1.8 KB gzipped) and 10 KB of images">27 KB of gzipped JS code</abbr>, it has all the [features][] most devepers ever need for online maps.
It is built from the ground up to work efficiently and smoothly on both desktop and mobile platforms like iOS and Android, taking advantage of HTML5 and CSS3 on modern browsers. The focus is on usability, performance, small size, [A-grade](http://developer.yahoo.com/yui/articles/gbs/) browser support, flexibility and [easy to use API](http://leaflet.cloudmade.com/reference.html) with convention over configuration. The OOP-based code of the library is designed to be modular, extensible and very easy to understand. Leaflet is designed with *simplicity*, *performance* and *usability* in mind. It works efficiently across all major desktop and mobile platforms out of the box, taking advantage of HTML5 and CSS3 on modern browsers while being accessible on older ones too. It can also be extended with many [plugins][], has a beautiful, easy to use and [well-documented][] API and a simple, readable [source code][] that is a joy to [contribute][] to.
Check out the website for more information: [leafletjs.com](http://leafletjs.com) For more information, check out the [official website][].
## Contributing to Leaflet We're happy to meet new contributors. If you want to **get involved with Leaflet development**, check out the [contribution guide][contribute]. Let's make the best open-source library for maps that can possibly exist!
Let's make the best open-source library for maps that can possibly exist!
Contributing is simple: make the changes in your fork (preferably in a separate branch), make sure that Leaflet builds successfully (see below) and then create a pull request (without the built files, just the source changes) to [Vladimir Agafonkin](http://github.com/mourner) (Leaflet maintainer). Updates to Leaflet [documentation](http://leaflet.cloudmade.com/reference.html) and [examples](http://leaflet.cloudmade.com/examples.html) (located in the `gh-pages` branch for current stable release and `gh-pages-master` for the in-progress version) are really appreciated too. [Vladimir Agafonkin]: http://agafonkin.com/en
[CloudMade]: http://cloudmade.com
Note that bugfixes and small improvements are higher priority than new features or substantial API changes, and will be reviewed and merged much faster than pulls with lots of new code. If your new feature is not expected to be widely used, consider making a plugin instead. Lets keep Leaflet slim, fast and simple! [contributors]: https://github.com/CloudMade/Leaflet/graphs/contributors
[features]: http://leafletjs.com/features.html
Here's [a list of the awesome people](http://github.com/CloudMade/Leaflet/contributors) that joined us already. Looking forward to _your_ contributions! [plugins]: plugins.html
[well-documented]: reference.html "Leaflet API reference"
## Building Leaflet [source code]: https://github.com/CloudMade/Leaflet "Leaflet GitHub repository"
Leaflet build system is powered by the Node.js platform and Jake, JSHint and UglifyJS libraries, which install easily and work well across all major platforms. Here are the steps to install it: [hosted on GitHub]: http://github.com/CloudMade/Leaflet
[contribute]: https://github.com/CloudMade/Leaflet/blob/master/CONTRIBUTING.md "A guide to contributing to Leaflet"
1. [Download and install Node](http://nodejs.org) [official website]: http://leafletjs.com
2. Run the following commands in the command line:
```
npm install -g jake
npm install jshint
npm install uglify-js
```
Now that you have everything installed, run `jake` inside the Leaflet directory. This will check Leaflet source files for JavaScript errors and inconsistencies, and then combine and compress it to the `dist` folder.
To make a custom build of the library with only the things you need, use the build helper (`build/build.html`) to choose the components (it figures out dependencies for you) and then run the command generated with it.
If you add any new files to the Leaflet source, make sure to also add them to `build/deps.js` so that the build system knows about them. Happy coding!