Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to have a function be templateData #67

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

thejsj
Copy link

@thejsj thejsj commented Feb 13, 2016

This is useful if you want to use something dynamically generated during the build process and want to somehow do something with that. Here's an example:

        templateData: function () {
          var envConfig = require('./client/config/json/environment.json');
          return {
            version: version,
            env: envConfig.environment,
            commitHash: envConfig.commitHash,
            commitTime: envConfig.commitTime,
            apiHost: envConfig.host
          };
        },

Would be happy to add tests/documentation/w/e else is needed if you're interested in adding this in.

@patrickkettner
Copy link
Owner

Awesome!
Could you add a test for this, please?

@patrickkettner
Copy link
Owner

ping @thejsj

@thejsj
Copy link
Author

thejsj commented May 19, 2016

Let me see if I can take a look at this this weekend :)

@ahc-andrew
Copy link

I would love this functionality as well

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

Successfully merging this pull request may close these issues.

3 participants