styledocco
Advanced tools
Comparing version 0.2.1 to 0.2.2
@@ -45,7 +45,12 @@ (function() { | ||
findFile = function(dir, re) { | ||
var _ref; | ||
var file, _ref; | ||
if (!fs.statSync(dir).isDirectory()) return null; | ||
return (_ref = fs.readdirSync(dir).filter(function(file) { | ||
file = (_ref = fs.readdirSync(dir).filter(function(file) { | ||
return file.match(re); | ||
})) != null ? _ref[0] : void 0; | ||
if (file != null) { | ||
return path.join(dir, file); | ||
} else { | ||
return null; | ||
} | ||
}; | ||
@@ -55,7 +60,8 @@ | ||
var dest, lang, render; | ||
dest = _.makeDestination(source.replace(/readme/i, 'index')); | ||
if (source.match(/readme/i)) source = 'index.html'; | ||
dest = _.makeDestination(source); | ||
data.project = { | ||
name: options.name, | ||
menu: menu, | ||
root: _.buildRootPath(source.replace(/readme/i, 'index')) | ||
root: _.buildRootPath(source) | ||
}; | ||
@@ -62,0 +68,0 @@ render = function(data) { |
@@ -64,4 +64,4 @@ (function() { | ||
type: 'html', | ||
text: "<div class=\"styledocco-example\">" + token.text + "</div>", | ||
pre: false | ||
pre: true, | ||
text: "<div class=\"styledocco-example\">" + token.text + "</div>" | ||
}); | ||
@@ -68,0 +68,0 @@ token.text = highlight.highlightAuto(token.text).value; |
@@ -9,3 +9,3 @@ { | ||
"author": "Jacob Rask <jacob@jacobrask.net>", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"homepage": "http://jacobrask.github.com/styledocco/", | ||
@@ -12,0 +12,0 @@ "licenses": [ |
@@ -39,3 +39,3 @@ ``` | ||
* `--out`, `-o` Output directory *(default: "docs")* | ||
* `--tmpl` Directory for custom `index.jade` and `docs.jade` templates *(optional)* | ||
* `--tmpl` Directory for custom `docs.jade` template *(optional)* | ||
* `--overwrite` Overwrite existing files (`docs.css`) in target directory. | ||
@@ -46,6 +46,6 @@ | ||
/* Provides extra visual weight and identifies the primary action in a set of buttons | ||
``` | ||
<button class="btn primary">Primary</button> | ||
``` */ | ||
/* | ||
<button class="btn primary">Primary</button> | ||
Provides extra visual weight and identifies the primary action in a set of buttons. */ | ||
.btn.primary { | ||
@@ -52,0 +52,0 @@ background: blue; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
249299
40
1514