Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 39

Thread: How do you compress (and operating) JS code on release?

  1. #21
    Ext User xpurpur's Avatar
    Join Date
    Feb 2008
    Posts
    33
    Vote Rating
    0
      0  

    Default

    I selected packtag.

    It is simple to use:
    PHP Code:
    <%
      
    // detect should we compress JS and CSS or not
      
    String compressed    "true";
      
    String reqNonCompressed request.getParameter("noncompressed");  
      
      if (
    reqNonCompressed != null) {
        
    compressed "false";
      }
      
      
    pageContext.setAttribute("compressed"compressed);
    %> 
    and in html:
    HTML Code:
       <pack:script enabled="${compressed}">
          <!-- LIB: ExtJs Framework -->
          <src>js/libs/ext/ext-base.js</src>
          <src>js/libs/ext/ext-all-debug.js</src>
          <src>js/libs/ext/ext-basex.js</src>
          <src>js/libs/ext/ext.patches.js</src>
    
           ...
        </pack:script>
    While developing, I use GET parameter "noncompressed" and scripts are not compressed.

    PS. But have troubles with cyrillic characters in scripts on Tomcat with packtag.
    On Glassfish all is fine.
    P.S. Sorry my english.

  2. #22
    Ext User
    Join Date
    Nov 2007
    Posts
    62
    Vote Rating
    0
      0  

    Default

    We also use Jawr on our project. We are in the process of converting from ExtJS 2 to ExtJS 3. Do you have the ExtJS 3 JavaScript listing you could post? Thanks!

  3. #23
    Ext User
    Join Date
    Nov 2007
    Posts
    62
    Vote Rating
    0
      0  

    Default ExtJS 3.0 Script list for Jawr

    If I find any additional errors in the order, I will update this post, but this seems to be the correct order.

    jawr.js.bundle.ext-all-debugall.mappings=\
    /scripts/ext/adapter/ext/ext-base-debug.js,\
    /scripts/ext/src/core/core/DomHelper.js,\
    /scripts/ext/src/core/DomHelper-more.js,\
    /scripts/ext/src/core/core/Template.js,\
    /scripts/ext/src/core/Template-more.js,\
    /scripts/ext/src/core/core/DomQuery.js,\
    /scripts/ext/src/util/core/Observable.js,\
    /scripts/ext/src/util/Observable-more.js,\
    /scripts/ext/src/core/core/EventManager.js,\
    /scripts/ext/src/core/EventManager-more.js,\
    /scripts/ext/src/core/core/Element.js,\
    /scripts/ext/src/core/Element-more.js,\
    /scripts/ext/src/core/Element.alignment.js,\
    /scripts/ext/src/core/core/Element.traversal.js,\
    /scripts/ext/src/core/core/Element.insertion.js,\
    /scripts/ext/src/core/Element.insertion-more.js,\
    /scripts/ext/src/core/core/Element.style.js,\
    /scripts/ext/src/core/Element.style-more.js,\
    /scripts/ext/src/core/core/Element.position.js,\
    /scripts/ext/src/core/Element.position-more.js,\
    /scripts/ext/src/core/core/Element.scroll.js,\
    /scripts/ext/src/core/Element.scroll-more.js,\
    /scripts/ext/src/core/core/Element.fx.js,\
    /scripts/ext/src/core/Element.fx-more.js,\
    /scripts/ext/src/core/Element.keys.js,\
    /scripts/ext/src/core/core/Fx.js,\
    /scripts/ext/src/core/core/CompositeElementLite.js,\
    /scripts/ext/src/core/CompositeElementLite-more.js,\
    /scripts/ext/src/core/CompositeElement.js,\
    /scripts/ext/src/data/core/Connection.js,\
    /scripts/ext/src/util/UpdateManager.js,\
    /scripts/ext/src/util/Date.js,\
    /scripts/ext/src/util/core/DelayedTask.js,\
    /scripts/ext/src/util/MixedCollection.js,\
    /scripts/ext/src/util/core/JSON.js,\
    /scripts/ext/src/util/Format.js,\
    /scripts/ext/src/util/XTemplate.js,\
    /scripts/ext/src/util/CSS.js,\
    /scripts/ext/src/util/ClickRepeater.js,\
    /scripts/ext/src/util/KeyNav.js,\
    /scripts/ext/src/util/KeyMap.js,\
    /scripts/ext/src/util/TextMetrics.js,\
    /scripts/ext/src/util/Cookies.js,\
    /scripts/ext/src/core/Error.js,\
    /scripts/ext/src/widgets/ComponentMgr.js,\
    /scripts/ext/src/widgets/Component.js,\
    /scripts/ext/src/widgets/Action.js,\
    /scripts/ext/src/widgets/Layer.js,\
    /scripts/ext/src/widgets/Shadow.js,\
    /scripts/ext/src/widgets/BoxComponent.js,\
    /scripts/ext/src/widgets/SplitBar.js,\
    /scripts/ext/src/widgets/Container.js,\
    /scripts/ext/src/widgets/layout/ContainerLayout.js,\
    /scripts/ext/src/widgets/layout/FitLayout.js,\
    /scripts/ext/src/widgets/layout/CardLayout.js,\
    /scripts/ext/src/widgets/layout/AnchorLayout.js,\
    /scripts/ext/src/widgets/layout/ColumnLayout.js,\
    /scripts/ext/src/widgets/layout/BorderLayout.js,\
    /scripts/ext/src/widgets/layout/FormLayout.js,\
    /scripts/ext/src/widgets/layout/AccordionLayout.js,\
    /scripts/ext/src/widgets/layout/TableLayout.js,\
    /scripts/ext/src/widgets/layout/AbsoluteLayout.js,\
    /scripts/ext/src/widgets/layout/BoxLayout.js,\
    /scripts/ext/src/widgets/Viewport.js,\
    /scripts/ext/src/widgets/Panel.js,\
    /scripts/ext/src/widgets/Editor.js,\
    /scripts/ext/src/widgets/ColorPalette.js,\
    /scripts/ext/src/widgets/DatePicker.js,\
    /scripts/ext/src/widgets/LoadMask.js,\
    /scripts/ext/src/widgets/Slider.js,\
    /scripts/ext/src/widgets/ProgressBar.js,\
    /scripts/ext/src/dd/DDCore.js,\
    /scripts/ext/src/dd/DragTracker.js,\
    /scripts/ext/src/dd/ScrollManager.js,\
    /scripts/ext/src/dd/Registry.js,\
    /scripts/ext/src/dd/StatusProxy.js,\
    /scripts/ext/src/dd/DragSource.js,\
    /scripts/ext/src/dd/DropTarget.js,\
    /scripts/ext/src/dd/DragZone.js,\
    /scripts/ext/src/dd/DropZone.js,\
    /scripts/ext/src/core/Element.dd.js,\
    /scripts/ext/src/data/Api.js,\
    /scripts/ext/src/data/Response.js,\
    /scripts/ext/src/data/SortTypes.js,\
    /scripts/ext/src/data/Record.js,\
    /scripts/ext/src/data/StoreMgr.js,\
    /scripts/ext/src/data/Store.js,\
    /scripts/ext/src/data/DataField.js,\
    /scripts/ext/src/data/DataReader.js,\
    /scripts/ext/src/data/DataWriter.js,\
    /scripts/ext/src/data/DataProxy.js,\
    /scripts/ext/src/data/Request.js,\
    /scripts/ext/src/data/ScriptTagProxy.js,\
    /scripts/ext/src/data/HttpProxy.js,\
    /scripts/ext/src/data/MemoryProxy.js,\
    /scripts/ext/src/data/JsonWriter.js,\
    /scripts/ext/src/data/JsonReader.js,\
    /scripts/ext/src/data/ArrayReader.js,\
    /scripts/ext/src/data/ArrayStore.js,\
    /scripts/ext/src/data/JsonStore.js,\
    /scripts/ext/src/data/XmlWriter.js,\
    /scripts/ext/src/data/XmlReader.js,\
    /scripts/ext/src/data/XmlStore.js,\
    /scripts/ext/src/data/GroupingStore.js,\
    /scripts/ext/src/data/DirectProxy.js,\
    /scripts/ext/src/data/DirectStore.js,\
    /scripts/ext/src/direct/Direct.js,\
    /scripts/ext/src/direct/Transaction.js,\
    /scripts/ext/src/direct/Event.js,\
    /scripts/ext/src/direct/Provider.js,\
    /scripts/ext/src/direct/JsonProvider.js,\
    /scripts/ext/src/direct/PollingProvider.js,\
    /scripts/ext/src/direct/RemotingProvider.js,\
    /scripts/ext/src/widgets/Resizable.js,\
    /scripts/ext/src/widgets/Window.js,\
    /scripts/ext/src/widgets/WindowManager.js,\
    /scripts/ext/src/widgets/MessageBox.js,\
    /scripts/ext/src/widgets/PanelDD.js,\
    /scripts/ext/src/state/Provider.js,\
    /scripts/ext/src/state/StateManager.js,\
    /scripts/ext/src/state/CookieProvider.js,\
    /scripts/ext/src/widgets/DataView.js,\
    /scripts/ext/src/widgets/list/ListView.js,\
    /scripts/ext/src/widgets/list/ColumnResizer.js,\
    /scripts/ext/src/widgets/list/Sorter.js,\
    /scripts/ext/src/widgets/TabPanel.js,\
    /scripts/ext/src/widgets/Button.js,\
    /scripts/ext/src/widgets/SplitButton.js,\
    /scripts/ext/src/widgets/CycleButton.js,\
    /scripts/ext/src/widgets/Toolbar.js,\
    /scripts/ext/src/widgets/ButtonGroup.js,\
    /scripts/ext/src/widgets/PagingToolbar.js,\
    /scripts/ext/src/util/History.js,\
    /scripts/ext/src/widgets/tips/Tip.js,\
    /scripts/ext/src/widgets/tips/ToolTip.js,\
    /scripts/ext/src/widgets/tips/QuickTip.js,\
    /scripts/ext/src/widgets/tips/QuickTips.js,\
    /scripts/ext/src/widgets/tree/TreePanel.js,\
    /scripts/ext/src/widgets/tree/TreeEventModel.js,\
    /scripts/ext/src/widgets/tree/TreeSelectionModel.js,\
    /scripts/ext/src/data/Tree.js,\
    /scripts/ext/src/widgets/tree/TreeNode.js,\
    /scripts/ext/src/widgets/tree/AsyncTreeNode.js,\
    /scripts/ext/src/widgets/tree/TreeNodeUI.js,\
    /scripts/ext/src/widgets/tree/TreeLoader.js,\
    /scripts/ext/src/widgets/tree/TreeFilter.js,\
    /scripts/ext/src/widgets/tree/TreeSorter.js,\
    /scripts/ext/src/widgets/tree/TreeDropZone.js,\
    /scripts/ext/src/widgets/tree/TreeDragZone.js,\
    /scripts/ext/src/widgets/tree/TreeEditor.js,\
    /scripts/ext/src/widgets/chart/swfobject.js,\
    /scripts/ext/src/widgets/chart/EventProxy.js,\
    /scripts/ext/src/widgets/chart/FlashComponent.js,\
    /scripts/ext/src/widgets/chart/Chart.js,\
    /scripts/ext/src/widgets/menu/Menu.js,\
    /scripts/ext/src/widgets/menu/MenuMgr.js,\
    /scripts/ext/src/widgets/menu/BaseItem.js,\
    /scripts/ext/src/widgets/menu/TextItem.js,\
    /scripts/ext/src/widgets/menu/Separator.js,\
    /scripts/ext/src/widgets/menu/Item.js,\
    /scripts/ext/src/widgets/menu/CheckItem.js,\
    /scripts/ext/src/widgets/menu/DateMenu.js,\
    /scripts/ext/src/widgets/menu/ColorMenu.js,\
    /scripts/ext/src/widgets/form/Field.js,\
    /scripts/ext/src/widgets/form/TextField.js,\
    /scripts/ext/src/widgets/form/TriggerField.js,\
    /scripts/ext/src/widgets/form/TextArea.js,\
    /scripts/ext/src/widgets/form/NumberField.js,\
    /scripts/ext/src/widgets/form/DateField.js,\
    /scripts/ext/src/widgets/form/DisplayField.js,\
    /scripts/ext/src/widgets/form/Combo.js,\
    /scripts/ext/src/widgets/form/Checkbox.js,\
    /scripts/ext/src/widgets/form/CheckboxGroup.js,\
    /scripts/ext/src/widgets/form/Radio.js,\
    /scripts/ext/src/widgets/form/RadioGroup.js,\
    /scripts/ext/src/widgets/form/Hidden.js,\
    /scripts/ext/src/widgets/form/BasicForm.js,\
    /scripts/ext/src/widgets/form/Form.js,\
    /scripts/ext/src/widgets/form/FieldSet.js,\
    /scripts/ext/src/widgets/form/HtmlEditor.js,\
    /scripts/ext/src/widgets/form/TimeField.js,\
    /scripts/ext/src/widgets/form/Label.js,\
    /scripts/ext/src/widgets/form/Action.js,\
    /scripts/ext/src/widgets/form/VTypes.js,\
    /scripts/ext/src/widgets/grid/GridPanel.js,\
    /scripts/ext/src/widgets/grid/GridView.js,\
    /scripts/ext/src/widgets/grid/GridDD.js,\
    /scripts/ext/src/widgets/grid/ColumnModel.js,\
    /scripts/ext/src/widgets/grid/AbstractSelectionModel.js,\
    /scripts/ext/src/widgets/grid/RowSelectionModel.js,\
    /scripts/ext/src/widgets/grid/Column.js,\
    /scripts/ext/src/widgets/grid/ColumnDD.js,\
    /scripts/ext/src/widgets/grid/ColumnSplitDD.js,\
    /scripts/ext/src/widgets/grid/RowNumberer.js,\
    /scripts/ext/src/widgets/grid/CheckboxSelectionModel.js,\
    /scripts/ext/src/widgets/grid/CellSelectionModel.js,\
    /scripts/ext/src/widgets/grid/EditorGrid.js,\
    /scripts/ext/src/widgets/grid/GridEditor.js,\
    /scripts/ext/src/widgets/grid/PropertyGrid.js,\
    /scripts/ext/src/widgets/grid/GroupingView.js,\
    /scripts/ext/src/debug.js

  4. #24
    Ext User mophisoft's Avatar
    Join Date
    Jun 2007
    Posts
    27
    Vote Rating
    0
      0  

    Default

    The first, i will merge all the js files into one file, and then use this online tool to compress. I think it very useful.

  5. #25
    Ext User
    Join Date
    Nov 2007
    Posts
    62
    Vote Rating
    0
      0  

    Default

    We use JAWR to compress our js files. It works great. It also has a debug mode so that you can load them individually if you are developing and need to debug something. The list I posted is the ExtJS list for debugging purposes. If running in release mode you should use the compressed versions ExtJS provides, ext-all.js an ext-base-all.js.

  6. #26
    Sencha Premium Member Wedgie's Avatar
    Join Date
    Jan 2009
    Location
    Melbourne, Australia
    Posts
    83
    Vote Rating
    0
      0  

    Question

    Sorry for resurrecting an old thread, but it seems to be still relevant.

    I'm wanting to be able to be able to automatically produce a number of cut-down versions of Ext for deployment to different parts of my web app so I'm setting up an Ant task to control YUI Compressor along the lines of the example shown by chazmatazz.

    Is there an official (i.e. Ext developer) approved ordered list for the Ext JS files to be concatenated or does somebody have a way of extracting the list from the ext-all-debug.js files?

    I'm also hoping that the order of the files won't change much between Ext versions otherwise it will be a chore to maintain the file list in Ant. Currently I'm on Ext 3.2.1

  7. #27
    Ext JS Premium Member
    Join Date
    Aug 2007
    Location
    Antwerp, Belgium
    Posts
    582
    Vote Rating
    143
      0  

    Default

    @Wedgie: is there a reason why you can't use JSBuilder? http://www.extjs.com/products/jsbuilder/

  8. #28
    Ext User
    Join Date
    Aug 2009
    Posts
    127
    Vote Rating
    0
      0  

    Default

    Quote Originally Posted by Wedgie View Post
    I'm wanting to be able to be able to automatically produce a number of cut-down versions of Ext for deployment to different parts of my web app so I'm setting up an Ant task to control YUI Compressor along the lines of the example shown by chazmatazz.
    ext-all.js gezipped is 186kb (3.2.0). It is isn't exactly small, but it isn't huge either. And if many of your users are returning users it will be in their cache. So I would be hesitant to make "a number of cut-down versions", as it might introduce errors.

    Regarding the orginal question of this thread. I use a publish/release script which cat's all my js files and then uses yui (I guess similar to JSBuilder). Also it gives the js directory a revision tag, to force download of the latest code (the ext lib files are in a different directory).

  9. #29
    Sencha Premium Member steffenk's Avatar
    Join Date
    Jul 2007
    Location
    Haan, Germany
    Posts
    2,676
    Vote Rating
    9
      0  

    Default

    rockstarapps - in all projects one click to concatenate and compress all, there is no better solution.
    vg Steffen
    --------------------------------------
    Release Manager of TYPO3 4.5

  10. #30
    Ext User
    Join Date
    Aug 2009
    Posts
    127
    Vote Rating
    0
      0  

    Default

    why would you get an application to do this, if a few lines of script does the same and give you full control?

Page 3 of 4 FirstFirst 1234 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •