Last active
November 6, 2015 12:04
-
-
Save craigtaub/2172633a35223d904b2a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| +someFile.js | |
| let submitButton = require('submitButton'); | |
| let markup = submitButton.present(params); | |
| $form.html(markup); | |
| +SubmitButton.js | |
| let template = 'views/partials/submit.mustache' | |
| let mustache = require('mustache'); | |
| function mangle(rawData) { | |
| let viewData = {}; | |
| .. | |
| return viewData; | |
| } | |
| export { | |
| present: function (rawData) { | |
| return mustache.render(template, mangle(rawData)); | |
| } | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment