From 72cb8f09e285c53a1e07f271e209bf4c907c77eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguye=CC=82=CC=83n?= Date: Mon, 24 Feb 2020 23:46:50 -0800 Subject: [PATCH] [core] Fixed codegen script Updated path to style spec reference following spinoff from gl-native repository. Centralized overrides for not-yet-implemented layout properties. Removed overrides that have already been removed for mbgl in gl-native. --- platform/darwin/scripts/generate-style-code.js | 5 ----- scripts/generate-style-code.js | 5 ----- scripts/style-spec.js | 5 ++++- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/platform/darwin/scripts/generate-style-code.js b/platform/darwin/scripts/generate-style-code.js index bd5adb968..9b164f2f4 100755 --- a/platform/darwin/scripts/generate-style-code.js +++ b/platform/darwin/scripts/generate-style-code.js @@ -15,11 +15,6 @@ const suffix = 'StyleLayer'; let spec = _.merge(require('../../../scripts/style-spec'), require('./style-spec-overrides-v8.json')); -// FIXME: https://github.com/mapbox/mapbox-gl-native/issues/15008 -delete spec.layout_circle["circle-sort-key"] -delete spec.layout_line["line-sort-key"] -delete spec.layout_fill["fill-sort-key"] - class ConventionOverride { constructor(val) { if (typeof val === 'string') { diff --git a/scripts/generate-style-code.js b/scripts/generate-style-code.js index 0aedba909..40818500f 100755 --- a/scripts/generate-style-code.js +++ b/scripts/generate-style-code.js @@ -6,11 +6,6 @@ const ejs = require('ejs'); const spec = require('./style-spec'); const colorParser = require('csscolorparser'); -// FIXME: https://github.com/mapbox/mapbox-gl-native/issues/15008 -delete spec.layout_circle["circle-sort-key"] -delete spec.layout_line["line-sort-key"] -delete spec.layout_fill["fill-sort-key"] - require('./style-code'); function parseCSSColor(str) { diff --git a/scripts/style-spec.js b/scripts/style-spec.js index 8a9c9d414..374c3bcb6 100644 --- a/scripts/style-spec.js +++ b/scripts/style-spec.js @@ -1 +1,4 @@ -var spec = module.exports = require('../mapbox-gl-js/src/style-spec/reference/v8'); +var spec = module.exports = require('../vendor/mapbox-gl-native/mapbox-gl-js/src/style-spec/reference/v8'); + +// FIXME: https://github.com/mapbox/mapbox-gl-native/issues/15008 +delete spec.layout_circle["circle-sort-key"];