react-toolbox / react-toolbox-themr

A tool to statically extract and generate custom themes for React Toolbox
MIT License
240 stars 24 forks source link

Outputting Minified Obfuscated Styles #34

Open FullstackJack opened 7 years ago

FullstackJack commented 7 years ago

Perhaps I'm not using the tool correctly or perhaps I expected something different, but when I follow the setup guide in the README, the tool outputs the theme.css and theme.js minified and obfuscated. Shortened for brevity.

theme.css

._3nrqp{-webkit-box-align:center;-ms-flex-align:center;align-items:center;...```

theme.js

module.exports={"RTDialog":{"wrapper":"_3nrqp","dialog":"_3lw90","active":"_3ea_1",

Would this tool be picking up the postcss.config.js file in my project root?

csalvato commented 7 years ago

Mine, too. Thought that was intentional.

FullstackJack commented 7 years ago

I've resorted to copying the source styles individually per component, but that's less than ideal and easy to screw up.

silenzium commented 7 years ago

Is there an option or something to turn off obfuscation?

Galderak commented 7 years ago

Undocumented config option 'fixed' worked for me. set 'fixed' to true, output should no longer be obfuscated.

"reactToolBox":{
  "include":[
      "DATE_PICKER"
 ],
"fixed":true

Cheers,

gnapse commented 7 years ago

Wow, this is great! I think that option should be documented. In fact, I think it should be the default option, and if it does not minify also, even better (right now that option only prevents obfuscation). Then there should be an option to request output to be obfuscated and or minified, not the other way around.