Skip to content

Commit

Permalink
fix: fix imports & exports
Browse files Browse the repository at this point in the history
  • Loading branch information
hwbllmnn committed Jun 19, 2024
1 parent 66b233f commit f906dc1
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 20 deletions.
10 changes: 3 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,9 @@
"version": "5.0.0-next.1",
"description": "GeoStyler Style Parser implementation for OpenLayers styles",
"type": "module",
"exports": {
".": {
"types": "./dist/OlStyleParser.d.ts",
"import": "./dist/OlStyleParser.js",
"browser": "./dist/olStyleParser.iife.js"
}
},
"main": "dist/OlStyleParser.js",
"types": "dist/OlStyleParser.d.ts",
"browser": "dist/olStyleParser.iife.js",
"files": [
"dist",
"index.d.ts"
Expand Down
11 changes: 5 additions & 6 deletions src/OlStyleParser.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import OlStyle, {
} from 'ol/style/Style';
import OlStyleCircle from 'ol/style/Circle';
import OlStyleRegularshape from 'ol/style/RegularShape';
import OlStyleStroke from 'ol/style/Stroke';
import OlStyleIcon from 'ol/style/Icon';
import OlStyleText, { Options as TextOptions } from 'ol/style/Text';
import OlStyleFill, { Options as FillOptions } from 'ol/style/Fill';
Expand Down Expand Up @@ -54,7 +53,7 @@ import function_case from '../data/styles/function_case';
import text_placement_point from '../data/styles/text_placement_point';
import text_placement_line from '../data/styles/text_placement_line';
import text_placement_line_center from '../data/styles/text_palcement_line_center';
import filter_comparison_propertyFunction from "../data/styles/filter_comparison_propertyFunction";
import filter_comparison_propertyFunction from '../data/styles/filter_comparison_propertyFunction';

import ol_function_marksymbolizer from '../data/olStyles/function_markSymbolizer';
import ol_function_nested_fillsymbolizer from '../data/olStyles/function_nested_fillSymbolizer';
Expand Down Expand Up @@ -102,7 +101,7 @@ import {
IconSymbolizer,
MarkSymbolizer,
Sprite
} from 'geostyler-style';
} from 'geostyler-style/dist/style';

import OlStyleUtil from './Util/OlStyleUtil';
import exp from 'constants';
Expand Down Expand Up @@ -1174,7 +1173,7 @@ describe('OlStyleParser implements StyleParser', () => {
expect(styles).toHaveLength(1);

const style: OlStyle = styles[0];
const olPlacement = style.getText().getPlacement();
const olPlacement = style.getText()?.getPlacement();
expect(olPlacement).toEqual('point');
});

Expand All @@ -1188,7 +1187,7 @@ describe('OlStyleParser implements StyleParser', () => {
expect(styles).toHaveLength(1);

const style: OlStyle = styles[0];
const olPlacement = style.getText().getPlacement();
const olPlacement = style.getText()?.getPlacement();
expect(olPlacement).toEqual('line');
});

Expand All @@ -1202,7 +1201,7 @@ describe('OlStyleParser implements StyleParser', () => {
expect(styles).toHaveLength(1);

const style: OlStyle = styles[0];
const olPlacement = style.getText().getPlacement();
const olPlacement = style.getText()?.getPlacement();
expect(olPlacement).toEqual('line');
});

Expand Down
17 changes: 10 additions & 7 deletions src/OlStyleParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@ import {
FillSymbolizer,
Filter,
IconSymbolizer,
isGeoStylerBooleanFunction,
isGeoStylerFunction,
isGeoStylerStringFunction,
isIconSymbolizer,
isMarkSymbolizer,
isSprite,
JoinType,
LineSymbolizer,
MarkSymbolizer,
Expand All @@ -25,7 +19,16 @@ import {
TextSymbolizer,
UnsupportedProperties,
WriteStyleResult
} from 'geostyler-style';
} from 'geostyler-style/dist/style';

import {
isGeoStylerBooleanFunction,
isGeoStylerFunction,
isGeoStylerStringFunction,
isIconSymbolizer,
isMarkSymbolizer,
isSprite
} from 'geostyler-style/dist/typeguards';

import OlImageState from 'ol/ImageState';

Expand Down

0 comments on commit f906dc1

Please sign in to comment.