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

Better way to define custom builtin cells (stdlib) #16

Open
asg017 opened this issue May 2, 2021 · 0 comments
Open

Better way to define custom builtin cells (stdlib) #16

asg017 opened this issue May 2, 2021 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@asg017
Copy link
Owner

asg017 commented May 2, 2021

window.DATAFLOW_STDLIB works well with run/compile, but it's awkward, constant/dependency is confusing, and you can only be dependent on 1 stdlib cell. This should be done in a newer way.

Maybe:

export function d3() {
  return {
    depend: ["require"],
    define: require => require("d3@6")
  }
}
  • I like using ES modules instead of window stuff here
  • depend is awkward
  • define is probably as best as we will get
@asg017 asg017 added this to the v1 milestone May 2, 2021
@asg017 asg017 added the enhancement New feature or request label May 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant