newsdev / ai2html

A script for Adobe Illustrator that converts your Illustrator artwork into an html page.
http://ai2html.org
Other
897 stars 145 forks source link

Move scriptEnvironment to the top of the script #81

Closed cedricsam closed 6 years ago

cedricsam commented 6 years ago

Would it make sense to have scriptEnvironment (for non-NYT usages of ai2html) and PROMO_WIDTH (for setting width of promo image) at the very top of the script? I see that PROMO_WIDTH was maybe meant to be in base settings?

See how we moved scriptEnvironment to the top: https://github.com/bizweekgraphics/ai2html/blob/master/ai2html.js#L13

But I see it's in the base settings too: https://github.com/bizweekgraphics/ai2html/blob/master/ai2html.js#L113

mbloch commented 6 years ago

Hey Cedric, sorry it's taken a while to respond...

You're right, promo image width should be configurable. I just pushed an update (v0.67.3) that adds a "promo_image_width" setting.

The "ai2html_environment" setting is no longer being used, and I've removed it.

It seems to me that the scriptEnvironment variable is a kludge that should go away. That will have to wait until the configuration system is updated, which is currently at the top of my list of things to improve. (See issue #86)

cedricsam commented 6 years ago

Cool, sounds good! Thanks!

I was actually just reading this issue that you replied to last night! https://github.com/newsdev/ai2html/issues/75