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

Create ESM javascript build + docs #1445

Closed
amritk opened this issue Apr 16, 2024 · 4 comments
Closed

Create ESM javascript build + docs #1445

amritk opened this issue Apr 16, 2024 · 4 comments
Assignees
Labels

Comments

@amritk
Copy link
Member

amritk commented Apr 16, 2024

A requested feature is to have a JS ESM version of references. This should be easy to do by creating a little wrapper around vue with an init function.

@amritk amritk added the bug Something isn't working label Apr 16, 2024
@amritk amritk self-assigned this Apr 16, 2024
@Ansett
Copy link

Ansett commented May 15, 2024

Hello. Any rough ETA on this?
We're planning to use Scalar, but we're still on Vue 2.7.

@amritk
Copy link
Member Author

amritk commented May 16, 2024

unfortunately not at the moment, as things are pretty crazy! But we hope to start setting up our roadmap later this year so you will be able to track the tickets!

@amritk amritk added feature and removed bug Something isn't working labels May 16, 2024
@linear linear bot closed this as completed May 24, 2024
@geoffgscott
Copy link
Contributor

@Ansett We were able to get something completed this week. You can take a look at #1855 for an example integration but in Vue 2 you would likely just do something along the lines of:

data: {
  scalarInstance: null,
  configuration: {
    // ... Some config here. When this changes the watcher will trigger and update the configuration
  },
},
mounted() {
  this.scalarInstance = createScalarReferences(
    this.$refs.element,
    this.configuration ?? {}
  );
},
beforeDestroy() {
  this.scalarInstance?.unmount();
},
watch: {
  configuration: function (val) {
    this.scalarInstance?.updateConfig(val, false);
  },
}

Excuse any syntax errors my Vue2 is very rusty.

@Ansett
Copy link

Ansett commented May 25, 2024

Wonderful! We're going to try this. Thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants