Skip to content

Commit

Permalink
Merge branch 'thomas-maps-isolate_mapbox' of https://github.com/misti…
Browse files Browse the repository at this point in the history
…c/kibana into maps/isolate_mapbox
  • Loading branch information
thomasneirynck committed May 24, 2021
2 parents 57c622d + 407ea23 commit ac24298
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 13 deletions.
12 changes: 4 additions & 8 deletions packages/kbn-mapbox-gl/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,13 @@ NPM_MODULE_EXTRA_FILES = [
]

SRC_DEPS = [
"//packages/kbn-dev-utils",
"@npm//jest-styled-components",
"@npm//node-forge",
"@npm//@mapbox/mapbox-gl-rtl-text",
"@npm//file-loader",
"@npm//mapbox-gl",
]

TYPES_DEPS = [
"@npm//@types/flot",
"@npm//@types/jest",
"@npm//@types/node",
"@npm//@types/node-forge",
"@npm//@types/testing-library__jest-dom",
"@npm//@types/mapbox-gl",
]

DEPS = SRC_DEPS + TYPES_DEPS
Expand Down
4 changes: 2 additions & 2 deletions packages/kbn-mapbox-gl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"version": "1.0.0",
"private": true,
"license": "SSPL-1.0 OR Elastic License 2.0",
"main": "./target/index",
"typings": "./target/index.d.ts"
"main": "./target/index.js",
"types": "./target/index.d.ts"
}
2 changes: 1 addition & 1 deletion packages/kbn-mapbox-gl/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

// @ts-expect-error
import './typings';
import mapboxgl from 'mapbox-gl/dist/mapbox-gl-csp';
// @ts-expect-error
import mbRtlPlugin from '!!file-loader!@mapbox/mapbox-gl-rtl-text/mapbox-gl-rtl-text.min.js';
Expand Down
10 changes: 10 additions & 0 deletions packages/kbn-mapbox-gl/src/typings.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

// Mapbox-gl doesn't declare this type.
declare module 'mapbox-gl/dist/mapbox-gl-csp';
7 changes: 5 additions & 2 deletions packages/kbn-mapbox-gl/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
"declarationMap": true,
"rootDir": "src",
"sourceMap": true,
"sourceRoot": "../../../../packages/kbn-mapbox-gl/src"
"sourceRoot": "../../../../packages/kbn-mapbox-gl/src",
"types": []
},
"include": ["src/**/*"]
"include": [
"src/**/*",
]
}

0 comments on commit ac24298

Please sign in to comment.