Readme update

This commit is contained in:
mourner 2011-12-12 21:48:20 +02:00
parent f68a227680
commit 55f653333b
2 changed files with 26 additions and 2 deletions

View File

@ -2,9 +2,10 @@ var build = require('./build/build.js'),
lint = require('./build/hint.js');
var COPYRIGHT = "/*\n Copyright (c) 2010-2011, CloudMade, Vladimir Agafonkin\n" +
" Leaflet is a modern open source JavaScript library for interactive maps.\n" +
" Leaflet is a modern open-source JavaScript library for interactive maps.\n" +
" http://leaflet.cloudmade.com\n*/\n";
desc('Check Leaflet source for errors with JSHint');
task('lint', function () {
var files = build.getFiles();
@ -20,6 +21,7 @@ task('lint', function () {
}
});
desc('Combine and compress Leaflet source files');
task('build', ['lint'], function (compsBase32, buildName) {
var name = buildName || 'custom',
path = 'dist/leaflet' + (compsBase32 ? '-' + name : '');

View File

@ -7,4 +7,26 @@ It is built from the ground up to work efficiently and smoothly on both platform
Check out the website for more information: [leaflet.cloudmade.com](http://leaflet.cloudmade.com)
## Contributing to Leaflet
Let's make the best open-source library for maps that can possibly exist! Please send your pull requests to [Vladimir Agafonkin](http://github.com/mourner) (Leaflet maintainer) - we'll be happy to accept your contributions! [List of Leaflet contributors](http://github.com/CloudMade/Leaflet/contributors)
Let's make the best open-source library for maps that can possibly exist!
Contributing is simple: make the changes in your fork, make sure that Leaflet builds successfully (see below) and then create a pull request 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) are really appreciated too.
Here's [a list of the awesome people](http://github.com/CloudMade/Leaflet/contributors) that joined us already. Looking forward to _your_ contributions!
## Building Leaflet
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:
1. [Download and install Node](http://nodejs.org)
2. Run the following commands in the command line:
```
npm install -g jake
npm install -g jshint
npm install -g 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!