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: add script to generate the theme #374

Closed

Conversation

magicmatatjahu
Copy link
Member

@magicmatatjahu magicmatatjahu commented Jun 17, 2021

Description

Add script to generate the theme:

  • create the tools folder in which we will have the helper scripts/tools for component, like theme/styles generator
  • script creates the two css files, with reset css {name}.reset.css and without reset css {name}.css - Disable preflight (css normalizer) from TailwindCSS  #368
  • script takes two parameters, first is a path to output css file like ./output/index.css and the second parameter (optional) is the path to the custom configuration for TailwindCSS. We deep merge the default configuration with custom configuration.
  • add theming.md documentation.

We can use the script like

node ./library/tools/styles/script.js ./output/index.css
// or
node ./library/tools/styles/script.js ./output/index.css ./custom.config.js

In the future we can move this script to our cli with generate theme commands like:

asyncapi generate theme --config=... --output=...

Is it a good idea? Feel free to comment!

Problems I found:

  • dependencies... at the moment we can only add all needed dependencies to generate the styles like tailwindcss, postcss and their plugins to dependencies array, then people will able to generate the styles using script in their project like: node node_modules/@asyncapi/react-component/tools/styles/script.js ..., of course we will end up with bigger package, but the component itself in application won't change the weight, because these dependencies are a pure devDependencies that aren't used in component directly, but only in tools/styles folder.

Related issue(s)
Resolves #370
Resolves #368

@magicmatatjahu magicmatatjahu added area/library Related to all activities around Library package area/documentation Related to all activities around documentation enhancement New feature or request labels Jun 17, 2021
@magicmatatjahu magicmatatjahu force-pushed the next-branches/theme-script branch from 92350a1 to a04268c Compare June 22, 2021 10:07
@magicmatatjahu magicmatatjahu marked this pull request as ready for review June 22, 2021 10:08
docs/features/theming.md Outdated Show resolved Hide resolved
docs/features/theming.md Outdated Show resolved Hide resolved
docs/features/theming.md Outdated Show resolved Hide resolved
docs/features/theming.md Outdated Show resolved Hide resolved
library/tools/styles/script.js Outdated Show resolved Hide resolved
@magicmatatjahu magicmatatjahu requested a review from fmvilas June 25, 2021 06:56
@jonaslagoni
Copy link
Member

@magicmatatjahu you have a small conflict 😄

@fmvilas are you gonna finish reviewing this PR?

@magicmatatjahu
Copy link
Member Author

@jonaslagoni Thanks for info! Fixed.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jul 2, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Copy link
Member

@fmvilas fmvilas left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍

@github-actions
Copy link

This pull request has been automatically marked as stale because it has not had recent activity 😴

It will be closed in 120 days if no further activity occurs. To unstale this pull request, add a comment with detailed explanation.

There can be many reasons why some specific pull request has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this pull request forward. Connect with us through one of many communication channels we established here.

Thank you for your patience ❤️

@github-actions github-actions bot added the stale label Dec 11, 2021
@derberg
Copy link
Member

derberg commented Dec 12, 2021

@magicmatatjahu pinging in case you forgot, although I'm pretty sure you didn't 😄

@github-actions github-actions bot removed the stale label Dec 13, 2021
@github-actions
Copy link

This pull request has been automatically marked as stale because it has not had recent activity 😴

It will be closed in 120 days if no further activity occurs. To unstale this pull request, add a comment with detailed explanation.

There can be many reasons why some specific pull request has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this pull request forward. Connect with us through one of many communication channels we established here.

Thank you for your patience ❤️

@derberg
Copy link
Member

derberg commented Apr 20, 2022

@magicmatatjahu should we close this one?

@github-actions
Copy link

This pull request has been automatically marked as stale because it has not had recent activity 😴

It will be closed in 120 days if no further activity occurs. To unstale this pull request, add a comment with detailed explanation.

There can be many reasons why some specific pull request has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this pull request forward. Connect with us through one of many communication channels we established here.

Thank you for your patience ❤️

@github-actions github-actions bot added stale and removed stale labels Aug 19, 2022
@github-actions
Copy link

This pull request has been automatically marked as stale because it has not had recent activity 😴

It will be closed in 120 days if no further activity occurs. To unstale this pull request, add a comment with detailed explanation.

There can be many reasons why some specific pull request has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this pull request forward. Connect with us through one of many communication channels we established here.

Thank you for your patience ❤️

@github-actions github-actions bot added the stale label Dec 18, 2022
@github-actions github-actions bot closed this Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/documentation Related to all activities around documentation area/library Related to all activities around Library package enhancement New feature or request stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants