Skip to content

Commit

Permalink
add render and deploy npm commands
Browse files Browse the repository at this point in the history
  • Loading branch information
max-mapper committed Jan 9, 2015
1 parent 612abd3 commit f7b9be6
Show file tree
Hide file tree
Showing 7 changed files with 405 additions and 1,024 deletions.
2 changes: 2 additions & 0 deletions .gitignore
@@ -0,0 +1,2 @@
node_modules
index.html
328 changes: 312 additions & 16 deletions README.md

Large diffs are not rendered by default.

395 changes: 0 additions & 395 deletions dynamic.html

This file was deleted.

613 changes: 0 additions & 613 deletions index.html

This file was deleted.

50 changes: 50 additions & 0 deletions index.mustache
@@ -0,0 +1,50 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<title>JavaScript for Cats</title>

<link rel="stylesheet" href="stylesheets/style.css">
<link rel="stylesheet" href="stylesheets/rainbow.github.css">

<meta name="viewport" content="width=device-width, initial-scale=1">
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
<div id="container">
<div id="main">
<div id="post" class="sticky-menu">
<div class="inner clearfix">
<div class="document prose">
<div class="surface preview">
<div class="content-preview-wrapper">
<div class="content-preview">
<div class="post-content" style="white-space: normal;">
{{{content}}}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-34180924-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>

</body>
</html>
34 changes: 34 additions & 0 deletions package.json
@@ -0,0 +1,34 @@
{
"name": "javascript-for-cats",
"version": "1.0.0",
"description": "javascript for cats",
"main": "build.js",
"scripts": {
"render": "node render.js",
"deploy": "gh-pages-deploy"
},
"repository": {
"type": "git",
"url": "https://github.com/maxogden/javascript-for-cats.git"
},
"gh-pages-deploy": {
"prep": [
"build",
"render"
],
"noprompt": "true"
},
"author": "max ogden",
"license": "BSD",
"bugs": {
"url": "https://github.com/maxogden/javascript-for-cats/issues"
},
"homepage": "https://github.com/maxogden/javascript-for-cats",
"dependencies": {
"marked": "^0.3.2",
"mustache": "^1.0.0"
},
"devDependencies": {
"gh-pages-deploy": "^0.1.1"
}
}
7 changes: 7 additions & 0 deletions render.js
@@ -0,0 +1,7 @@
var fs = require('fs')
var marked = require('marked')
var mustache = require('mustache')

var template = fs.readFileSync('./index.mustache').toString()
var readme = fs.readFileSync('./README.md').toString()
fs.writeFileSync('./index.html', mustache.render(template, {content: marked(readme)}))

0 comments on commit f7b9be6

Please sign in to comment.