Adding ability to compile a resource as a template