-
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
In theory it would be cool if we could infer some properties about the project automatically to offer them as variables in the template
for instance given the following PHP project (this is similar in Clojure, Java, etc)
|-- composer.json
|-- src/
|---- App.php
|---- Models/
|-------- Post.php
we can have the root namespace set to MyCompany\\MyProject\\" at src`` in the composer.json
if we now do:
$ tmplr src/Models/Tag.phpwe could theoretically infer from a) the file ending (.php) that this is presumably a .php project and therefore parse the composer.json for the root namespace and offer the full namespace in the template
<?php
namespace {{.php.namespace}};
class {{.name}} {
}This might be a cool feature, although people would have to implement the language features they care about themselves
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request