-
Notifications
You must be signed in to change notification settings - Fork 448
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
Vars #1473
Vars #1473
Conversation
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.
This isn't implemented how I wanted it.
You_ can't compile vars before everything else. The var's map is a map just like any other D2 map and itself has to be compiled first. Vars should be resolved at the end and be defined on a per map basis, not a per board. Just like how variable scopes work.
If you define a variable in a for loop, it's only available in the for loop. You don't have to define it at the start of your function in order to make it available in your for loop.
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.
Add a test for
vars: {
my-var: ${my-var}
}
too
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.
left two comments
closes #105