[Seaside] Is there a way to autogenerate WAFileMetadataLibrary based on a directory?

Gabriel Cotelli g.cotelli at mercapsoftware.com
Fri Aug 18 17:14:07 UTC 2017


Mariano, in case you were planning to deploy it on Windows you will need
this changes: https://github.com/SeasideSt/Seaside/pull/944 . For Linux or
Mac the deployment will work with the current code.

On Fri, Aug 18, 2017 at 11:12 AM, Mariano Martinez Peck <
marianopeck at gmail.com> wrote:

>
>
> On Fri, Aug 18, 2017 at 10:02 AM, Thomas Brodt <
> thomas.brodt.lists at porabo.ch> wrote:
>
>> There is
>>
>> WAFileMetadataLibrary recursivelyAddAllFilesIn: aPathString
>> which imports a directory structure. Invoke that from your library class.
>> Have you tried that?
>>
>>
> Thanks!!!!!!
> That was exactly what I was looing for!.
>
>
>
>> HTH
>> Thomas
>>
>>
>> Am 18.08.2017 um 14:24 schrieb Mariano Martinez Peck:
>>
>> Hi guys,
>>
>> I see some libraries using WAFileMetadataLibrary subclasses. For example,
>> Code Mirror. I have copied it's design, but have to manually create all the
>> intermediate methods such as:
>>
>> themesdarkCss
>> ^ WAFileLibraryResource
>> filepath: 'themes/dark.css'
>> mimeType: (WAMimeType main: 'text' sub: 'css')
>> cacheDuration: (Duration days: 0 hours: 0 minutes: 30 seconds: 0)
>> contents: (GRDelayedSend receiver: self selector: #themedarkCssContent)
>>
>>
>> Aside from that, I also must keep a #fill kind of class side method where
>> I autogenerate the contents for each file...something like this:
>>
>> themes := basePath , 'themes/'.
>> self faAddFileAt:  themes, 'dark.css' selector: (#theme ,
>> #darkCssContent) asSymbol.
>>
>>
>> So....it's really a pain when I have to wrap a big library that has many
>> images, javascript and css files split across different directories etc.
>>
>> Is there a way to autogenerate this WAFileMetadataLibrary subclass with
>> all methods created? Something like:
>>
>> WAFileMetadataLibrary autogenerateFrom: ''/Users/mariano/myLibrary/'
>> into: MyLibraryFilelibrary.
>>
>> Thanks in advance,
>>
>>
>> --
>> Mariano
>> http://marianopeck.wordpress.com
>>
>>
>> _______________________________________________
>> seaside mailing listseaside at lists.squeakfoundation.orghttp://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
>>
>>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>


-- 


------------------------------
Gabriel O. Cotelli
Desarrollo y TecnologĂ­a
Mercap
Tel: +54 (011) *5352.2372 al 74*
http://www.mercapsoftware.com
This message is confidential. It may also contain information that is
privileged or otherwise legally exempt from disclosure. If you have
received it by mistake please let us know by e-mail immediately and
delete it from your system; also you shouldn't copy the message nor
disclose its contents to anyone. Thanks.
------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/seaside/attachments/20170818/9a38f601/attachment-0001.html>


More information about the seaside mailing list