jpettersson/lingon — pull request #43 by jpettersson (2014-06-25 08:24:20+00:00)
Title: Consistent filename rewrites

Today we rely on the gulp plugins to rename files properly. For instance, the `gulp-less` module renames the extension `.less` to `.css` after processing the file. Since not all gulp plugins do this we've had inconsistent behaviors: the `gulp-ejs` module does not rename the file, so the outputted file will still have the `.ejs` extension.

In this PR I've rewritten the core to do disregard the filenames coming from the gulp plugins. Instead I deduce the destination name based on the source filename. This is done by keeping a map of source->destination file extensions. There's a default map inside core (much like the default pipes map) that can be appended to by the user. The default map contains the necessary extension mappings for the built in functionality: less, ejs. Right now it also has support for: md, ngt. We should evaluate putting all relevant mappings in this file, since the list will be pretty small.