Skip to content

Custom directives: Question #2939

Closed
Closed
@tonykiselis

Description

@tonykiselis

I've read through the documentation but haven't managed to find anything useful. What I wish to accomplish is to add additional logic to the compiler before the components are compiled.

The use case I'm trying to achieve is to allow declarative specification of grid position from outside the component. The compiler should parse these instructions and when adjust the specific components styles based on "props" which are not dynamic. The specific idea is to allow easy use of grid row / column without having to create multiple components for each possible combination.

I've checked through the compilers API, but ... well, I couldn't deduct anything which may aid my use case. AST returns just source string I don't really understand.

Can someone point me to how I may start approaching this issue. Is it even possible given current compiler's API?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions