Sha256: ec901b7cf4ad473e4fe0d64d80015aad6c502848b33381a452b1e1172bc04069

Contents?: true

Size: 1.23 KB

Versions: 5

Compression:

Stored size: 1.23 KB

Contents

/*
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".

For a custom build, open build/build.html in the browser and follow the instructions.
*/

var build = require('./build/build.js');

function hint(msg, paths) {
	return function () {
		console.log(msg);
		jake.exec('node node_modules/jshint/bin/jshint -c ' + paths,
				{printStdout: true}, function () {
			console.log('\tCheck passed.\n');
			complete();
		});
	}
}

desc('Check Leaflet source for errors with JSHint');
task('lint', {async: true}, hint('Checking for JS errors...', 'build/hintrc.js src'));

desc('Check Leaflet specs source for errors with JSHint');
task('lintspec', {async: true}, hint('Checking for specs JS errors...', 'spec/spec.hintrc.js spec/suites'));

desc('Combine and compress Leaflet source files');
task('build', build.build);

desc('Run PhantomJS tests');
task('test', ['lint', 'lintspec'], {async: true}, function () {
	build.test(complete);
});

task('default', ['test', 'build']);

jake.addListener('complete', function () {
  process.exit();
});

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
leaflet-js-0.7.0.4 lib/leaflet/Jakefile.js
leaflet-js-0.7.0.3 lib/leaflet/Jakefile.js
leaflet-js-0.7.0.2 lib/leaflet/Jakefile.js
leaflet-js-0.7.0.1 lib/leaflet/Jakefile.js
leaflet-js-0.7.0 lib/leaflet/Jakefile.js