Anahkiasen / flatten

A package to flatten any website to plain HTML
336 stars 42 forks source link

Environments config is confusing #28

Closed cviebrock closed 10 years ago

cviebrock commented 10 years ago
// The environments in which Flatten should not run
'environments' => array(),

That seems a bit counterintuitive. A config option named environments sound like it should define the env(s) where Flatten would run, not where it's ignored.

Even though it would break BC, would you consider flipping the logic, so environments defines where you want it to run ... or alternatively, rename the config option ignore_environments?

willrowe commented 10 years ago

Wouldn't it be cleaner if instead of an environments option there was an enabled option? This would take advantage of the existing environment configuration in Laravel. If you don't want it to run in a certain environment, just create the corresponding folder/file and add 'enabled' => false.