Skip to content

Commit b38ed47

Browse files
committed
makes the dev build work again
1 parent 6c34d3c commit b38ed47

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

build/make_default_helpers.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,9 @@ module.exports = function(docMap, config, getCurrent, Handlebars){
420420
var root = docMap[config.parent];
421421
return (root.title || root.name)+ " - "+(this.title || this.name);
422422
},
423+
siteConfig: function(key){
424+
return _.get(config, key);
425+
},
423426
docObjectString: function(){
424427
this.pathToRoot = pathToRoot(this.name);
425428

html_test.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@ describe("documentjs/lib/generators/html", function(){
4545
if(fs.existsSync(path.join(__dirname, "test", "tmp", "static", "bundles", "static.js"))) {
4646
throw new Error("static build exists");
4747
}
48+
return readFile(path.join(__dirname, "test", "tmp","index.html")).then(function(source){
49+
if(/node_modules\/steal/.test(source.toString())) {
50+
51+
} else {
52+
throw new Error("no node_modules/steal")
53+
}
54+
})
4855
});
4956
});
5057
});

site/default/templates/layout.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
var docObject = {{{docObjectString}}};
2020
</script>
2121

22-
{{#if devBuild}}
22+
{{#if (siteConfig "devBuild")}}
2323
<script type='text/javascript'
2424
data-main="bit-docs-site/static"
2525
src="./static/node_modules/steal/steal.js"></script>

0 commit comments

Comments
 (0)