Make move.js YUI-compressor compatible. #11

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
@rstacruz
Member

rstacruz commented Sep 30, 2011

Right now, it's structured this way:

exports.Move = function Move() { ... }
Move.prototype.x = ...

This presents a problem as YUI compressor may mangle function Move() into a non-named function. We've encountered this problem using move.js with Jammit.

@tj

This comment has been minimized.

Show comment Hide comment
@tj

tj Sep 30, 2011

Member

damn, uglifyjs does the same, that's really annoying. IMO it's really wrong to alter code just for a compressor, YUI must have a setting or something. I'd rather just do:

function Move(){}

exports.Move = Move;

assuming it does not mess with function statements haha

Member

tj commented Sep 30, 2011

damn, uglifyjs does the same, that's really annoying. IMO it's really wrong to alter code just for a compressor, YUI must have a setting or something. I'd rather just do:

function Move(){}

exports.Move = Move;

assuming it does not mess with function statements haha

@rstacruz

This comment has been minimized.

Show comment Hide comment
@rstacruz

rstacruz Sep 30, 2011

Member

YUI only has the following options:

  • munge (default false) -- will squelch variable names as it sees fit
  • optimize (default true)
  • preserve_semicolons (default false)
  • charset (defaults to "utf-8")
  • line_break
Member

rstacruz commented Sep 30, 2011

YUI only has the following options:

  • munge (default false) -- will squelch variable names as it sees fit
  • optimize (default true)
  • preserve_semicolons (default false)
  • charset (defaults to "utf-8")
  • line_break
@yields

This comment has been minimized.

Show comment Hide comment
@yields

yields Sep 16, 2013

Contributor

closing, if this is still an issue feel free to open :)

Contributor

yields commented Sep 16, 2013

closing, if this is still an issue feel free to open :)

@yields yields closed this Sep 16, 2013

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