Skip to content

feat: export tailwindconfig tokens#720

Merged
ruchamahabal merged 1 commit into
frappe:mainfrom
ruchamahabal:export-tokens
May 22, 2026
Merged

feat: export tailwindconfig tokens#720
ruchamahabal merged 1 commit into
frappe:mainfrom
ruchamahabal:export-tokens

Conversation

@ruchamahabal

@ruchamahabal ruchamahabal commented May 21, 2026

Copy link
Copy Markdown
Member

Move inline tokens to tailwind/tokens.js and export them from package.json to allow other projects to import and use them. Need this for Studio ref

I was using resolveConfig to do this earlier, but now it breaks because the preset in tailwindconfig imports lucideIconsPlugin.js, which uses createRequire - a Node-only API that doesn't work in the browser. Also, it was not ideal to do so. Tailwind suggests writing tokens in a js file and using/exposing them for external use.

If there is a better way to do this, please let me know

Coverage

Metric Coverage Δ vs main
Lines 48.92% (5047/10315) ±0.00%
Statements 46.18% (5160/11173) ±0.00%
Functions 47.13% (1470/3119) ±0.00%
Branches 40.14% (2359/5876) ±0.00%

Baseline pulled from the latest successful main run.

@netchampfaris

Copy link
Copy Markdown
Contributor

@ruchamahabal It's fine for now. Will have to find a better way when we migrate to Tailwind 4.

@ruchamahabal

Copy link
Copy Markdown
Member Author

/barista review

@barista-for-frappe

Copy link
Copy Markdown

--help

@ruchamahabal ruchamahabal merged commit acc26df into frappe:main May 22, 2026
8 checks passed
netchampfaris added a commit that referenced this pull request May 27, 2026
…values

PR #720 on main extracted borderRadius/boxShadow/fontSize into tokens.js
as a public sub-path export. Our branch already replaced those values
with Figma-generated tokens in plugin.js. After the rebase, tokens.js
still exported the legacy hardcoded values, drifting from what the
plugin actually emits. Source from ./generated/* so external consumers
match the plugin output.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@netchampfaris

Copy link
Copy Markdown
Contributor

/barista review any breaking changes?

netchampfaris added a commit that referenced this pull request Jun 8, 2026
…values

PR #720 on main extracted borderRadius/boxShadow/fontSize into tokens.js
as a public sub-path export. Our branch already replaced those values
with Figma-generated tokens in plugin.js. After the rebase, tokens.js
still exported the legacy hardcoded values, drifting from what the
plugin actually emits. Source from ./generated/* so external consumers
match the plugin output.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
netchampfaris added a commit that referenced this pull request Jun 8, 2026
…values

PR #720 on main extracted borderRadius/boxShadow/fontSize into tokens.js
as a public sub-path export. Our branch already replaced those values
with Figma-generated tokens in plugin.js. After the rebase, tokens.js
still exported the legacy hardcoded values, drifting from what the
plugin actually emits. Source from ./generated/* so external consumers
match the plugin output.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants