Skip to content
This repository has been archived by the owner on Jun 10, 2018. It is now read-only.

Can't use a unique key for the compiled js object #61

Open
jophde opened this issue Apr 12, 2013 · 0 comments
Open

Can't use a unique key for the compiled js object #61

jophde opened this issue Apr 12, 2013 · 0 comments

Comments

@jophde
Copy link

jophde commented Apr 12, 2013

I would like to be able to have subdirectories in my template directory based on the resources in my app. Within each resource directory there would be eco templates such as index.html.eco, show.html.eco, etc. I made a script that can find all the eco files recursively in the template directory however anything with the same file name gets overwritten in the ecoTemplate object. Is their a way to change the generation of the key for the object to include some name spacing base on the directory the template is in?

Templates -->
  User -> 
    index.html.eco

  Post ->
    index.html.eco

#! /bin/bash

find src/templates -type f -name *.eco -exec eco -o www/js/eco {} \;
cat www/js/eco/* > vendors/templates.js

This will cause templates.js to only one ecoTemplates["index.html"] since the index.eco.js is overwritten in www/js/eco.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant