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

refactoring some large functions #411

Open
dasilvacontin opened this issue Dec 24, 2014 · 2 comments
Open

refactoring some large functions #411

dasilvacontin opened this issue Dec 24, 2014 · 2 comments

Comments

@dasilvacontin
Copy link
Collaborator

As I mentioned in #406, refactoring some functions would make the codebase easier to maintain, understand and extend. I'm specially looking at parseTemplate (~125 lines) and Writer.prototype.renderTokens (~100 lines).

@phillipj
Copy link
Collaborator

phillipj commented Jan 6, 2015

Could it be split into multiple files or should it still be just one file?

@dasilvacontin
Copy link
Collaborator Author

That's a good question. We have at least 3 "classes" already in the js file.

One of the beauties of mustache.js is that, same as the original ruby version, it has a short implementation that fits a single file. I would keep it short for now.

phillipj added a commit to phillipj/mustache.js that referenced this issue Jan 7, 2015
Split the old Writer.renderTokens() into several small functions with a single responsible.

Fixes janl#411
@dasilvacontin dasilvacontin changed the title refactoring some functions some large functions refactoring some large functions Jan 28, 2015
srrvnn pushed a commit to srrvnn/mustache.js that referenced this issue Nov 1, 2015
srrvnn pushed a commit to srrvnn/mustache.js that referenced this issue Nov 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
@phillipj @dasilvacontin and others