[build] Add temporary modifications to style spec + shaders

This ensures that the generated code matches what is checked in. Remove those temporary modifications once we add the features to master.
This commit is contained in:
Konstantin Käfer
2018-01-10 16:04:06 -08:00
parent 1a2c316f95
commit 9d1fa508a3
6 changed files with 16 additions and 4 deletions

View File

@@ -3592,6 +3592,7 @@ public class PropertyFactory {
return new LayoutPropertyValue<>("text-optional", value);
}
/**
* If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.
*

View File

@@ -2,7 +2,7 @@
const fs = require('fs');
const ejs = require('ejs');
const spec = require('../../../mapbox-gl-js/src/style-spec/reference/v8');
const spec = require('../../../scripts/style-spec');
const _ = require('lodash');
require('../../../scripts/style-code');

View File

@@ -11,7 +11,7 @@ const cocoaConventions = require('./style-spec-cocoa-conventions-v8.json');
const prefix = 'MGL';
const suffix = 'StyleLayer';
let spec = _.merge(require('../../../mapbox-gl-js/src/style-spec/reference/v8'), require('./style-spec-overrides-v8.json'));
let spec = _.merge(require('../../../scripts/style-spec'), require('./style-spec-overrides-v8.json'));
// Temporarily ignore layer types defined in the style specification but not yet supported in mbgl.
delete spec.layer.type.values.heatmap;

View File

@@ -3,9 +3,15 @@
require('flow-remove-types/register');
const path = require('path');
const shaders = require('../mapbox-gl-js/src/shaders');
const outputPath = 'src/mbgl/shaders';
var shaders = require('../mapbox-gl-js/src/shaders');
delete shaders.hillshade;
delete shaders.hillshadePrepare;
delete shaders.heatmap;
delete shaders.heatmapTexture;
require('./style-code');
writeIfModified(path.join(outputPath, 'preludes.hpp'), `// NOTE: DO NOT CHANGE THIS FILE. IT IS AUTOMATICALLY GENERATED.

View File

@@ -2,7 +2,7 @@
const fs = require('fs');
const ejs = require('ejs');
const spec = require('../mapbox-gl-js/src/style-spec/reference/v8');
const spec = require('./style-spec');
const colorParser = require('csscolorparser');
require('./style-code');

5
scripts/style-spec.js Normal file
View File

@@ -0,0 +1,5 @@
var spec = module.exports = require('../mapbox-gl-js/src/style-spec/reference/v8');
// Make temporary modifications here when Native doesn't have all features that JS has.
delete spec.layer.type.values.heatmap;