Skip to content

Commit

Permalink
feat: Build .d.ts from source (uber-web#259)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibgreen authored Nov 14, 2021
1 parent 6e6cccf commit 84e15ba
Show file tree
Hide file tree
Showing 29 changed files with 392 additions and 478 deletions.
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
**/dist*/**/*.js
**/dist*
8 changes: 8 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# CHANGELOG

## 3.6.0-alpha

- chore: Import '@math.gl/core' instead of 'math.gl' (#258)
- chore: Add ts build (#257)
- chore: Move polygon module to .ts (#256)
- Bump url-parse from 1.5.1 to 1.5.3 (#254)
- chore: Move .d.ts files to .ts (#255)

## 3.5.6

- Pin gl-matrix to ~3.3.0 (#253)
Expand Down
2 changes: 1 addition & 1 deletion modules/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"type": "git",
"url": "https://github.com/uber-web/math.gl.git"
},
"types": "src/index.d.ts",
"types": "src/index.ts",
"main": "dist/es5/index.js",
"module": "dist/esm/index.js",
"files": [
Expand Down
17 changes: 0 additions & 17 deletions modules/core/src/addons/polygon.d.ts

This file was deleted.

86 changes: 0 additions & 86 deletions modules/core/src/index.js

This file was deleted.

66 changes: 32 additions & 34 deletions modules/core/src/index.d.ts → modules/core/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// lib
export * from './lib/common';
// luma.gl, MIT license

// types
export type {TypedArray, NumericArray, NumberOrArray} from './lib/types';

// classes
export {default as Vector2} from './classes/vector2';
Expand All @@ -9,44 +11,40 @@ export {default as Matrix3} from './classes/matrix3';
export {default as Matrix4} from './classes/matrix4';
export {default as Quaternion} from './classes/quaternion';

// extras

// export {checkNumber} from './lib/validators';
export function assert(condition: boolean, message?: string): void;

// experimental
export {default as SphericalCoordinates} from './classes/spherical-coordinates';
export {default as Pose} from './classes/pose';
export {default as Euler} from './classes/euler';

export const _MathUtils: {
EPSILON1: number;
EPSILON2: number;
EPSILON3: number;
EPSILON4: number;
EPSILON5: number;
EPSILON6: number;
EPSILON7: number;
EPSILON8: number;
EPSILON9: number;
EPSILON10: number;
EPSILON11: number;
EPSILON12: number;
EPSILON13: number;
EPSILON14: number;
EPSILON15: number;
EPSILON16: number;
EPSILON17: number;
EPSILON18: number;
EPSILON19: number;
EPSILON20: number;

PI_OVER_TWO: number;
PI_OVER_FOUR: number;
PI_OVER_SIX: number;
export {default as _MathUtils} from './lib/math-utils';

TWO_PI: number;
};
// lib
export {default as assert} from './lib/assert';

export {
// math.gl global utility methods
config,
configure,
formatValue,
isArray,
clone,
equals,
exactEquals,
toRadians,
toDegrees,
// math.gl "GLSL"-style functions
radians,
degrees,
sin,
cos,
tan,
asin,
acos,
atan,
clamp,
lerp,
withEpsilon
} from './lib/common';

// DEPRECATED
export {default as _SphericalCoordinates} from './classes/spherical-coordinates';
Expand Down
80 changes: 0 additions & 80 deletions modules/core/src/lib/common.d.ts

This file was deleted.

Loading

0 comments on commit 84e15ba

Please sign in to comment.