Skip to content
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

feat: check tailwind #772

Merged
merged 4 commits into from
Aug 22, 2024
Merged

feat: check tailwind #772

merged 4 commits into from
Aug 22, 2024

Conversation

devartes
Copy link
Contributor

@devartes devartes commented Aug 15, 2024

What does this do?

The script helps people find dynamic classes in the code more quickly. It will generate a table with the classes and you can click on the file name to go directly to the Tailwind class.
Captura de Tela 2024-08-15 às 08 46 28
To test this script, just put this version in the deco of deno.json, for example:
"deco/": "https://cdn.jsdelivr.net/gh/deco-cx/deco@dbd9bb1a68b4830f267f8f66736ceaebd5e5ba7b/", and also in deno.json where it says "tasks", put something like:
"tailwind-checker": "deno eval 'import \"deco/scripts/tailwind_checker.ts\"'" , the name "tailwind-checker" is not mandatory, you can choose another name and run it as deno task nameyouchose : "nameyouchose": "deno eval 'import \"deco/scripts/tailwind_checker.ts\"'"

about this part of the code:

const green = "\x1b[32m";
const reset = "\x1b[0m";

ANSI colors:

you can see more about this in these links below:

https://talyian.github.io/ansicolors/
https://github.com/shiena/ansicolor/blob/master/README.md

Copy link
Contributor

@mcandeia mcandeia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to include your script here:

https://github.com/deco-cx/deco/blob/main/scripts/deno.json#L7

And when published you can run as deno run -A jsr:@deco/scripts/tailwind-checker

scripts/tailwind_checker.ts Outdated Show resolved Hide resolved
scripts/tailwind_checker.ts Outdated Show resolved Hide resolved
scripts/tailwind_checker.ts Outdated Show resolved Hide resolved
scripts/tailwind_checker.ts Outdated Show resolved Hide resolved
scripts/tailwind_checker.ts Outdated Show resolved Hide resolved
@mcandeia
Copy link
Contributor

also, I think you need to change the case to kebab_case to camelCase

@mcandeia
Copy link
Contributor

great job btw!

@devartes devartes requested a review from mcandeia August 20, 2024 11:58
@mcandeia mcandeia force-pushed the feat/check-tailwind branch from 5faecff to 3df4e52 Compare August 22, 2024 13:49
@mcandeia mcandeia merged commit f3f6302 into main Aug 22, 2024
2 checks passed
@mcandeia mcandeia deleted the feat/check-tailwind branch August 22, 2024 13:50
@devartes devartes mentioned this pull request Oct 4, 2024
4 tasks
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