You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by OmPrakash Muppirala <bi...@gmail.com> on 2017/01/03 19:16:14 UTC
[FlexJS] How to bootstrap a library with its own html script tags
For the TeamPage_MDL project, I need to use the MDL library. But the
script tag needs to be added in the app's html template. Is there any way
to add this from the MDL library itself?
I needed to create a FontAwesome library, and now I need to remember to
update the app's html template before using it in an app.
It seems redundant for the users to import a library and still need to add
it as a runtime dependency in the app' settings.
Can we add this functionality?
Thanks,
Om
Re: [FlexJS] How to bootstrap a library with its own html script tags
Posted by Alex Harui <ah...@adobe.com>.
On 1/3/17, 12:24 PM, "omuppi1@gmail.com on behalf of OmPrakash Muppirala"
<omuppi1@gmail.com on behalf of bigosmallm@gmail.com> wrote:
>Yes, I see that in the MDLExample project. But I don't want to add that
>code to every app that uses the MDL library.
>
>The MDL library should add that inject_html itself. I just don't know how
>to do that in the library itself.
Any class with an inject_html directive in the ASDoc will have the
contents injected into the wrapper. CreateJS has it on its Application
class.
-Alex
Re: [FlexJS] How to bootstrap a library with its own html script tags
Posted by OmPrakash Muppirala <bi...@gmail.com>.
That worked. Thanks!
Om
On Wed, Jan 4, 2017 at 8:25 AM, Alex Harui <ah...@adobe.com> wrote:
> I think inject_html goes in the ASDoc for the constructor, not the class.
>
> Also, there were several days where Falcon's handling of inject_html was
> broken. I checked in a fix on Monday.
>
> HTH,
> -Alex
>
> On 1/4/17, 2:46 AM, "omuppi1@gmail.com on behalf of OmPrakash Muppirala"
> <omuppi1@gmail.com on behalf of bigosmallm@gmail.com> wrote:
>
> >So I tried adding this inject_html tag like this:
> >
> >https://github.com/apache/flex-asjs/commit/a20d30ac603ebc385a9acb59398871
> 4
> >f996d50ec
> >
> >But, I dont see the tag in the generated html file. Can someone please
> >check if I am doing something wrong?
> >
> >Thanks,
> >Om
> >
> >On Tue, Jan 3, 2017 at 1:53 PM, Alex Harui <ah...@adobe.com> wrote:
> >
> >>
> >>
> >> On 1/3/17, 1:48 PM, "carlos.rovira@gmail.com on behalf of Carlos
> Rovira"
> >> <carlos.rovira@gmail.com on behalf of carlos.rovira@codeoscopic.com>
> >> wrote:
> >>
> >> >
> >> >So maybe we should add Application.as in MDL.swc?
> >> >
> >> >But I'd like to support both ways to do this, since I use maven
> >> >construction to configure MDL colors through properties in pom.xml...
> >>
> >> I think for MDL, because it has flavors, inject_html may not be good
> >> enough.
> >>
> >> One other option, depending on timing, is to have an Application load
> >> scripts early in its lifecycle. There may not be one best answer.
> >>
> >> -Alex
> >>
> >>
>
>
Re: [FlexJS] How to bootstrap a library with its own html script tags
Posted by Alex Harui <ah...@adobe.com>.
I think inject_html goes in the ASDoc for the constructor, not the class.
Also, there were several days where Falcon's handling of inject_html was
broken. I checked in a fix on Monday.
HTH,
-Alex
On 1/4/17, 2:46 AM, "omuppi1@gmail.com on behalf of OmPrakash Muppirala"
<omuppi1@gmail.com on behalf of bigosmallm@gmail.com> wrote:
>So I tried adding this inject_html tag like this:
>
>https://github.com/apache/flex-asjs/commit/a20d30ac603ebc385a9acb593988714
>f996d50ec
>
>But, I dont see the tag in the generated html file. Can someone please
>check if I am doing something wrong?
>
>Thanks,
>Om
>
>On Tue, Jan 3, 2017 at 1:53 PM, Alex Harui <ah...@adobe.com> wrote:
>
>>
>>
>> On 1/3/17, 1:48 PM, "carlos.rovira@gmail.com on behalf of Carlos Rovira"
>> <carlos.rovira@gmail.com on behalf of carlos.rovira@codeoscopic.com>
>> wrote:
>>
>> >
>> >So maybe we should add Application.as in MDL.swc?
>> >
>> >But I'd like to support both ways to do this, since I use maven
>> >construction to configure MDL colors through properties in pom.xml...
>>
>> I think for MDL, because it has flavors, inject_html may not be good
>> enough.
>>
>> One other option, depending on timing, is to have an Application load
>> scripts early in its lifecycle. There may not be one best answer.
>>
>> -Alex
>>
>>
Re: [FlexJS] How to bootstrap a library with its own html script tags
Posted by OmPrakash Muppirala <bi...@gmail.com>.
So I tried adding this inject_html tag like this:
https://github.com/apache/flex-asjs/commit/a20d30ac603ebc385a9acb593988714f996d50ec
But, I dont see the tag in the generated html file. Can someone please
check if I am doing something wrong?
Thanks,
Om
On Tue, Jan 3, 2017 at 1:53 PM, Alex Harui <ah...@adobe.com> wrote:
>
>
> On 1/3/17, 1:48 PM, "carlos.rovira@gmail.com on behalf of Carlos Rovira"
> <carlos.rovira@gmail.com on behalf of carlos.rovira@codeoscopic.com>
> wrote:
>
> >
> >So maybe we should add Application.as in MDL.swc?
> >
> >But I'd like to support both ways to do this, since I use maven
> >construction to configure MDL colors through properties in pom.xml...
>
> I think for MDL, because it has flavors, inject_html may not be good
> enough.
>
> One other option, depending on timing, is to have an Application load
> scripts early in its lifecycle. There may not be one best answer.
>
> -Alex
>
>
Re: [FlexJS] How to bootstrap a library with its own html script tags
Posted by Alex Harui <ah...@adobe.com>.
On 1/3/17, 1:48 PM, "carlos.rovira@gmail.com on behalf of Carlos Rovira"
<carlos.rovira@gmail.com on behalf of carlos.rovira@codeoscopic.com> wrote:
>
>So maybe we should add Application.as in MDL.swc?
>
>But I'd like to support both ways to do this, since I use maven
>construction to configure MDL colors through properties in pom.xml...
I think for MDL, because it has flavors, inject_html may not be good
enough.
One other option, depending on timing, is to have an Application load
scripts early in its lifecycle. There may not be one best answer.
-Alex
Re: [FlexJS] How to bootstrap a library with its own html script tags
Posted by Carlos Rovira <ca...@codeoscopic.com>.
I search in codebase for "inject_html" and see this:
/**
* FalconJX will inject html into the index.html file. Surround
with
* "inject_html" tag as follows:
*
* <inject_html>
* <script src="https://code.createjs.com/easeljs-0.8.1.min.js
"></script>
* <script src="https://code.createjs.com/tweenjs-0.6.2.min.js"></script>
* </inject_html>
*/
in Application.as
So maybe we should add Application.as in MDL.swc?
But I'd like to support both ways to do this, since I use maven
construction to configure MDL colors through properties in pom.xml...
2017-01-03 21:24 GMT+01:00 OmPrakash Muppirala <bi...@gmail.com>:
> Yes, I see that in the MDLExample project. But I don't want to add that
> code to every app that uses the MDL library.
>
> The MDL library should add that inject_html itself. I just don't know how
> to do that in the library itself.
>
> Thanks,
> Om
>
> 2017-01-03 12:08 GMT-08:00 Carlos Rovira <ca...@codeoscopic.com>:
>
> > Hi Om,
> >
> > in MDL is added in the HTML template. I think you could do the same,
> right?
> > Could you check the way we do in MDLExample?
> >
> > Other way could be inject_html...
> >
> >
> >
> >
> > 2017-01-03 20:16 GMT+01:00 OmPrakash Muppirala <bi...@gmail.com>:
> >
> > > For the TeamPage_MDL project, I need to use the MDL library. But the
> > > script tag needs to be added in the app's html template. Is there any
> > way
> > > to add this from the MDL library itself?
> > >
> > > I needed to create a FontAwesome library, and now I need to remember to
> > > update the app's html template before using it in an app.
> > >
> > > It seems redundant for the users to import a library and still need to
> > add
> > > it as a runtime dependency in the app' settings.
> > >
> > > Can we add this functionality?
> > >
> > > Thanks,
> > > Om
> > >
> >
> >
> >
> > --
> >
> > Carlos Rovira
> > Director General
> > M: +34 607 22 60 05
> > http://www.codeoscopic.com
> > http://www.avant2.es
> >
> > Este mensaje se dirige exclusivamente a su destinatario y puede contener
> > información privilegiada o confidencial. Si ha recibido este mensaje por
> > error, le rogamos que nos lo comunique inmediatamente por esta misma vía
> y
> > proceda a su destrucción.
> >
> > De la vigente Ley Orgánica de Protección de Datos (15/1999), le
> comunicamos
> > que sus datos forman parte de un fichero cuyo responsable es CODEOSCOPIC
> > S.A. La finalidad de dicho tratamiento es facilitar la prestación del
> > servicio o información solicitados, teniendo usted derecho de acceso,
> > rectificación, cancelación y oposición de sus datos dirigiéndose a
> nuestras
> > oficinas c/ Paseo de la Habana 9-11, 28036, Madrid con la documentación
> > necesaria.
> >
>
--
Carlos Rovira
Director General
M: +34 607 22 60 05
http://www.codeoscopic.com
http://www.avant2.es
Este mensaje se dirige exclusivamente a su destinatario y puede contener
información privilegiada o confidencial. Si ha recibido este mensaje por
error, le rogamos que nos lo comunique inmediatamente por esta misma vía y
proceda a su destrucción.
De la vigente Ley Orgánica de Protección de Datos (15/1999), le comunicamos
que sus datos forman parte de un fichero cuyo responsable es CODEOSCOPIC
S.A. La finalidad de dicho tratamiento es facilitar la prestación del
servicio o información solicitados, teniendo usted derecho de acceso,
rectificación, cancelación y oposición de sus datos dirigiéndose a nuestras
oficinas c/ Paseo de la Habana 9-11, 28036, Madrid con la documentación
necesaria.
Re: [FlexJS] How to bootstrap a library with its own html script tags
Posted by OmPrakash Muppirala <bi...@gmail.com>.
Yes, I see that in the MDLExample project. But I don't want to add that
code to every app that uses the MDL library.
The MDL library should add that inject_html itself. I just don't know how
to do that in the library itself.
Thanks,
Om
2017-01-03 12:08 GMT-08:00 Carlos Rovira <ca...@codeoscopic.com>:
> Hi Om,
>
> in MDL is added in the HTML template. I think you could do the same, right?
> Could you check the way we do in MDLExample?
>
> Other way could be inject_html...
>
>
>
>
> 2017-01-03 20:16 GMT+01:00 OmPrakash Muppirala <bi...@gmail.com>:
>
> > For the TeamPage_MDL project, I need to use the MDL library. But the
> > script tag needs to be added in the app's html template. Is there any
> way
> > to add this from the MDL library itself?
> >
> > I needed to create a FontAwesome library, and now I need to remember to
> > update the app's html template before using it in an app.
> >
> > It seems redundant for the users to import a library and still need to
> add
> > it as a runtime dependency in the app' settings.
> >
> > Can we add this functionality?
> >
> > Thanks,
> > Om
> >
>
>
>
> --
>
> Carlos Rovira
> Director General
> M: +34 607 22 60 05
> http://www.codeoscopic.com
> http://www.avant2.es
>
> Este mensaje se dirige exclusivamente a su destinatario y puede contener
> información privilegiada o confidencial. Si ha recibido este mensaje por
> error, le rogamos que nos lo comunique inmediatamente por esta misma vía y
> proceda a su destrucción.
>
> De la vigente Ley Orgánica de Protección de Datos (15/1999), le comunicamos
> que sus datos forman parte de un fichero cuyo responsable es CODEOSCOPIC
> S.A. La finalidad de dicho tratamiento es facilitar la prestación del
> servicio o información solicitados, teniendo usted derecho de acceso,
> rectificación, cancelación y oposición de sus datos dirigiéndose a nuestras
> oficinas c/ Paseo de la Habana 9-11, 28036, Madrid con la documentación
> necesaria.
>
Re: [FlexJS] How to bootstrap a library with its own html script tags
Posted by Carlos Rovira <ca...@codeoscopic.com>.
Hi Om,
in MDL is added in the HTML template. I think you could do the same, right?
Could you check the way we do in MDLExample?
Other way could be inject_html...
2017-01-03 20:16 GMT+01:00 OmPrakash Muppirala <bi...@gmail.com>:
> For the TeamPage_MDL project, I need to use the MDL library. But the
> script tag needs to be added in the app's html template. Is there any way
> to add this from the MDL library itself?
>
> I needed to create a FontAwesome library, and now I need to remember to
> update the app's html template before using it in an app.
>
> It seems redundant for the users to import a library and still need to add
> it as a runtime dependency in the app' settings.
>
> Can we add this functionality?
>
> Thanks,
> Om
>
--
Carlos Rovira
Director General
M: +34 607 22 60 05
http://www.codeoscopic.com
http://www.avant2.es
Este mensaje se dirige exclusivamente a su destinatario y puede contener
información privilegiada o confidencial. Si ha recibido este mensaje por
error, le rogamos que nos lo comunique inmediatamente por esta misma vía y
proceda a su destrucción.
De la vigente Ley Orgánica de Protección de Datos (15/1999), le comunicamos
que sus datos forman parte de un fichero cuyo responsable es CODEOSCOPIC
S.A. La finalidad de dicho tratamiento es facilitar la prestación del
servicio o información solicitados, teniendo usted derecho de acceso,
rectificación, cancelación y oposición de sus datos dirigiéndose a nuestras
oficinas c/ Paseo de la Habana 9-11, 28036, Madrid con la documentación
necesaria.