Improved #export/#import Behavior
Pre-release
Pre-release
This update provides significantly improved resolution of #export/#import.
API Changes
The unbodied usage of #export("exportkey", value) now supports any acceptable single parameter as the exported value. Example uses:
// Exports context variable
#export("isAdmin", admin)
// Exports an expression
#export("specialKey", username == "tdotclare")
// Exports a custom tag call
#export("baseURL", baseURL()) #import can now be used inside parameters, allowing behavior like:
#if(import("showSidebar")): <div id="sidebar"><div> #endifObservable Behavior Changes/Fixes
- Fixes Issue #57 -
#importsyntaxes are now correctly replaced when nested inside other objects like loops
Internal Changes
Syntax.Conditionalis now a chained-block struct instead of linked classes- Adds
BodiedSyntaxprotocol to applicableSyntaxes, replacing monolithic extensions- Publish & maintain external or import dependency sets for adherants
- Provide
inlineRefsmethods to adherents to self-rebuild
- Smarter
LeafASTresolution - Provides applicable
importcapabilities to ParameterDescription and Parameter