Sencha app build production: doesn't merge my js

So ... since I read the Sencha Command documentation, it tells me that the build will automatically (using Phantom JS) tell me what all my dependencies are and in what order. Based on this, I expect the sencha app build production command to merge all my dependencies into a single js file, regardless of whether I manually included them in the app.json file. However, I do not see this.

Do I need to manually maintain a list of JS files in app.json? If so, then this is normal. I just realized what was different from the documentation. Please, help.

change -
Therefore my index.html is very minimal. It has only a script tag in one external js resource file and one script tag for 'sdk / microloader / development.js'. My app.js does not reference my index.html. When I connect to my application directory and run the command to create the sencha assembly, it ends without errors. However, it finds only 53 dependencies when I know that we have more than 500. Here is the output in the terminal when I run the assembly:

aaronfrost@topnotch ~/source/ab/AreaBook/web/src/main/webapp/sencha2 $ sencha app build -e production [INFO] Deploying your application to /home/aaronfrost/source/ab/AreaBook/web/src/main/webapp/sencha2/build/production [INFO] Copied sdk/sencha-touch.js [INFO] Copied app.js [INFO] Copied resources/css/app.css [INFO] Copied resources/icons [INFO] Copied resources/loading [INFO] Resolving your application dependencies (file:////path/to/my/sencha2/index.html) [INFO] Found 53 dependencies. Concatenating all into '/dir/to/my/sencha2/build/production/app.js' [INFO] Processed sdk/sencha-touch.js [INFO] Minifying sdk/sencha-touch.js [INFO] Processed app.js [INFO] Minifying app.js [INFO] Minifying resources/css/app.css [INFO] Minified sdk/sencha-touch.js [INFO] Minified app.js [INFO] Minified resources/css/app.css [INFO] Generated app.json [INFO] Embedded microloader into index.html [INFO] Generating checksum for appCache item: index.html [INFO] Generated cache.manifest 

So, I look in my new app.js, which is in my build / production folder, and it combines the sencha dependency bundle, but the only file that gets concat'd and minified is my application. js, which is the only js file specified in my application. json That's why I was wondering if I needed to manually put it in app.json to get it, to get concat'd and minified. None of the dependencies listed in my app.js application require that the section be included in the built app.js.

Thus, this does not give me the same behavior that I would expect to build an app.js application with all my dependencies. Any thoughts would be good.

+6
source share
1 answer

In my experience, I never had to modify app.json. Everything that is mentioned in the Ext.requires instruction is automatically combined into the final (unique) js file with the sencha command.

If you still have problems, perhaps you should give more details about files that are not being processed properly.

+1
source

Source: https://habr.com/ru/post/915306/


All Articles