Re: [OpenStack-Infra] best way to add handlebars.js to infra?

2014-10-01 Thread Sean Dague
On 09/29/2014 07:33 PM, Michael Krotscheck wrote:
> 
> On Sep 29, 2014, at 3:24 PM, Monty Taylor  > wrote:
> 
>> I am a big fan of the tooling pattern in storyboard-webclient - since
>> it's very much aimed at solving this. Some combination of krotscheck and
>> I will make an example patch we can all point at.
> 
> 
> I’ve added a WIP patch that starts to add the javascript toolchain. More
> work is needed
> https://review.openstack.org/#/c/124927/
> 
> The builds that execute the javascript toolchain itself are found here:
> http://git.openstack.org/cgit/openstack-infra/project-config/tree/jenkins/jobs/javascript.yaml

So I see how that might be used in tox, but how is that plugged into the
installation path?

As a developer what command do I need to run before?:

cd web/src/ && python -m SimpleHTTPServer

... to manually verify

And how does setup.py install for this project do the right thing?

-Sean

-- 
Sean Dague
http://dague.net

___
OpenStack-Infra mailing list
OpenStack-Infra@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-infra


Re: [OpenStack-Infra] best way to add handlebars.js to infra?

2014-09-29 Thread Michael Krotscheck

On Sep 29, 2014, at 3:24 PM, Monty Taylor  wrote:

> I am a big fan of the tooling pattern in storyboard-webclient - since
> it's very much aimed at solving this. Some combination of krotscheck and
> I will make an example patch we can all point at.


I’ve added a WIP patch that starts to add the javascript toolchain. More work 
is needed
https://review.openstack.org/#/c/124927/

The builds that execute the javascript toolchain itself are found here:
http://git.openstack.org/cgit/openstack-infra/project-config/tree/jenkins/jobs/javascript.yaml___
OpenStack-Infra mailing list
OpenStack-Infra@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-infra


Re: [OpenStack-Infra] best way to add handlebars.js to infra?

2014-09-29 Thread Mathieu Gagné

On 2014-09-29 6:24 PM, Mathieu Gagné wrote:

On 2014-09-29 6:12 PM, Sean Dague wrote:


It seems like it would be nice to have it be rooted on
static.openstack.org like jquery is, so we've got a common copy that
everyone can use.



What about cdnjs: http://cdnjs.com/libraries/handlebars.js/

What the policy regarding usage of 3rd party cdn and hosted files?


I guess Rob answered my question.

--
Mathieu

___
OpenStack-Infra mailing list
OpenStack-Infra@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-infra


Re: [OpenStack-Infra] best way to add handlebars.js to infra?

2014-09-29 Thread Monty Taylor
On 09/29/2014 03:12 PM, Sean Dague wrote:
> Over the weekend I redid elastic-recheck to use handlebars.js instead of
> inline dom building... it's so much nicer:
> https://github.com/openstack-infra/elastic-recheck/blob/master/web/share/index.html#L61-L79
> and
> https://github.com/openstack-infra/elastic-recheck/blob/master/web/share/elastic-recheck.js#L82-L85
> 
> I'd really like to get this pattern into more of our tooling, as I think
> it will expand the scope of the people who can contribute, as they can
> address formatting issues outside of javascript logic.
> 
> It seems like it would be nice to have it be rooted on
> static.openstack.org like jquery is, so we've got a common copy that
> everyone can use.
> 
> So... questions:
> 
> - Should javascript libraries be hosted on static.openstack.org (which
> reduces what users need to download) or should we carry them around in
> every app (which means static.o.o could be blocked or down, but the app
> would still work)?
> 
> - Regardless of where they go, how should we get them there via puppet?
>  - wget + file install?
>  - npm ?
>  - bower?
>  - some 3rd thing?

I am a big fan of the tooling pattern in storyboard-webclient - since
it's very much aimed at solving this. Some combination of krotscheck and
I will make an example patch we can all point at.

> Would be good to have a pattern here so we can repeat as required in the
> future.
> 
>   -Sean
> 


___
OpenStack-Infra mailing list
OpenStack-Infra@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-infra


Re: [OpenStack-Infra] best way to add handlebars.js to infra?

2014-09-29 Thread Mathieu Gagné

On 2014-09-29 6:12 PM, Sean Dague wrote:


It seems like it would be nice to have it be rooted on
static.openstack.org like jquery is, so we've got a common copy that
everyone can use.



What about cdnjs: http://cdnjs.com/libraries/handlebars.js/

What the policy regarding usage of 3rd party cdn and hosted files?

--
Mathieu

___
OpenStack-Infra mailing list
OpenStack-Infra@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-infra


Re: [OpenStack-Infra] best way to add handlebars.js to infra?

2014-09-29 Thread Robert Collins
On 30 September 2014 11:12, Sean Dague  wrote:
> Over the weekend I redid elastic-recheck to use handlebars.js instead of
> inline dom building... it's so much nicer:
> https://github.com/openstack-infra/elastic-recheck/blob/master/web/share/index.html#L61-L79
> and
> https://github.com/openstack-infra/elastic-recheck/blob/master/web/share/elastic-recheck.js#L82-L85
>
> I'd really like to get this pattern into more of our tooling, as I think
> it will expand the scope of the people who can contribute, as they can
> address formatting issues outside of javascript logic.

+1. You might like https://github.com/wbond/pybars too (its a python3
updated fork of pybars, which I wrote back at Canonical). I'm not sure
if its directly relevant here or not.

> It seems like it would be nice to have it be rooted on
> static.openstack.org like jquery is, so we've got a common copy that
> everyone can use.
>
> So... questions:
>
> - Should javascript libraries be hosted on static.openstack.org (which
> reduces what users need to download) or should we carry them around in
> every app (which means static.o.o could be blocked or down, but the app
> would still work)?

For apps that are our development tooling, I think using static.o.o is
fine. For apps that we expect folk to install locally in their clouds,
they should carry them (or at least be able to carry them, as secure
environments get antsy about random 3rd-party domains having code
access to their credentials ;)).

-Rob


-- 
Robert Collins 
Distinguished Technologist
HP Converged Cloud

___
OpenStack-Infra mailing list
OpenStack-Infra@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-infra