benbjohnson/ego — pull request #7 by benbjohnson (2014-05-15 18:22:06+00:00)
Title: Consolidate output to a per-package files.

## Overview

Previously, ego would generate a single `.ego.go` file for every `.ego` template that it found. This makes for a lot of output files. This commit changes the functionality so that ego generates a single `ego.go` file per package.

Source map line pragmas (e.g. `//line orig.ego:10`) still exist so errors will still be mapped correctly.

## Caveats

- Imports are now parsed from each `<%% ... %%>` block and consolidated into a single import block. This means that different imports with the same name are not allowed. Although, that's just a bad idea anyway.

- Packages are required to be named the same as the folder name they're in. You can no longer specify a package name in your `<%% ... %%>` blocks. This is the recommended Go style so I don't think this is a problem.

---

/cc @boourns