Apply automatic eslint fixes
This commit is contained in:
+7
-7
@@ -36,7 +36,7 @@ module.exports = function createServer (serverOptions) {
|
||||
|
||||
// TODO: remove it before releasing next major version
|
||||
if (!Array.isArray(serverOptions.routes.api)) {
|
||||
serverOptions.routes.api = [ serverOptions.routes.api ];
|
||||
serverOptions.routes.api = [serverOptions.routes.api];
|
||||
}
|
||||
|
||||
apiRouter.route(app, serverOptions.routes.api);
|
||||
@@ -49,23 +49,23 @@ module.exports = function createServer (serverOptions) {
|
||||
return app;
|
||||
};
|
||||
|
||||
function bootstrapFonts(opts) {
|
||||
function bootstrapFonts (opts) {
|
||||
// Set carto renderer configuration for MMLStore
|
||||
opts.grainstore.carto_env = opts.grainstore.carto_env || {};
|
||||
var cenv = opts.grainstore.carto_env;
|
||||
cenv.validation_data = cenv.validation_data || {};
|
||||
if ( ! cenv.validation_data.fonts ) {
|
||||
if (!cenv.validation_data.fonts) {
|
||||
mapnik.register_system_fonts();
|
||||
mapnik.register_default_fonts();
|
||||
cenv.validation_data.fonts = _.keys(mapnik.fontFiles());
|
||||
}
|
||||
}
|
||||
|
||||
function mapnikVersion(opts) {
|
||||
function mapnikVersion (opts) {
|
||||
return opts.grainstore.mapnik_version || mapnik.versions.mapnik;
|
||||
}
|
||||
|
||||
function getAndValidateVersions(options) {
|
||||
function getAndValidateVersions (options) {
|
||||
var warn = console.warn.bind(console); // jshint ignore:line
|
||||
|
||||
var packageDefinition = require('../package.json');
|
||||
@@ -83,10 +83,10 @@ function getAndValidateVersions(options) {
|
||||
|
||||
if (process.env.NODE_ENV !== 'test') {
|
||||
var dependenciesToValidate = ['camshaft', 'turbo-carto', 'windshaft'];
|
||||
dependenciesToValidate.forEach(function(depName) {
|
||||
dependenciesToValidate.forEach(function (depName) {
|
||||
var declaredDependencyVersion = declaredDependencies[depName];
|
||||
var installedDependencyVersion = installedDependenciesVersions[depName];
|
||||
if (!semver.satisfies(installedDependencyVersion,declaredDependencyVersion)) {
|
||||
if (!semver.satisfies(installedDependencyVersion, declaredDependencyVersion)) {
|
||||
warn(`Dependency="${depName}" installed version="${installedDependencyVersion}" does ` +
|
||||
`not match declared version="${declaredDependencyVersion}". Check your installation.`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user