Results 1 to 3 of 3

Thread: How to re-generate ext-all.js but with return of line preserved?

  1. #1
    Sencha Premium User SebTardif's Avatar
    Join Date
    Feb 2011
    Location
    Cambridge, MA
    Posts
    1,295

    Default How to re-generate ext-all.js but with return of line preserved?

    ext-all.js is the complete production version of Ext JS 5, it has no debug code, no comment, it's optimized, and minified.

    I would like to keep most of its production setup but have the return of line preserved so that I can have useful stack.

    What would be the way to do this using Sencha Cmd?

    I did try different settings but without success.

  2. #2
    Sencha - Engineering israelroldan's Avatar
    Join Date
    Nov 2011
    Location
    The Netherlands
    Posts
    395

    Default

    While Sencha Cmd has no option for this, the first suggestion that comes on my mind is to use a javascript beautifier, I just opened and resaved it on my IDE and it has a nice formatting now.
    Israel Roldán | Senior Software Engineer (Framework tools)

  3. #3
    Sencha Premium User SebTardif's Avatar
    Join Date
    Feb 2011
    Location
    Cambridge, MA
    Posts
    1,295

    Default

    Quote Originally Posted by israelroldan View Post
    While Sencha Cmd has no option for this, the first suggestion that comes on my mind is to use a javascript beautifier
    We are now doing that. We use Maven, so after the following one time installation step:

    Code:
    npm install -g npm
    
    npm -g install js-beautify
    
    npm install js-beautify
    We run this command:
    Code:
    build\production\MyApp> js-beautify -t -r app.js
    Which in Maven is done with:
    Code:
    <plugin>
       <groupId>org.codehaus.mojo</groupId>
       <artifactId>exec-maven-plugin</artifactId>
        <version>1.3.2</version>
        <executions>
          <execution>
                <id>js-beautifye</id>
                <phase>package</phase>
                 <goals>
                   <goal>exec</goal>
                  </goals>
                            <configuration>
                                <workingDirectory>build/${sencha.env}/OPApp</workingDirectory>
                                <executable>js-beautify</executable>
                                <arguments>
                                    <argument>-t</argument>
                                    <argument>-r</argument>
                                    <argument>app.js</argument>
                                </arguments>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>

Tags for this Thread

Posting Permissions

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