Last active
October 18, 2016 13:39
-
-
Save simonmcmanus/17e23f4bb3c3cd9e0afdcf09e11b226e 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
if ('serviceWorker' in navigator) { | |
navigator.serviceWorker.register('/service-worker.js'); | |
} else { | |
appCacheNanny.start() | |
} | |
appCacheNanny.on('updateready', function () { | |
location.reload() | |
}) |
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
var output = sizlate.render($('div#example'), { ‘h1’: ‘Goodbye’}); |
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
<div> | |
<h1>Goodbye</h1> | |
</div> |
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
var sizlate = require('sizlate'); | |
var html = '<div id="example"><h1>hello</h1></div>'; | |
var output = sizlate.render(html, { ‘h1’: ‘Goodbye’}); | |
// output = <div id="example"><h1>Goodbye</h1></div> |
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
module.exports = { | |
'/': { | |
page: 'home' | |
}, | |
'/contact': { | |
page: 'contact' | |
} | |
}; |
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
module.exports = { | |
'/': { | |
page: 'home', | |
selectors: { | |
title: 'Welcome Home!', | |
h1:'HOME' | |
} | |
}, | |
'/contact': { | |
page: 'contact', | |
selectors: { | |
title: 'contact page', | |
h1:'Contact' | |
}, | |
spec: { | |
'#details': { | |
component: 'contact', | |
data: [ | |
{ li: '0207-000-000' }, | |
{ li: '[email protected]' } | |
] | |
} | |
} | |
} | |
}; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment