Permalink
Browse files

fixes

  • Loading branch information...
1 parent 486b9d0 commit d9333a345880ecbe7fc967bbea470618b604339c @jgallen23 committed Apr 23, 2012
View
@@ -1,3 +1 @@
node_modules
-dist
-index.html
View
@@ -1,9 +1,12 @@
+run: install
+
install: clean
@git submodule update --init
@npm install
@mkdir dist
@mkdir dist/images
- @cp -r ui/hubinfo/images/* dist/images
+ @cp -r ui/hubinfo/images/* ui/images
+ @cp -r ui/images/* dist/images
clean:
@rm -rf dist
View
@@ -1,3 +1,5 @@
+#!/usr/bin/env node
+
var program = require('commander');
var fs = require('fs');
var path = require('path');
@@ -10,16 +12,17 @@ program
.usage('[options] <file>')
.option('-o, --output <dir>', 'directory to write all assets')
.option('-p, --preview <port>', 'start server to preview')
- .option('-t, --title', 'page title')
- .option('-u, --user', 'github user')
- .option('-r, --repo', 'github repo')
+ .option('-t, --title <title>', 'page title')
+ .option('-u, --user <user>', 'github user')
+ .option('-r, --repo <repo>', 'github repo')
.option('-d, --debug', 'use this option if you are building new templates')
+ .option('-b, --build', 'use this option if you need to rebuild the assets')
.parse(process.argv);
var files = program.args;
-if (files.length == 1) {
+if (program.build || files.length == 1) {
var file = files[0];
var assets = path.join(__dirname, '../');
var output = program.output || process.cwd();
@@ -65,7 +68,7 @@ if (files.length == 1) {
//copy images
if (!program.preview) {
- var imgSrc = path.join(assets, 'ui/hubinfo/images');
+ var imgSrc = path.join(assets, 'dist/images');
var imgDest = path.join(options.masher.publicPath, options.masher.outputDir, 'images');
exec('mkdir -p '+ imgDest + ' && cp -r ' + imgSrc + '/* ' + imgDest);
}
@@ -78,7 +81,8 @@ if (files.length == 1) {
options.masher.debug = true;
}
- if (options.preview) {
+ if (options.build) {
+ } else if (options.preview) {
markx.preview(file, options);
} else {
markx.convert(file, options, function(out) {
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
@@ -12,7 +12,7 @@ html
div#toc
if user && repo
a(href="http://github.com/#{user}/#{repo}")
- img(style="position: absolute; top: 0; right: 0; border: 0;",src="https://a248.e.akamai.net/assets.github.com/img/7afbc8b248c68eb468279e8c17986ad46549fb71/687474703a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67",alt="Fork me on GitHub")
+ img(style="position: absolute; top: 0; right: 0; border: 0;",src="dist/images/ribbon.png",alt="Fork me on GitHub")
div#wrapper
!= body
!= masher.script('common')
View
@@ -53,6 +53,10 @@ small, aside {
font-size: 10px;
}
+code {
+ word-wrap: break-word;
+}
+
#toc {
top: 0px;
left: 0px;
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
@@ -1 +1 @@
-{"common":{"script":"dist/common-bb2ec22a.js","style":"dist/common-203bbc41.css"}}
+{"common":{"script":"dist/common-bb2ec22a.js","style":"dist/common-8535402c.css"}}

0 comments on commit d9333a3

Please sign in to comment.