Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding template, suggessted fix for @Earl-Brown #990

Closed
wants to merge 12 commits into from

Conversation

gottaloveit
Copy link
Contributor

No description provided.

@dougwilson
Copy link
Contributor

Adding template to the options object needs to have it documented in the JSDoc above the function. Also, there are no tests anywhere to accept these PRs, btw.

@@ -72,7 +72,8 @@ exports = module.exports = function directory(root, options){
, icons = options.icons
, view = options.view || 'tiles'
, filter = options.filter
, root = normalize(root + sep);
, root = normalize(root + sep)
, template = options.template || __dirname + '/../public/directory.html';;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an extraneous semi-colon on this line.

@gottaloveit
Copy link
Contributor Author

my bad .. haste with copy/paste since at first was just suggesting. working on the test now.

@gottaloveit
Copy link
Contributor Author

@dougwilson I hope I did that right

@dougwilson
Copy link
Contributor

A test you added doesn't pass. You can see the output at https://travis-ci.org/senchalabs/connect/jobs/16282820

@@ -118,6 +117,26 @@ describe('directory()', function(){
});
});

describe('when setting a custom template', function () {
var app = connect(connect.directory('test/fixtures'),{template: __dirname + '/shared/template.html'});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The second closing parenthesis is in the wrong location.

@gottaloveit
Copy link
Contributor Author

@dougwilson good to go

@dougwilson
Copy link
Contributor

Great. I'll merge it in in a bit.

@gottaloveit
Copy link
Contributor Author

@dougwilson just wondering when you might get a chance to merge this? i especially would love to have this for the project i'm working on. i appreciate it.

@dougwilson
Copy link
Contributor

Soon. I have to add documentation on how to actually use the template option (like what the placeholders are and what they are replaced with) first.

@dougwilson dougwilson closed this in 99b9feb Jan 3, 2014
@@ -72,7 +72,8 @@ exports = module.exports = function directory(root, options){
, icons = options.icons
, view = options.view || 'tiles'
, filter = options.filter
, root = normalize(root + sep);
, root = normalize(root + sep)
, template = options.template || __dirname + '/../public/directory.html';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this going to work in windows? one of these windows people are going to complain eventually...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants