Combining amber files into a single minified file

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Combining amber files into a single minified file

Kumar
Hi all,

I'm new to Amber and am quite excited to explore it in conjunction with Pharo.

Regarding deployment, it is good to have a single minified file like "amber_deploy.min.js"
to save space and number of http requests. This has been discussed here before, but 
I can't seem to get a clear solution from those threads. 

Given that amber is now using requirejs, I thought this ought to be easy and tried it myself. 

Here is the build result and instructions based on what worked for me -

https://github.com/srikumarks/amber-combined

The amber_helios.html and amber_devel.html can both be opened in a browser
and used. I haven't sorted out the webdav problem yet. It'll be nice to have a grunt
task or something to make these deployable files at any time during webdav-based
development. (I'm new to grunt as well, so lots to catch up here).

-Kumar

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Combining amber files into a single minified file

sebastianconcept
hey Sri,

I only combine for deploy (not development) so the IDE isn't there.

But yeah.. lately I was thinking that it might be appealing to have a dev combined for the stuff you need to develop on the server itself (social media apps for instance)

Anyway, when I combine I just:
1. take all the .deploy files and concatenate them in a new file named source.js
2. uglifyjs source.js into all1.js (where 1 is your next version name)
3. publish

Doing that from a simple bash script is comfortable enough for me

Looking forward for the next amber version with require, sounds exciting





On Nov 5, 2013, at 10:45 AM, Srikumar Subramanian <[hidden email]> wrote:

Hi all,

I'm new to Amber and am quite excited to explore it in conjunction with Pharo.

Regarding deployment, it is good to have a single minified file like "amber_deploy.min.js"
to save space and number of http requests. This has been discussed here before, but 
I can't seem to get a clear solution from those threads. 

Given that amber is now using requirejs, I thought this ought to be easy and tried it myself. 

Here is the build result and instructions based on what worked for me -

https://github.com/srikumarks/amber-combined

The amber_helios.html and amber_devel.html can both be opened in a browser
and used. I haven't sorted out the webdav problem yet. It'll be nice to have a grunt
task or something to make these deployable files at any time during webdav-based
development. (I'm new to grunt as well, so lots to catch up here).

-Kumar

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Combining amber files into a single minified file

Kumar
Hi Sebantian,

Thanks for replying.

Yes I did try the "concat all deploy files" approach, but for some reason that I couldn't dig into easily the system wouldn't start (got lots of "stack exceeded" errors). That was with the released amber version sans requirejs. So I just switched to the master branch and tried my luck with requirejs and it worked! With requirejs, I no longer needed to bother about loading files in the right dependency order, which I felt was the problem when I did the concat. Anyway, good times ahead indeed!

Btw I popped by your airflowing site and you say you pretty much developed the whole thing yourself (2k+ classes and 26k+ methods?!) and you use amber and pharo. Impressive! I've now landed on the same combo for my work which is like a wiki/shareboard for indian classical music notation and recordings. Do you have some kind of writeup or pointers on your current amber-pharo workflow and such tips? I'm somewhat new to both environments, but I do feel a nice impedance match with my brain, so am quite excited about this combo. Also, Helios is coming along nicely with great support for a keyboard centric workflow.

Best,
-Kumar

On Tuesday, November 5, 2013 9:27:00 PM UTC+5:30, Sebastian Sastre wrote:
hey Sri,

I only combine for deploy (not development) so the IDE isn't there.

But yeah.. lately I was thinking that it might be appealing to have a dev combined for the stuff you need to develop on the server itself (social media apps for instance)

Anyway, when I combine I just:
1. take all the .deploy files and concatenate them in a new file named source.js
2. uglifyjs source.js into all1.js (where 1 is your next version name)
3. publish

Doing that from a simple bash script is comfortable enough for me

Looking forward for the next amber version with require, sounds exciting





On Nov 5, 2013, at 10:45 AM, Srikumar Subramanian <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="RfL1IACCIoQJ">sriku...@...> wrote:

Hi all,

I'm new to Amber and am quite excited to explore it in conjunction with Pharo.

Regarding deployment, it is good to have a single minified file like "amber_deploy.min.js"
to save space and number of http requests. This has been discussed here before, but 
I can't seem to get a clear solution from those threads. 

Given that amber is now using requirejs, I thought this ought to be easy and tried it myself. 

Here is the build result and instructions based on what worked for me -

https://github.com/srikumarks/amber-combined

The amber_helios.html and amber_devel.html can both be opened in a browser
and used. I haven't sorted out the webdav problem yet. It'll be nice to have a grunt
task or something to make these deployable files at any time during webdav-based
development. (I'm new to grunt as well, so lots to catch up here).

-Kumar

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="RfL1IACCIoQJ">amber-lang+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Combining amber files into a single minified file

sebastianconcept
On Nov 9, 2013, at 10:24 AM, Srikumar Subramanian <[hidden email]> wrote:

Btw I popped by your airflowing site and you say you pretty much developed the whole thing yourself (2k+ classes and 26k+ methods?!) and you use amber and pharo. Impressive! I've now landed on the same combo for my work which is like a wiki/shareboard for indian classical music notation and recordings. Do you have some kind of writeup or pointers on your current amber-pharo workflow and such tips?


Too soon for tips I think. I'm still forming opinion on tips about Amber-Pharo workflow and I'm not with the latest Amber code. But feels great.

I suggest to keep and eye on the wiki plus asking here for those tips to the Amber's core devs

Guys any news on the next release?



--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Combining amber files into a single minified file

Manfred Kröhnert
In reply to this post by Kumar
Hi Kumar,

thanks for trying to minify the latest Amber with r.js.

As for the grunt based solution we already started discussing it here: https://github.com/amber-smalltalk/amber/issues/649.
This is using the `grunt-contrib-requirejs` plugin.
Once it is working correctly we will add it to the main Amber Gruntfile.
However, an end user should probably not be bothered to deal with grunt but just use the minified version.

Best,
Manfred





On Tue, Nov 5, 2013 at 1:45 PM, Srikumar Subramanian <[hidden email]> wrote:
Hi all,

I'm new to Amber and am quite excited to explore it in conjunction with Pharo.

Regarding deployment, it is good to have a single minified file like "amber_deploy.min.js"
to save space and number of http requests. This has been discussed here before, but 
I can't seem to get a clear solution from those threads. 

Given that amber is now using requirejs, I thought this ought to be easy and tried it myself. 

Here is the build result and instructions based on what worked for me -


The amber_helios.html and amber_devel.html can both be opened in a browser
and used. I haven't sorted out the webdav problem yet. It'll be nice to have a grunt
task or something to make these deployable files at any time during webdav-based
development. (I'm new to grunt as well, so lots to catch up here).

-Kumar

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Combining amber files into a single minified file

Manfred Kröhnert
In reply to this post by Kumar
Reply is inlined.


On Sat, Nov 9, 2013 at 1:24 PM, Srikumar Subramanian <[hidden email]> wrote:
Hi Sebantian,

Thanks for replying.

Yes I did try the "concat all deploy files" approach, but for some reason that I couldn't dig into easily the system wouldn't start (got lots of "stack exceeded" errors). That was with the released amber version sans requirejs. So I just switched to the master branch and tried my luck with requirejs and it worked! With requirejs, I no longer needed to bother about loading files in the right dependency order, which I felt was the problem when I did the concat. Anyway, good times ahead indeed!


Right, the 0.11.0 release is sensitive to changes in the load order of the JS files.


 
Btw I popped by your airflowing site and you say you pretty much developed the whole thing yourself (2k+ classes and 26k+ methods?!) and you use amber and pharo. Impressive! I've now landed on the same combo for my work which is like a wiki/shareboard for indian classical music notation and recordings. Do you have some kind of writeup or pointers on your current amber-pharo workflow and such tips? I'm somewhat new to both environments, but I do feel a nice impedance match with my brain, so am quite excited about this combo. Also, Helios is coming along nicely with great support for a keyboard centric workflow.

Best,
-Kumar

On Tuesday, November 5, 2013 9:27:00 PM UTC+5:30, Sebastian Sastre wrote:
hey Sri,

I only combine for deploy (not development) so the IDE isn't there.

But yeah.. lately I was thinking that it might be appealing to have a dev combined for the stuff you need to develop on the server itself (social media apps for instance)

Anyway, when I combine I just:
1. take all the .deploy files and concatenate them in a new file named source.js
2. uglifyjs source.js into all1.js (where 1 is your next version name)
3. publish

Doing that from a simple bash script is comfortable enough for me

Looking forward for the next amber version with require, sounds exciting





On Nov 5, 2013, at 10:45 AM, Srikumar Subramanian <[hidden email]> wrote:

Hi all,

I'm new to Amber and am quite excited to explore it in conjunction with Pharo.

Regarding deployment, it is good to have a single minified file like "amber_deploy.min.js"
to save space and number of http requests. This has been discussed here before, but 
I can't seem to get a clear solution from those threads. 

Given that amber is now using requirejs, I thought this ought to be easy and tried it myself. 

Here is the build result and instructions based on what worked for me -

https://github.com/srikumarks/amber-combined

The amber_helios.html and amber_devel.html can both be opened in a browser
and used. I haven't sorted out the webdav problem yet. It'll be nice to have a grunt
task or something to make these deployable files at any time during webdav-based
development. (I'm new to grunt as well, so lots to catch up here).

-Kumar

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to amber-lang+...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Combining amber files into a single minified file

Hannes Hirzel
In reply to this post by sebastianconcept
FYI

Below is another approach at creating an all-in-one-file as outlined
by Sebastian in November 2013.

Manual concatenation of files in the right order.

--HH


On 11/5/13, sebastian <[hidden email]> wrote:

> hey Sri,
>
> I only combine for deploy (not development) so the IDE isn't there.
>
> But yeah.. lately I was thinking that it might be appealing to have a dev
> combined for the stuff you need to develop on the server itself (social
> media apps for instance)
>
> Anyway, when I combine I just:
> 1. take all the .deploy files and concatenate them in a new file named
> source.js
> 2. uglifyjs source.js into all1.js (where 1 is your next version name)
> 3. publish
>
> Doing that from a simple bash script is comfortable enough for me
>
> Looking forward for the next amber version with require, sounds exciting
>
>
>
>
>
> On Nov 5, 2013, at 10:45 AM, Srikumar Subramanian <[hidden email]>
> wrote:
>
>> Hi all,
>>
>> I'm new to Amber and am quite excited to explore it in conjunction with
>> Pharo.
>>
>> Regarding deployment, it is good to have a single minified file like
>> "amber_deploy.min.js"
>> to save space and number of http requests. This has been discussed here
>> before, but
>> I can't seem to get a clear solution from those threads.
>>
>> Given that amber is now using requirejs, I thought this ought to be easy
>> and tried it myself.
>>
>> Here is the build result and instructions based on what worked for me -
>>
>> https://github.com/srikumarks/amber-combined
>>
>> The amber_helios.html and amber_devel.html can both be opened in a
>> browser
>> and used. I haven't sorted out the webdav problem yet. It'll be nice to
>> have a grunt
>> task or something to make these deployable files at any time during
>> webdav-based
>> development. (I'm new to grunt as well, so lots to catch up here).
>>
>> -Kumar
>>

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Combining amber files into a single minified file

sebastianconcept
I think it's time for us begung doing screencasts

It will accellerate our chances to catch up with the ass kickers out there

Cmon guys! time to hear your engRish on youtube! show us your Amber Rock And Roll

This afternoon I'll start publishing one about this

sebastian

o/

> On 05/04/2014, at 10:41, "H. Hirzel" <[hidden email]> wrote:
>
> FYI
>
> Below is another approach at creating an all-in-one-file as outlined
> by Sebastian in November 2013.
>
> Manual concatenation of files in the right order.
>
> --HH
>
>
>> On 11/5/13, sebastian <[hidden email]> wrote:
>> hey Sri,
>>
>> I only combine for deploy (not development) so the IDE isn't there.
>>
>> But yeah.. lately I was thinking that it might be appealing to have a dev
>> combined for the stuff you need to develop on the server itself (social
>> media apps for instance)
>>
>> Anyway, when I combine I just:
>> 1. take all the .deploy files and concatenate them in a new file named
>> source.js
>> 2. uglifyjs source.js into all1.js (where 1 is your next version name)
>> 3. publish
>>
>> Doing that from a simple bash script is comfortable enough for me
>>
>> Looking forward for the next amber version with require, sounds exciting
>>
>>
>>
>>
>>
>> On Nov 5, 2013, at 10:45 AM, Srikumar Subramanian <[hidden email]>
>> wrote:
>>
>>> Hi all,
>>>
>>> I'm new to Amber and am quite excited to explore it in conjunction with
>>> Pharo.
>>>
>>> Regarding deployment, it is good to have a single minified file like
>>> "amber_deploy.min.js"
>>> to save space and number of http requests. This has been discussed here
>>> before, but
>>> I can't seem to get a clear solution from those threads.
>>>
>>> Given that amber is now using requirejs, I thought this ought to be easy
>>> and tried it myself.
>>>
>>> Here is the build result and instructions based on what worked for me -
>>>
>>> https://github.com/srikumarks/amber-combined
>>>
>>> The amber_helios.html and amber_devel.html can both be opened in a
>>> browser
>>> and used. I haven't sorted out the webdav problem yet. It'll be nice to
>>> have a grunt
>>> task or something to make these deployable files at any time during
>>> webdav-based
>>> development. (I'm new to grunt as well, so lots to catch up here).
>>>
>>> -Kumar
>
> --
> You received this message because you are subscribed to the Google Groups "amber-lang" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.