can an extension wire external files?

5 views
Skip to first unread message

fadi maali

unread,
Aug 26, 2010, 10:46:53 PM8/26/10
to freebase-gr...@googlegroups.com
Hi,

it looks that Butterfly extensions currently are not able to add scripts/styles from other extensions (for example, I needed to load dom.js upon requesting index as core module responsible for index.vt does not load this file)

I tried absolute paths, but they didn't work as they are resolved against the extension name.
As a work around I duplicated the needed files under the added extension.

Is there a way for an extension to wire files (scripts or styles) that it does not own?

Regards,
Fadi


Tom Morris

unread,
Aug 26, 2010, 10:59:22 PM8/26/10
to freebase-gr...@googlegroups.com

Did you specify the other extension as a dependency? Not sure that'll
fix the problem, but it's certainly a necessary first step to make
sure it's loaded before your extension.

Tom

David Huynh

unread,
Aug 27, 2010, 2:18:50 AM8/27/10
to freebase-gr...@googlegroups.com
Fadi,

What you want to do actually didn't occur to me when I was designing ClientSideResourceManager. I'll try to support it. I'll let you know when I have that checked in. But I'm on vacation for a week, so in the meantime, please go ahead by duplicating the file.

David

Stefano Mazzocchi

unread,
Aug 28, 2010, 9:53:09 PM8/28/10
to freebase-gr...@googlegroups.com
Fadi,

yes, extensions can reference each other using this syntax

<link href="[#core#]/style.css" type="text/css" rel="stylesheet" />

For more info, read

http://code.google.com/p/simile-butterfly/wiki/UserGuide

--
Stefano Mazzocchi <stef...@google.com>
Software Engineer, Google Inc.

Stefano Mazzocchi

unread,
Aug 29, 2010, 2:32:37 AM8/29/10
to freebase-gr...@googlegroups.com
I didn't read David's reply in detail so it didn't occur to me that
you might be talking about something else (i.e.
ClientSideResourceManager). I got confused because this is not a
feature of Butterfly per se.

In any case, I agree it's needed for extensions to be able to inject
their own client side scripts inside the core templates and we'll try
to come up with a solution for that ASAP.

Reply all
Reply to author
Forward
0 new messages