
Originally Posted by
israelroldan
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>