linkedin / linkedin/css-blocks

@export doesn't work as expected based on @block syntax.

Open
#467 0 comments 0 reactions 1 assignee Claimed by @ramitha View on GitHub
Dominant language
TypeScript
Stars
6.3k
Forks
154
PR merge metrics
No merged PRs in 30d

Description

1. `@export foo from "./foo.block.css"` should export the `default` block of `foo.block.css` as `foo`.
2. `@export (bar) from "./foo.block.css"` should export the `bar` block of `foo.block.css` as `bar`.
3. `@export (bar as xyz) from "./foo.block.css"` should export the`bar` block of `foo.block.css` as `xyz`.
4. `@export abc` should export the local block reference to `abc` as `abc`.
5. `@export (abc as zyx)` should export the local block reference to `abc` as `zyx`.

When there's parens, we should accept any number of comma delimited export expressions where any export expression can be an identifier or two identifiers joined by `as`.

When there's not parens, we should only accept a single block name.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.