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

Ensure middleware functions are named #5366

Merged
merged 1 commit into from
Jun 3, 2015

Conversation

ErisDS
Copy link
Member

@ErisDS ErisDS commented May 30, 2015

This pretty boring PR is the result of me looking to refactor various bits of the frontend. I've been playing around with our middleware stack and looking for ways to test and see how it behaves with different changes. To do this, it's much easier if all of the middleware functions are named.

Where I've touched a file, I've named all of the anonymous functions in that file. I have looked to enable this jscs rule: http://jscs.info/rule/disallowAnonymousFunctions.html, but there are thousands of anonymous functions in the codebase, so that's a pretty long job. Long term I think it is worthwhile, as it will aid with other tasks like debugging & optimising memory usage.

If you're interested, this is what I've been using to print out the middleware stack and take a look at it: https://gist.github.com/ErisDS/2fec0b64f28a945cb8d4

refs #5091

  • adds names to all middlware functions, for debugging purposes

@ErisDS ErisDS changed the title Ensure middleware functions are named [WIP] Ensure middleware functions are named May 30, 2015
@ErisDS
Copy link
Member Author

ErisDS commented May 30, 2015

Marked as WIP because #5353 should be merged first so I do any rebasing that's needed ;)

@ErisDS ErisDS force-pushed the anon-middleware branch from a9fd2dd to 9e7002c Compare June 2, 2015 13:23
refs TryGhost#5091

- adds names to all middleware functions, for debugging purposes
@ErisDS ErisDS force-pushed the anon-middleware branch from 9e7002c to 7eacd28 Compare June 2, 2015 13:49
@ErisDS ErisDS changed the title [WIP] Ensure middleware functions are named Ensure middleware functions are named Jun 2, 2015
@ErisDS
Copy link
Member Author

ErisDS commented Jun 2, 2015

Right this one is de-WIP'd now

jaswilli added a commit that referenced this pull request Jun 3, 2015
Ensure middleware functions are named
@jaswilli jaswilli merged commit 8c0bc6c into TryGhost:master Jun 3, 2015
@ErisDS ErisDS deleted the anon-middleware branch June 22, 2015 18:20
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.

2 participants