MohammadYounes / rtlcss

Framework for transforming Cascading Style Sheets (CSS) from Left-To-Right (LTR) to Right-To-Left (RTL)
https://rtlcss.com
MIT License
1.68k stars 129 forks source link

Pass source/dest in config #206

Closed denistrator closed 3 years ago

denistrator commented 3 years ago

Hi. Is there a way to define source and destination in configuration file?

Thank you for a great tool 😀

MohammadYounes commented 3 years ago

Hi, Why would you need them in config while you have the flexibility to change them through the arguments ?

denistrator commented 3 years ago

Hi. Thank you for a quick reply

I have multiple projects that use rtlcss tool, and I'd like to be able to simply run rtlcss command (in cli or as part of deployment step) and get flipped project css At the current moment I have to use a really long command to run the tool. Let me share a real life example of the command that I use for one of my projects (Magento 2)

rtlcss pub/static/frontend/Vendor/theme1/he_IL/css/styles-m.css     pub/static/frontend/Vendor/theme1/he_IL/css/styles-m.css     &&
rtlcss pub/static/frontend/Vendor/theme1/he_IL/css/styles-l.css     pub/static/frontend/Vendor/theme1/he_IL/css/styles-l.css     &&
rtlcss pub/static/frontend/Vendor/theme2/he_IL/css/styles-m.css     pub/static/frontend/Vendor/theme2/he_IL/css/styles-m.css     &&
rtlcss pub/static/frontend/Vendor/theme2/he_IL/css/styles-l.css     pub/static/frontend/Vendor/theme2/he_IL/css/styles-l.css     &&
rtlcss pub/static/frontend/Vendor/theme1/he_IL/css/styles-m.min.css pub/static/frontend/Vendor/theme1/he_IL/css/styles-m.min.css &&
rtlcss pub/static/frontend/Vendor/theme1/he_IL/css/styles-l.min.css pub/static/frontend/Vendor/theme1/he_IL/css/styles-l.min.css &&
rtlcss pub/static/frontend/Vendor/theme2/he_IL/css/styles-m.min.css pub/static/frontend/Vendor/theme2/he_IL/css/styles-m.min.css &&
rtlcss pub/static/frontend/Vendor/theme2/he_IL/css/styles-l.min.css pub/static/frontend/Vendor/theme2/he_IL/css/styles-l.min.css

the paths for i/o are different for each project, so I'd really like to be able to set up project input/output paths in config

MohammadYounes commented 3 years ago

I don't think this is something for rtlcss to handle, I believe using a command line alias is a better option.