Re: Javascript trigger design

2014-12-03 Thread Guillem Jover
Hi! On Tue, 2014-12-02 at 06:46:33 +0800, Thomas Goirand wrote: On 12/01/2014 04:26 PM, Thorsten Glaser wrote: No, triggers unfortunately are not that simple: if you install/upgrade openstack-dashboard together with some of the packages it wants a trigger on, $1=triggered will sometimes

Re: Javascript trigger design

2014-12-02 Thread Thomas Goirand
On 12/02/2014 07:16 AM, Brian May wrote: On 2 December 2014 at 09:46, Thomas Goirand z...@debian.org mailto:z...@debian.org wrote: if [ $1 = configure ] ; then some-other-stuff /usr/share/openstack-dashboard/manage.py compress --force some-other-stuff fi

Re: Javascript trigger design

2014-12-02 Thread Thorsten Glaser
On Tue, 2 Dec 2014, Brian May wrote: Is it *that* simple? I'm surprised by the interest thing just being Yes. There might be times when compress is run twice. e.g. when It does, yes. I wonder about that too. Can a package trigger itself? (e.g. you could explicitly raise the trigger

Re: Javascript trigger design

2014-12-01 Thread Thorsten Glaser
On Sat, 29 Nov 2014, Thomas Goirand wrote: 2/ in debian/openstack-dashboard.postinst, implement something like: if [ $1 = triggered ] ; then /usr/share/openstack-dashboard/manage.py compress --force fi Is it *that* simple? No, triggers unfortunately are not that simple: if you

Re: [Pkg-javascript-devel] Javascript trigger design

2014-12-01 Thread Thomas Goirand
On 11/29/2014 06:10 PM, Jérémy Lal wrote: Le vendredi 28 novembre 2014 à 20:46 +0100, Jonas Smedegaard a écrit : Quoting Thorsten Glaser (2014-11-28 13:20:36) On Fri, 28 Nov 2014, Thomas Goirand wrote: It's been a long time I've been thinking about it, and I believe that the only way to do

Re: [Pkg-javascript-devel] Javascript trigger design

2014-12-01 Thread Jérémy Lal
Le vendredi 28 novembre 2014 à 07:04 +0800, Thomas Goirand a écrit : Hi, Web application have evolved into monsters that needs lots of javascript. It's very common that these javascript applications are collecting all the .js library they use, concatenate them into a single file, and

Re: [Pkg-javascript-devel] Javascript trigger design

2014-12-01 Thread Thorsten Glaser
On Mon, 1 Dec 2014, Jérémy Lal wrote: Instead of triggers, i'd rather make sure the web application package is rebuilt whenever one of its Build-Depends package is updated. No, that’s too fragile and ties up way too many resources. It’s fully OK to compose the final version on the users’

Re: Javascript trigger design

2014-12-01 Thread Thomas Goirand
On 12/01/2014 04:26 PM, Thorsten Glaser wrote: On Sat, 29 Nov 2014, Thomas Goirand wrote: 2/ in debian/openstack-dashboard.postinst, implement something like: if [ $1 = triggered ] ; then /usr/share/openstack-dashboard/manage.py compress --force fi Is it *that* simple? No,

Re: Javascript trigger design

2014-12-01 Thread Brian May
On 2 December 2014 at 09:46, Thomas Goirand z...@debian.org wrote: if [ $1 = configure ] ; then some-other-stuff /usr/share/openstack-dashboard/manage.py compress --force some-other-stuff fi if [ $1 = triggered ] ; then /usr/share/openstack-dashboard/manage.py compress

Re: [Pkg-javascript-devel] Javascript trigger design

2014-11-29 Thread Jérémy Lal
Le vendredi 28 novembre 2014 à 20:46 +0100, Jonas Smedegaard a écrit : Quoting Thorsten Glaser (2014-11-28 13:20:36) On Fri, 28 Nov 2014, Thomas Goirand wrote: It's been a long time I've been thinking about it, and I believe that the only way to do this, would be to use triggers. Though

Re: Javascript trigger design

2014-11-28 Thread Tomas Pospisek
Am 28.11.2014 um 08:19 schrieb Matthias Urlichs: Hi, Tomas Pospisek: At least the Ruby On Rails framework notices an updated JS and will re-compress the whole JS blob from its parts. Does it call stat() on every constituent of these packed JS files on every web request, or does it do

Re: Javascript trigger design

2014-11-28 Thread Jérémy Lal
Le vendredi 28 novembre 2014 à 06:16 +, olivier sallou a écrit : Le Fri Nov 28 2014 at 01:55:26, Tomas Pospisek t...@sourcepole.ch a écrit : Am 28.11.2014 um 00:04 schrieb Thomas Goirand: Hi, Web application have evolved into monsters that needs lots of javascript. It's very

Re: Javascript trigger design

2014-11-28 Thread Paul Wise
On Fri, Nov 28, 2014 at 5:51 PM, Jérémy Lal wrote: The debian side is in no way able / fit to take care of *live* updating js/css bundles. This is up to the web framework you're using - like you mentioned for example RoR. What is needed for debian-packaged webapps is to be able to regenerate

Re: Javascript trigger design

2014-11-28 Thread Thorsten Glaser
On Fri, 28 Nov 2014, Thomas Goirand wrote: It's been a long time I've been thinking about it, and I believe that the only way to do this, would be to use triggers. Though I have never Look at libjs-protoaculous which combines prototype and scriptaculous into one (possibly minified) js file. In

Re: Javascript trigger design

2014-11-28 Thread Antonio Terceiro
On Fri, Nov 28, 2014 at 10:30:40AM +0100, Tomas Pospisek wrote: Am 28.11.2014 um 08:19 schrieb Matthias Urlichs: Hi, Tomas Pospisek: At least the Ruby On Rails framework notices an updated JS and will re-compress the whole JS blob from its parts. Does it call stat() on every

Re: Javascript trigger design

2014-11-28 Thread Thomas Goirand
On 11/28/2014 08:20 PM, Thorsten Glaser wrote: On Fri, 28 Nov 2014, Thomas Goirand wrote: It's been a long time I've been thinking about it, and I believe that the only way to do this, would be to use triggers. Though I have never Look at libjs-protoaculous which combines prototype and

Re: Javascript trigger design

2014-11-28 Thread Jonas Smedegaard
Quoting Thorsten Glaser (2014-11-28 13:20:36) On Fri, 28 Nov 2014, Thomas Goirand wrote: It's been a long time I've been thinking about it, and I believe that the only way to do this, would be to use triggers. Though I have never Look at libjs-protoaculous which combines prototype and

Javascript trigger design

2014-11-27 Thread Thomas Goirand
Hi, Web application have evolved into monsters that needs lots of javascript. It's very common that these javascript applications are collecting all the .js library they use, concatenate them into a single file, and compress the result using all sorts of tools (node uglify is one of the

Re: Javascript trigger design

2014-11-27 Thread Tomas Pospisek
Am 28.11.2014 um 00:04 schrieb Thomas Goirand: Hi, Web application have evolved into monsters that needs lots of javascript. It's very common that these javascript applications are collecting all the .js library they use, concatenate them into a single file, and compress the result using

Re: Javascript trigger design

2014-11-27 Thread olivier sallou
Le Fri Nov 28 2014 at 01:55:26, Tomas Pospisek t...@sourcepole.ch a écrit : Am 28.11.2014 um 00:04 schrieb Thomas Goirand: Hi, Web application have evolved into monsters that needs lots of javascript. It's very common that these javascript applications are collecting all the .js

Re: Javascript trigger design

2014-11-27 Thread Matthias Urlichs
Hi, Tomas Pospisek: At least the Ruby On Rails framework notices an updated JS and will re-compress the whole JS blob from its parts. Does it call stat() on every constituent of these packed JS files on every web request, or does it do that with a periodic background checker? In any case, I'd