Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

class registry for service scripts #442

Merged
merged 3 commits into from
May 29, 2024
Merged

class registry for service scripts #442

merged 3 commits into from
May 29, 2024

Conversation

KernelDeimos
Copy link
Contributor

No description provided.

In the first pass I add a `register` method and update `defineComponent`
so it calls `register` as well. This made it possible to create a
proof-of-concept for registered classes. Additionally ExportService was
added to expose registered classes to service scripts. This first pass
works, but it would be better if all types of classes (components or
otherwise) were registered via the same method.
@KernelDeimos KernelDeimos changed the title Eric/extensibility class registry for service scripts May 28, 2024
@KernelDeimos
Copy link
Contributor Author

linter errors here are because of something I would like to allow, so ideally we should update linter configuration to allow this.

@KernelDeimos KernelDeimos force-pushed the eric/extensibility branch 2 times, most recently from 96820c6 to f72aab4 Compare May 28, 2024 22:57
@KernelDeimos KernelDeimos marked this pull request as ready for review May 28, 2024 22:59
ExportService gets removed and instead a global class registry is added.
The `init.js` file is split into `init_sync.js` and `init_async.js`
so that synchronous code that isn't dependent on imports is guarenteed
to run before initgui.js. The globalThis scope and service-script API
now expose `def`, a function for registering class definitions, and
`use`, a function for obtaining registered classes.
@KernelDeimos KernelDeimos merged commit 0672562 into main May 29, 2024
6 checks passed
@KernelDeimos KernelDeimos deleted the eric/extensibility branch May 30, 2024 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant