simeydotme / jQuery-ui-Slider-Pips

Plugin for adding little 'pips' , 'floats' and labels to a slider.
http://simeydotme.github.io/jQuery-ui-Slider-Pips/
503 stars 138 forks source link

use yuicompressor-2.4.7 build jquery-ui-slider-pips.js throw error #93

Open Janking opened 8 years ago

Janking commented 8 years ago

[ERROR] 355:14:invalid property id

[ERROR] 355:15:syntax error

[ERROR] 567:5:missing ) in parenthetical

[ERROR] 571:1:syntax error

[ERROR] 1:0:Compilation produced 4 syntax errors. org.mozilla.javascript.EvaluatorException: Compilation produced 4 syntax errors. at com.yahoo.platform.yui.compressor.YUICompressor$1.runtimeError(YUICompressor.java:154) at org.mozilla.javascript.Parser.parse(Parser.java:392) at org.mozilla.javascript.Parser.parse(Parser.java:337) at com.yahoo.platform.yui.compressor.JavaScriptCompressor.parse(JavaScriptCompressor.java:312) at com.yahoo.platform.yui.compressor.JavaScriptCompressor.(JavaScriptCompressor.java:533) at com.yahoo.platform.yui.compressor.YUICompressor.main(YUICompressor.java:131) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.yahoo.platform.yui.compressor.Bootstrap.main(Bootstrap.java:21) [Finished in 0.5s with exit code 2] [cmd: ['java', '-jar', '/Users/janking/Library/Application Support/Sublime Text 3/Packages/YUI Compressor/bin/yuicompressor-2.4.7.jar', '--charset', 'utf-8', '--preserve-semi', '--line-break', '150', '-o', 'jquery-ui-slider-pips.min.js', '/Users/janking/Desktop/svn/edmp/thunk/campaign/web/local-assets/js/slider-pips/js/jquery-ui-slider-pips.js']]

simeydotme commented 8 years ago

Apologies, I have no experience with this and don't believe it to be a problem with the code... if you figure it out please let me know :)

3qdev commented 8 years ago

Hi, i have the same error. The problem is, that you use "float" as a key/id in extensionMethods{}. It is reserved in JS

simeydotme commented 8 years ago

ohhh, @3qm that totally makes sense! :) but is this a case of YUI being overly sensitive? because it's actually an object property, not a variable name, so it's totally fine?

I don't really see anyway to prevent this without a major version release to plurialise float to floats or change to tips .... any thoughts?

3qdev commented 8 years ago

I have changed float to floats and it works for me with YUI and was the fastest solution.