On Aug 18, 2005, at 5:59 PM, Michael Schuerig wrote:> I''m currently working on my first generator(s). One of them has
the
> sole
> purpose of providing assets such as images, javascripts, and
> stylesheets to an application. For these assets I''d like to have
an
> option to not copy them, but instead create symbolic links to their
> original location. In the generator sources I haven''t seen any
support
> for this, but I may have missed it.
>
> I''m considering writing a patch that adds the functionality
> to ...::Commands::Create#file. Has anyone done this already? Does
> anyone think it would be a bad idea anyway?
You can add symlink methods with appropriate implementations to each
command class. Just reopen the classes in your generator. Then use
conditionals when you build your manifest to determine whether to copy
or symlink.
I think adding a symlink option to the file method is okay too, but it
takes a bit more work.
Best,
jeremy