-
Notifications
You must be signed in to change notification settings - Fork 41
NPM package preparation #58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…nfiguration for TypeScript support
… across multiple modules
… in DOMContentLoaded event
…in input and viewer modules
…ons across multiple modules
…n across multiple modules
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Converts the codebase from JavaScript to TypeScript and prepares it as an NPM package, introducing proper type annotations and module exports.
- Converts all JS files to TypeScript with proper type annotations
- Restructures the build to output both a standalone viewer to
public/and NPM package assets todist/ - Adds a new module entry point that exports HTML, CSS, and JS as strings
Reviewed Changes
Copilot reviewed 16 out of 21 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/viewer.ts | Converted from JS to TS with comprehensive type annotations for all class properties and method parameters |
| src/pointer-device.js | Removed JavaScript file (likely converted to TypeScript elsewhere) |
| src/picker.ts | Added TypeScript types for class properties and method parameters |
| src/observe.ts | Added TypeScript types and symbol property validation logic |
| src/input.ts | Converted from JS to TS with detailed type annotations for all class members |
| src/index.ts | Added comprehensive TypeScript imports and type annotations throughout |
| src/data-migrations.ts | Added TypeScript type annotations for migration functions |
| src/core/spline.ts | Converted from JS to TS with proper type annotations for all methods and properties |
| src/core/math.ts | Created new TypeScript version with proper type annotations |
| src/core/math.js | Removed JavaScript version |
| src/controllers/anim-controller.ts | Added comprehensive TypeScript types including AnimTrack type definition |
| rollup.config.mjs | Updated build configuration to support TypeScript and dual output directories |
| package.json | Updated package configuration for NPM publishing with proper exports |
| module/index.ts | New module entry point that exports HTML, CSS, and JS assets as strings |
| jsconfig.json | Removed JavaScript configuration file |
| eslint.config.mjs | Updated ESLint configuration to support TypeScript |
Comments suppressed due to low confidence (1)
src/observe.ts:19
- The error message 'err' is not descriptive. It should clearly indicate that setting new properties is not allowed, such as 'Cannot set new properties on observed object'.
if (!members.has(property)) {
console.log('err');
return false;
}
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
… in observe function
Breaking changes
publicdirectoryNon-breaking changes