Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Pessimistress committed Sep 11, 2023
1 parent f903e44 commit 182390f
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 31 deletions.
File renamed without changes.
8 changes: 3 additions & 5 deletions .ocularrc.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
const {resolve} = require('path');
import {resolve} from 'path';

const config = {
export default {
lint: {
paths: ['src', 'test', 'examples']
},

typescript: {
project: 'tsconfig.json'
project: 'tsconfig.build.json'
},

aliases: {
Expand All @@ -24,5 +24,3 @@ const config = {
size: ['test/size/all.js', 'test/size/map.js']
}
};

module.exports = config;
File renamed without changes.
6 changes: 3 additions & 3 deletions maplibre/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"internal": true,
"main": "../dist/es5/exports-maplibre.js",
"module": "../dist/esm/exports-maplibre.js",
"types": "../dist/esm/exports-maplibre.d.ts"
"main": "../dist/exports-maplibre.cjs",
"module": "../dist/exports-maplibre.js",
"types": "../dist/exports-maplibre.d.ts"
}
21 changes: 17 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,22 @@
"url": "https://github.com/visgl/react-map-gl.git"
},
"license": "MIT",
"types": "dist/esm/index.d.ts",
"main": "dist/es5/index.js",
"module": "dist/esm/index.js",
"type": "module",
"types": "dist/index.d.ts",
"main": "dist/index.cjs",
"module": "dist/index.js",
"exports": {
".": {
"import": "./dist/index.js",
"require": "./dist/index.cjs",
"types": "./dist/index.d.ts"
},
"./maplibre": {
"import": "./dist/exports-maplibre.js",
"require": "./dist/exports-maplibre.cjs",
"types": "./dist/exports-maplibre.d.ts"
}
},
"files": [
"src",
"dist",
Expand All @@ -26,7 +39,7 @@
"scripts": {
"typecheck": "tsc -p tsconfig.esm.json --noEmit",
"bootstrap": "PUPPETEER_SKIP_DOWNLOAD=true yarn && ocular-bootstrap",
"build": "ocular-clean && tsc -b tsconfig.esm.json && tsc -b tsconfig.es5.json",
"build": "ocular-clean && ocular-build",
"lint": "ocular-lint",
"cover": "ocular-test cover",
"publish-prod": "ocular-publish prod",
Expand Down
4 changes: 2 additions & 2 deletions src/types/style-spec-maplibre.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import type {
RasterDEMSourceSpecification as RasterDemSource
} from '@maplibre/maplibre-gl-style-spec';

import {CanvasSourceSpecification as CanvasSourceRaw} from 'maplibre-gl';
import type {CanvasSourceSpecification as CanvasSourceRaw} from 'maplibre-gl';

// Layers
export type {
Expand All @@ -47,7 +47,7 @@ export type AnyLayer =
| SymbolLayer;

// Sources
export {
export type {
GeoJSONSourceRaw,
VideoSourceRaw,
ImageSourceRaw,
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.esm.json → tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"module": "ES2020",
"declaration": true,
"sourceMap": true,
"outDir": "./dist/esm"
"outDir": "./dist"
},
"include":[
"src/**/*"
Expand Down
16 changes: 0 additions & 16 deletions tsconfig.es5.json

This file was deleted.

0 comments on commit 182390f

Please sign in to comment.