resource sorting thoughts

16 views
Skip to first unread message

Martijn Faassen

unread,
Jan 9, 2013, 10:58:49 AM1/9/13
to fans...@googlegroups.com
Hi there,

I find myself in the situation of packaging a JS library (Obviel) that
has a JavaScript file that does extra registrations if other JavaScript
files were included earlier. I.e, if included:

template.js
core.js

core.js will register the template engine with core.js. If template.js
is not included, everything will work, but the template engine is not
recognized.

The problem is that template.js is optional, but *when* it is included it
should be sorted earlier than core.js.

depends is not good enough for this. I'm looking for a feature for
Resource like "sort_after" where I can list an optional library that
if
included this resource should be sorted after. (or "include_before",
the inverse). Of course this information could potentially be
inconsistent with depends, in which case Fanstatic should complain and
fail to work.

Or am I missing something? Please let me know! If not, who else is
interested in working on this feature?

Regards,

Martijn

P.S. Perhaps Obviel itself should be redesigned to follow a different
pattern; while I can change Obviel this can't be the only JS library
that follows a pattern like this, though..
Reply all
Reply to author
Forward
0 new messages