Skip to content

Commit

Permalink
Merge pull request #74 from hannu/remove-output-config
Browse files Browse the repository at this point in the history
Do not reveal output path to public configuration
  • Loading branch information
varya committed Oct 16, 2014
2 parents 27ea7b3 + cb3acca commit 6bd5011
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
3 changes: 3 additions & 0 deletions lib/styleguide.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ module.exports = function(opt) {
// Store settings inside the styleguide JSON
styleguide.config = opt;

// Do not add output path to configuration
delete styleguide.config.outputPath

// If settings file is found, generate settings object
if (settingsStr) {
styleguide.config.settings = parseSettings(settingsStr);
Expand Down
10 changes: 7 additions & 3 deletions test/structure.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ var gulp = require('gulp'),
};

chai.config.includeStack = true;
chai.should();
var should = chai.should();

function styleguideStream() {
return gulp.src(data.source.css)
Expand Down Expand Up @@ -150,7 +150,11 @@ describe('styleguide.json', function() {
jsonData.config.title.should.eql('Test Styleguide');
});

it('should contain outputPath', function() {
jsonData.config.outputPath.should.eql(data.output);
it('should contain correct appRoot', function() {
jsonData.config.appRoot.should.eql('/my-styleguide-book');
});

it('should not reveal outputPath', function() {
should.not.exist(jsonData.config.outputPath);
});
});

0 comments on commit 6bd5011

Please sign in to comment.