asyncapi-react icon indicating copy to clipboard operation
asyncapi-react copied to clipboard

feat: add script to generate the theme

Open magicmatatjahu opened this issue 3 years ago • 8 comments

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 - https://github.com/asyncapi/asyncapi-react/issues/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 https://github.com/asyncapi/asyncapi-react/issues/370 Resolves https://github.com/asyncapi/asyncapi-react/issues/368

magicmatatjahu avatar Jun 17 '21 09:06 magicmatatjahu

@magicmatatjahu you have a small conflict 😄

@fmvilas are you gonna finish reviewing this PR?

jonaslagoni avatar Jul 02 '21 08:07 jonaslagoni

@jonaslagoni Thanks for info! Fixed.

magicmatatjahu avatar Jul 02 '21 08:07 magicmatatjahu

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

sonarcloud[bot] avatar Jul 02 '21 08:07 sonarcloud[bot]

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

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 :heart:

github-actions[bot] avatar Dec 11 '21 00:12 github-actions[bot]

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

derberg avatar Dec 12 '21 13:12 derberg

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

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 :heart:

github-actions[bot] avatar Apr 13 '22 00:04 github-actions[bot]

@magicmatatjahu should we close this one?

derberg avatar Apr 20 '22 14:04 derberg

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

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 :heart:

github-actions[bot] avatar Aug 19 '22 00:08 github-actions[bot]

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

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 :heart:

github-actions[bot] avatar Dec 18 '22 00:12 github-actions[bot]