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

[TIMOB-12127] Upgraded Uglify from v1 to v2. Added uglify error handling... #3741

Merged
merged 2 commits into from Jan 22, 2013
Merged

[TIMOB-12127] Upgraded Uglify from v1 to v2. Added uglify error handling... #3741

merged 2 commits into from Jan 22, 2013

Conversation

cb1kenobi
Copy link
Contributor

... to mobile web's build.

@@ -2281,21 +2274,27 @@ build.prototype = {

findSymbols: function (ast) {
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 just finding variable/function identifiers? If so, you can accomplish it a lot easier using figure_out_scope. http://lisperator.net/uglifyjs/scope

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, I'll try playing around with the scope stuff tomorrow.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed!

this.logger.error(__('%s', ex.message));
}
try {
var contents = fs.readFileSync(source).toString().split('\n');
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can move this read inside the if statement, that way we don't have to read the file if we don't have a line. Also, what about windows newlines?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Won't fix. Contents is needed to check if the line # is valid.

@nebrius
Copy link
Contributor

nebrius commented Jan 22, 2013

Code reviewed and tested. Request accepted

nebrius pushed a commit that referenced this pull request Jan 22, 2013
[TIMOB-12127] Upgraded Uglify from v1 to v2. Added uglify error handling...
@nebrius nebrius merged commit 056158e into tidev:master Jan 22, 2013
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

2 participants