Make move.js YUI-compressor compatible. #11

Closed
wants to merge 1 commit into
from

3 participants

@rstacruz
Sloth member

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
Sloth 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
Sloth 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
@yields

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