Best practices!

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

Re: Best practices!

laci
Nico,
It would be great if you could describe in the amber documentation best practise for deployment.
There are three sets of files: amber code, own packages and third-party javascript libraries.
Would it make sense to create with grunt a concatenated and minified package for these three set of packages?

In the past the approach was to create single javascript file, combining amber and own packages into one file. With AMD single file is no longer the preferred option. Please comment.
Reply | Threaded
Open this post in threaded view
|

Re: Best practices!

laci
Just as you suggested I am copying with grunt into development branch the files needed for "require(['amber/deploy'],":

deploy.js, helpers.js, jquery.min.js

Kernel-Objects.js, Kernel-Classes.js, Kernel-Methods.js, Kernel-Collections.js, Kernel-Infrastructure.js, Kernel-Exceptions.js, Kernel-Transcript.js, Kernel-Announcements.js, Canvas.js

smalltalk.js, globals.js, nil.js, _st.js, boot.js, browser-compatibility.js, ensure-console.js

es5-shim.min.js, es5-sham.min.js



Reply | Threaded
Open this post in threaded view
|

Re: Best practices!

Nicolas Petton
In reply to this post by laci

Hi!

> Nico,
> It would be great if you could describe in the amber documentation best
> practise for deployment.

Yes, that's planned as part of the new documentation effort :)

> There are three sets of files: amber code, own packages and third-party
> javascript libraries.
> Would it make sense to create with grunt a concatenated and minified package
> for these three set of packages?

Yes, if you like grunt, it can be a very good way to create the
deployment file.

>
> In the past the approach was to create single javascript file, combining
> amber and own packages into one file. With AMD single file is no longer the
> preferred option. Please comment.

As I replied in another thread, using r.js from requirejs.org is IMHO
the best way to create the deployment file, it will also minify it for
you using uglify.js. The only thing that I'd like to see in Amber's IDE
is an automated way to commit packages with comments and source code
stripped.

Hope this helps,
Nico

>
>
>
>
> --
> View this message in context: http://forum.world.st/Best-practices-tp4736458p4740930.html
> Sent from the Amber Smalltalk mailing list archive at Nabble.com.


--
Nicolas Petton
http://nicolas-petton.fr

--
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.
12