Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sencha Cmd disable compressor

Does anyone know how to remove compression of javascript file in sencha cmd? I want that my production app.js file what fully readable.

And I want to configure this in my app.json if possible.

I did this:

/**
 * Settings specific to production builds.
 */
"production": {
    "compressor": null, // compressor null
    "output": {
        "js": {
            "optimize": false, // optimize false
        },
        "appCache": {
            "enable": false,
            "path": "../cache.appcache"
        }
    },
    "loader": {
        "cache": "${build.timestamp}"
    },
    "cache": {
        "enable": false
    }
}

But whereas the compressor option work, at the end my file is still "compressed" (not minified but still in one line).

I try the optimize method in the ideal situation, I would like all Sencha Cmd optimization to be perform except to shrink everything in one line...

If somebody know.

Thanks in advance!

like image 519
Psycho Avatar asked Oct 24 '25 00:10

Psycho


2 Answers

thanks to @bnz, the proposed answer was not fully right but it helps me found the solution.

So, to disable the last compression of the app.js file during the build process, you have to go to your <appFolder>/.sencha/app/production.properties and this directive:

enable.resource.compression=false

I did not found yet how to set this in the app.json

like image 66
Psycho Avatar answered Oct 27 '25 02:10

Psycho


No answer worked for me, but I found further possible solutions at Sencha Forum (that worked): https://www.sencha.com/forum/showthread.php?315722-How-to-ignore-compression-in-production-build

I leave it here for future people reaching this thread :)

[copied from the link]

  • Sencha Cmd v6.5.3.16:

app.json:

"production": {
    "compressor": {
        "type": "none"
    }
}

To disable optimizations:

"output": {
    "js": {
        "optimize": false
    }
}
  • Sencha Cmd 6.2.2.36 (change all the following):

app.json:

"production": {
    "compressor": {
        "type": "none"
    }
}

.sencha/app/production.properties:

enable.resource.compression=false
like image 28
Alfonso Nishikawa Avatar answered Oct 27 '25 03:10

Alfonso Nishikawa