[Seaside] Thank you to whoever wrote ...WAFileMetadataDerivedFileLibrary recursivelyAddAllFilesIn: '/my/path/to/foo'

Jupiter Jones jupiter.jones at mail.com
Mon Mar 19 22:20:08 UTC 2018


It’s kinda dependent on the project you’re importing and there doesn’t seem to be a standard directory structure for full and minified distributions.

I typically write a #updateLibraryFromDisc method in MyDevelopmentFileLibrary and MyDeploymentLibrary that hard codes the distribution root and then loads the appropriate files into the FileLibrary.

I often find that there are a bunch of supporting files in the full distribution that you don’t need/want in the FileLibrary so a recursive load leaves you with a much larger class. One issue I come across often are very large image files and archives not used in production, but included in the distribution. Apart from the unnecessary image bloat if these files are added to the FileLibrary, if the files were large enough they caused OutOfMemory errors when loading into lean GemStone - which required updating configuration files and restarting Gems simply to load a jQuery library.

The choices you’re left with are:

1. Clean up the distribution before importing. Downside is you need to do this every time you pull changes from upstream.
2  specifically load only the bits you need. Downside is maintaining the #uploadLibraryFromDisc method that does this.
3. recursively add everything in #updateLibraryFromDisc then remove the unnecessary methods. Downside  is maintaining the #uploadLibraryFromDisc method that does this.

I typically use 2 or 3 depending on the project.

If anyone has a better solution, I’d love to know too :)

Cheers,

J

> On 20 Mar 2018, at 12:10 am, Esteban A. Maringolo <emaringolo at gmail.com> wrote:
> 
> Yes, it certainly is.
> 
> I've been importing a few libraries for a recent project, and one
> thing I find time consuming is the separation of "minified" versions
> into the "Development" and "Deployment" subclasses of the library.
> 
> Did anybody already implemented an importer that takes care of that?
> 
> Regards!
> 
> 
> Esteban A. Maringolo
> 
> 
> 2018-03-17 5:14 GMT-03:00 gettimothy <gettimothy at zoho.com>:
>> 
>> Thank you!
>> 
>> Huge timesaver
>> 
>> 
>> 
>> 
>> _______________________________________________
>> seaside mailing list
>> seaside at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>> 
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



More information about the seaside mailing list