asyncapi-react
asyncapi-react copied to clipboard
feat: add script to generate the theme
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 todependencies
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 intools/styles
folder.
Related issue(s) Resolves https://github.com/asyncapi/asyncapi-react/issues/370 Resolves https://github.com/asyncapi/asyncapi-react/issues/368
@magicmatatjahu you have a small conflict 😄
@fmvilas are you gonna finish reviewing this PR?
@jonaslagoni Thanks for info! Fixed.
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:
@magicmatatjahu pinging in case you forgot, although I'm pretty sure you didn't 😄
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:
@magicmatatjahu should we close this one?
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:
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: