Last active
August 29, 2015 14:14
-
-
Save 59naga/dfa44e74da7b3fdc858c to your computer and use it in GitHub Desktop.
Magatama.jsがリリースされたので使ってみる ref: http://qiita.com/59naga/items/c23508ef920fd1c458b0
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
<meta charset="UTF-8"><script src="https://cdn.rawgit.com/59naga/magatama/master/magatama.min.js"></script><!-- | |
- var pageTitle= "Magatama is self compiling of jade." | |
doctype html | |
html(lang="en") | |
head | |
meta(charset="UTF-8") | |
title= pageTitle | |
body | |
h1= pageTitle |
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
- var pageTitle= "Jade - node template engine" | |
doctype html | |
html(lang="en") | |
head | |
meta(charset="UTF-8") | |
title= pageTitle | |
body | |
h1= pageTitle |
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
<script src="jade.js"></script> | |
<script> | |
window.onload=function(){ | |
var jade= require('jade'); | |
var begin= atob('PCEtLQ=='); | |
var end= /-->$/ | |
var source= document.head.innerHTML; | |
var source= source.slice(source.indexOf(begin)+begin.length).replace(end,''); | |
document.write(jade.render(source)); | |
} | |
</script><!-- | |
- var pageTitle= "Jade - node template engine" | |
doctype html | |
html(lang="en") | |
head | |
meta(charset="UTF-8") | |
title= pageTitle | |
body | |
h1= pageTitle |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment