-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #59 from kartena/wip/0.7
Updates for 0.7 release
- Loading branch information
Showing
23 changed files
with
283 additions
and
385 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,40 @@ | ||
{ | ||
/* | ||
* ENVIRONMENTS | ||
* ================= | ||
*/ | ||
|
||
// Define globals exposed by modern browsers. | ||
"browser": true, | ||
|
||
// Define globals exposed by jQuery. | ||
"jquery": true, | ||
|
||
"globals": {"L": false}, | ||
|
||
/* | ||
* ENFORCING OPTIONS | ||
* ================= | ||
*/ | ||
|
||
// Force all variable names to use either camelCase style or UPPER_CASE | ||
// with underscores. | ||
"camelcase": true, | ||
|
||
// Prohibit use of == and != in favor of === and !==. | ||
"eqeqeq": true, | ||
|
||
// Suppress warnings about == null comparisons. | ||
"eqnull": true, | ||
|
||
// Enforce tab width of 2 spaces. | ||
"indent": 2, | ||
|
||
"smarttabs": true, | ||
|
||
// Prohibit use of a variable before it is defined. | ||
"latedef": true, | ||
|
||
// Require capitalized names for constructor functions. | ||
"newcap": true, | ||
|
||
// Enforce use of single quotation marks for strings. | ||
"quotmark": "single", | ||
|
||
// Prohibit trailing whitespace. | ||
"trailing": true, | ||
|
||
// Prohibit use of explicitly undeclared variables. | ||
"undef": true, | ||
|
||
// Warn when variables are defined but never used. | ||
"unused": true | ||
// environment | ||
"browser": true, | ||
"node": true, | ||
"globals": { | ||
"L": true, | ||
"define": true | ||
}, | ||
"strict": false, | ||
"es3": true, | ||
|
||
// code style | ||
"bitwise": true, | ||
"camelcase": true, | ||
"curly": true, | ||
"eqeqeq": true, | ||
"forin": false, | ||
"immed": true, | ||
"latedef": true, | ||
"newcap": true, | ||
"noarg": true, | ||
"noempty": true, | ||
"nonew": true, | ||
"undef": true, | ||
"unused": true, | ||
"quotmark": "single", | ||
|
||
// whitespace | ||
"indent": 4, | ||
"trailing": true, | ||
"white": true, | ||
"smarttabs": true, | ||
"maxlen": 120 | ||
|
||
// code simplicity - not enforced but nice to check from time to time | ||
// "maxstatements": 20, | ||
// "maxcomplexity": 5 | ||
// "maxparams": 4, | ||
// "maxdepth": 4 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,61 @@ | ||
/*global module:false*/ | ||
module.exports = function(grunt) { | ||
module.exports = function (grunt) { | ||
|
||
// Project configuration. | ||
grunt.initConfig({ | ||
// Metadata. | ||
pkg: grunt.file.readJSON('package.json') | ||
}); | ||
// Project configuration. | ||
grunt.initConfig({ | ||
// Metadata. | ||
pkg: grunt.file.readJSON('package.json'), | ||
jshint: { | ||
files: [ | ||
'Gruntfile.js', | ||
'src/L.Control.Zoomslider.js', | ||
'spec/**/*.js' | ||
], | ||
options: { | ||
jshintrc: '.jshintrc', | ||
ignores: [ | ||
'spec/happen.js' | ||
] | ||
} | ||
}, | ||
karma: { | ||
options: { | ||
files: [ | ||
'node_modules/expect.js/expect.js', | ||
'spec/happen.js', | ||
'node_modules/leaflet/dist/leaflet-src.js', | ||
'src/L.Control.Zoomslider.js', | ||
'spec/before.js', | ||
'spec/suites/*.js' | ||
], | ||
singleRun: true, | ||
plugins: [ | ||
'karma-mocha', | ||
'karma-chrome-launcher', | ||
'karma-firefox-launcher', | ||
'karma-phantomjs-launcher' | ||
], | ||
frameworks: ['mocha'] | ||
|
||
// Test suite | ||
grunt.registerTask('test', function() { | ||
var karma = require('karma'), | ||
testConfig = { configFile: __dirname+'/spec/karma.conf.js' }; | ||
}, | ||
phantomjs: { | ||
browsers: ['PhantomJS'] | ||
}, | ||
firefox: { | ||
browsers: ['Firefox'] | ||
}, | ||
chrome : { | ||
browsers: ['Chrome'] | ||
}, | ||
all: { | ||
browsers: ['Chrome', 'Firefox', 'PhantomJS'] | ||
} | ||
} | ||
}); | ||
|
||
this.async(); | ||
testConfig.singleRun = true; | ||
testConfig.autoWatch = false; | ||
testConfig.browsers = ['PhantomJS']; | ||
if (isArgv('--chrome')) { | ||
testConfig.browsers.push('Chrome'); | ||
} | ||
if (isArgv('--ff')) { | ||
testConfig.browsers.push('Firefox'); | ||
} | ||
grunt.loadNpmTasks('grunt-contrib-jshint'); | ||
grunt.loadNpmTasks('grunt-karma'); | ||
|
||
karma.server.start(testConfig); | ||
|
||
function isArgv(optName) { | ||
return process.argv.indexOf(optName) !== -1; | ||
} | ||
}); | ||
|
||
// Default task. | ||
grunt.registerTask('default', ['test']); | ||
// Default task. | ||
grunt.registerTask('default', ['jshint', 'karma:phantomjs']); | ||
grunt.registerTask('test', ['jshint', 'karma:all']); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule Leaflet
deleted from
ae5bc1
Submodule leaflet-tilejson
deleted from
db5aac
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.