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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESM example #6735

Merged
merged 7 commits into from
Jun 21, 2024
Merged

ESM example #6735

merged 7 commits into from
Jun 21, 2024

Conversation

kpal81xd
Copy link
Contributor

  • Adds fileImport util method for importing files outside blob context
  • Adds Rotator script

Copy link
Contributor

@mvaligursky mvaligursky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool. I assume this Rotator script when dropped to the Editor will work without any changes needed?


class Rotator extends Script {
/**
* @attribute
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That will be a lot of linting fun when people start using @assetType instead of @type {Asset<SomeType>} too 😅

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well I think we decided on @resource over @assetType in the end

Copy link
Collaborator

@kungfooman kungfooman Jun 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea I know, we gotta whitelist those new tags now to prevent lint errors?

Like @attribute and @resourcetype or whatever the decisions are so far.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have Monaco support for this, we need to see how this works in vscode

@kpal81xd
Copy link
Contributor Author

Cool. I assume this Rotator script when dropped to the Editor will work without any changes needed?

Yes it should do.

@marklundin
Copy link
Member

the fileImport feels a little awkward. Is this just to resolve relative to the utils.mjs?

@kpal81xd
Copy link
Contributor Author

the fileImport feels a little awkward. Is this just to resolve relative to the utils.mjs?

Yea its to do with the path resolution for import inside blobs being different

@kpal81xd kpal81xd merged commit 57cbfd4 into main Jun 21, 2024
8 checks passed
@kpal81xd kpal81xd deleted the esm-example branch June 21, 2024 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants