Skip to content

add sort option#54

Closed
Daley wants to merge 2 commits into
expressjs:masterfrom
Daley:master
Closed

add sort option#54
Daley wants to merge 2 commits into
expressjs:masterfrom
Daley:master

Conversation

@Daley

@Daley Daley commented May 18, 2016

Copy link
Copy Markdown

app.use('/', serveIndex("dir", {'icons': true,sort:serveIndex.fileSortWithMTime}));

@dougwilson dougwilson added the pr label Jun 16, 2016
@dougwilson dougwilson self-assigned this Jun 16, 2016
@dougwilson

Copy link
Copy Markdown
Contributor

Hi @Daley, thanks for your pull request! There is another one before your PR, can you explain the differences between that one and this one?

Comment thread package.json
"name": "serve-index",
"description": "Serve directory listings",
"version": "1.7.3",
"version": "1.7.4",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please undo this version bump.

@mrv777

mrv777 commented Apr 21, 2017

Copy link
Copy Markdown

#41 seems to sort by a function that is passed. This one just adds the sort by modified date. This one is simpler and the other is more versatile.
I prefer this one for simplicity and can code other sort functions as suggested by the author instead of making the user provide it.

It's up to you, but I think this function is very much needed

@baihe

baihe commented Aug 7, 2017

Copy link
Copy Markdown

Will this be merged ?
Thanks

@roy7

roy7 commented Oct 24, 2017

Copy link
Copy Markdown

It'd be awesome if you could merge in one of the two sort solutions. :)

@dougwilson

Copy link
Copy Markdown
Contributor

I at least need the PR updated with the change request I made. Since I requested the change a year ago and the PR still hasn't been updated, I'm just going to close it. Someone can always open a new PR if they are interested in picking it up and making any changes from review feedback.

@dougwilson dougwilson closed this Oct 24, 2017
@roy7

roy7 commented Oct 25, 2017

Copy link
Copy Markdown

Ah ok, bummer @mrv777 didn't make that correction for you.

Since I only needed sorting myself for a specific one-off project, I just manually changed fileSort to the code he used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants