[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

@@ -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;