[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Replacing Bower with "guix environment"
From: |
Christopher Allan Webber |
Subject: |
Re: Replacing Bower with "guix environment" |
Date: |
Thu, 30 Apr 2015 11:40:08 -0500 |
Ludovic Courtès writes:
> Christopher Allan Webber <address@hidden> skribis:
>
>> - The "hip new way" of doing things is to use Bower. Bower is a
>> package manager, but it's made specifically for static assets served
>> to the user, such as css files, fonts, javascript like jquery, etc.
>> Bower also puts these in an extlib/ or whatever, but it puts them in
>> that place *for* you.
>
> Interesting.
>
> (Thinking out lout.)
>
> Just like ‘guix system vm’ returns a script that runs QEMU with the
> right arguments, one could imagine generating a script that copies
> dependencies in the right place maybe?
>
> (define (make-installer assets)
> (gexp->script "copy-assets"
> #~(begin
> (for-each copy-file 'address@hidden)
> ...)))
>
> (This could/should be turned into a package object so that adding it as
> an input would drop it in $PATH.)
>
> The developer would have to explicitly run that script to have the files
> copied under extlib/.
>
> Alternately one could generate a script that directly runs some http
> server with the right parameters so that it finds CSS files, JS files,
> etc.
>
> Does that make sense?
>
> Ludo’.
That's a very interesting idea! (Conveniently, I just gave "guix system
vm" a test yesterday! :))
It makes sense to me, I think. I'd like to give it a try... I need to
understand gexps better I suppose :)