Leaflet/Jakefile.js
Iván Sánchez Ortega 560e73bac5 Trying out Leafdoc comments in L.Marker
Added Leafdoc comments to Layer.js

Leafdoc comments for Popup, Layer

Leafdoc comments: L.Evented, inheritances, minor tilelayer

Leafdoc comments: gridlayer & tilelayer options

Leafdoc comments: tilelayer, marker drag

Typos

Leafdoc: switch to shorthand method params

Leafdoc: Switch to shorthands in marker drag, WMS.

Leafdoc: Vector layers

Leafdoc: Layer group, feature group, geojson

Leafdoc: LatLng, Point, Bounds, Icons.

Leafdoc: Controls.

Leafdoc: DOM & utils.

Leafdoc: "jake docs" now builds the documentation

Leafdoc: Commit actual templates instead of symlinks

Leafdoc: Fix broken build, have jake print out uglifyjs errors

Leafdoc: Several L.Map bits.

Leafdoc: Map handlers

Leafdoc: Map events, L.CRS, misc. fixes

Leafdoc: Fixed ordering of classes by using new leafdoc features

Leafdoc: Misc bits at the bottom of the docs

🍂doc: Map panes

🍂doc: CRSs, projections and their templates

🍂doc: miniclasses for map methods' options

Leafdoc: Cleanup L.Class, mark uninheritable sections, use Leafdoc 0.3.0

🍂doc: miniclasses for event types, bump to Leafdoc 1.0.0

🍂doc: Make linter happy after branch rebase

🍂doc: Tweaked headers for inherited stuff.

🍂doc: Tweaking section headers (white, padding, triangles)

Leafdoc: upgrade to 1.2, document SVG&Canvas, and misc bits

🍂doc: minor CSS tweaks, version in filename, typo.

Add missing bits - supersedes #4105, #4065, #4031

🍂doc: moved sections around, minor typos & fixes

Typo about LocationEvent
2016-04-02 15:59:39 +02:00

65 lines
1.8 KiB
JavaScript

/*
Leaflet building, testing and linting scripts.
To use, install Node, then run the following commands in the project root:
npm install -g jake
npm install
To check the code for errors and build Leaflet from source, run "jake".
To run the tests, run "jake test". To build the documentation, run "jake docs".
For a custom build, open build/build.html in the browser and follow the instructions.
*/
var build = require('./build/build.js'),
buildDocs = require('./build/docs'),
version = require('./src/Leaflet.js').version;
function hint(msg, args) {
return function () {
console.log(msg);
jake.exec('node node_modules/eslint/bin/eslint.js ' + args,
{printStdout: true}, function () {
console.log('\tCheck passed.\n');
complete();
});
};
}
desc('Check Leaflet source for errors with ESLint');
task('lint', {async: true}, hint('Checking for JS errors...', 'src --config .eslintrc'));
desc('Check Leaflet specs source for errors with ESLint');
task('lintspec', {async: true}, hint('Checking for specs JS errors...', 'spec/suites --config spec/.eslintrc'));
desc('Combine and compress Leaflet source files');
task('build', {async: true}, function (compsBase32, buildName) {
var v;
jake.exec('git log -1 --pretty=format:"%h"', {breakOnError: false}, function () {
build.build(complete, v, compsBase32, buildName);
}).on('stdout', function (data) {
v = version + ' (' + data.toString() + ')';
}).on('error', function () {
v = version;
});
});
desc('Run PhantomJS tests');
task('test', ['lint', 'lintspec'], {async: true}, function () {
build.test(complete);
});
desc('Build documentation');
task('docs', {}, function() {
buildDocs();
});
task('default', ['test', 'build']);
jake.addListener('complete', function () {
process.exit();
});