-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
90 additions
and
196 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
|
||
module.exports = function(grunt) { | ||
|
||
grunt.initConfig({ | ||
|
||
htmlConvert: { | ||
options: { | ||
base: '', | ||
prefix: 'Riot.templateCache = (function(){\n\n', | ||
suffix: ' return mytemplate;\n})();\n' | ||
}, | ||
mytemplate: { | ||
src: ['elements/**/*.html'], | ||
dest: 'elements/template-cache.js' | ||
}, | ||
}, | ||
|
||
}); | ||
|
||
grunt.loadNpmTasks('grunt-html-convert'); | ||
}; |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
Riot.templateCache = (function(){ | ||
|
||
var mytemplate = {}; | ||
|
||
mytemplate["elements/test-template.html"] = "<test-template-from-url>\n" + | ||
" <div>template from URL</div>\n" + | ||
"</test-template-from-url>"; | ||
|
||
mytemplate["elements/timer.html"] = "<timer>\n" + | ||
" <style scoped>\n" + | ||
" .bolded {\n" + | ||
" font-weight: bolder;\n" + | ||
" font-size: large;\n" + | ||
" }\n" + | ||
" </style>\n" + | ||
" <div>\n" + | ||
" timer: <span class=\"bolded\">{{ time }}</span><br>\n" + | ||
" trasclusion is '<yield />'<br>\n" + | ||
" <div each=\"{{el in mylist}}\">iterating over array item \"{{el}}\"<br></div>\n" + | ||
" <div>this is from timer.html file!</div>\n" + | ||
" </div>\n" + | ||
"</timer>\n" + | ||
""; | ||
return mytemplate; | ||
})(); |
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.