1. #1
    Ext JS Premium Member
    Join Date
    Nov 2011
    Posts
    200
    Vote Rating
    7
    Qarea is on a distinguished road

      0  

    Default Sencha CMD concatenate files - how to turn off YUI compression?

    Sencha CMD concatenate files - how to turn off YUI compression?


    Trying to make one big js file from my app
    PHP Code:
    sencha compile -classpath=extjs/src,app concat app-all.js 
    but getting lots of "YUI Compressor Error" - like
    PHP Code:
    [ [2000] : YUI Compressor Error <> missing name after operator =>     this.goto = function (params) { 
    - looks like problem is in my custion function called goto
    PHP Code:
     [ [2000] : YUI Compressor Error <> invalid property id =>                     float'right', ] 
    - problem is in attribute called "float"

    I do not want fix this errors, and I do not need compress js file at all - I just need concat all my js files into one working file, like ext-all.js , how can I do it?
    Didnt found option how to disable YUI, tried use
    PHP Code:
    sencha compile -classpath=extjs/src,app concat -closure app-all.js 
    - but still getting YUI errors

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,018
    Vote Rating
    849
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Was the app generated by Cmd?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Ext JS Premium Member
    Join Date
    Nov 2011
    Posts
    200
    Vote Rating
    7
    Qarea is on a distinguished road

      0  

    Default


    No

  4. #4
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,526
    Vote Rating
    378
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    It seems that YUI compressor takes float and goto as reserved words. Use another names.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


  5. #5
    Ext JS Premium Member
    Join Date
    Nov 2011
    Posts
    200
    Vote Rating
    7
    Qarea is on a distinguished road

      0  

    Default


    This names are used in lots of files lots of times, I cant spend much time to fix such errors and possible lots other errors - I tried to compile different set of files and get another not-real-errors. How can I disable YUI compression, or use another compression tool like closure compiler? I've posted above code where trying to use -closure, but getting same yui errors, what is correct syntax or what is wrong?

  6. #6
    Ext JS Premium Member
    Join Date
    Nov 2011
    Posts
    200
    Vote Rating
    7
    Qarea is on a distinguished road

      0  

    Default


    still actual

  7. #7
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,526
    Vote Rating
    378
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    I still think that culprit is reserved words. Did you check with yahoo guys who wrote YUI?
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


  8. #8
    Ext JS Premium Member
    Join Date
    Nov 2011
    Posts
    200
    Vote Rating
    7
    Qarea is on a distinguished road

      0  

    Default


    I'm sure that .goto and other things are specific for YUI, so I need not to fix YUI problems but disable YUI - either using google's closure or not compressing files at all, just concatenate in correct order.

  9. #9
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,526
    Vote Rating
    378
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    Yeah that might work well, however, in the long run, I'd rather fix the code.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


  10. #10
    Ext JS Premium Member
    Join Date
    Nov 2011
    Posts
    200
    Vote Rating
    7
    Qarea is on a distinguished road

      0  

    Default


    This should work well, but I cant user compiler another than YUI - sencha cmd ignores -closure option.

    sencha compile -classpath=extjs/src,app concat -closure app-all.js
    - but still getting YUI errors
    Please tell me how I should add -closure option to make sencha cmd use Closure Compiler instead of YUI ?