atelierspierrot / assets-manager

A Composer plugin to manage "assets" package type
http://assetsmanager.ateliers-pierrot.fr/
GNU General Public License v3.0
7 stars 0 forks source link

Preset overrides? #4

Closed e-picas closed 10 years ago

e-picas commented 10 years ago

In the case of two presets with the same name, it seems that only the first definition of a preset is taken and used by the package ... It may be more logical to use the last one (?) or to allow a flag to choose first or last.

e-picas commented 10 years ago

The case of the http://github.com/atelierspierrot/assets-bootstrapper (in its "wip" branch for now) seems a good example: it uses the TemplateEngine (http://github.com/atelierspierrot/templatengine), which defines a "jquery" preset (first) and re-defines a "jquery" preset, in another version if so.

As the TemplateEngine is a requirement but is not used for its assets, it is really not the good choice to keep its "jquery" preset definition.

By default, it looks like the better choice would be to ALWAYS keep the last definition of a preset as it may be near the final package itself in the executed stack (warning about the JSON DB file that is not, for now, ordered).

e-picas commented 10 years ago

OK, created the #5 for the JSON db ordering