sencha build process add other tasks like in gulp - extjs

we have a offline application with the sencha extjs framework. To fill the cache.appcache file we currently using a c# exe to get all files in all subfolders and write the app cache file.
There is no way in build the appCache file once because the files are changing on different projects..
I'm coming from a gulp environment and I'm missing the possibility to adjust the build process to my wishing.
Is there a good way to achieve gulp like behavior with sencha CMD?
Thanks in advance!

Not the way I wanted but could achieve all I needed with ant tasks in build.xml.

Related

What is the Difference between build generated for development and for production in sencha

I am new to sencha and working on build process. Will you please help me the difference ? Cause while building development build in sencha files are not getting copied properly, so can not able to find the difference.
Thanks.
For production build Sencha:
use minified sources without comments
merge separate js files into app.js
In development build you have unpacked resources and files in case you need to debug or look through them.

Shouldn't skip.slice=1 still generate a css file in Sencha CMD 6.1.176

I think using skip.slice=1 when running
sencha app build
should still generate a .css file on the build/production folder but that is not the case with CMD 6.1.1.76
Am I missing something ?
I want to skip slicing images as I won't be supporting old browsers but obviously I still want to generate the proper css file.
I've tried it on a clean workspace and it generates CSS in a production build. Have you installed the Compass extension for Sencha Cmd? I've had some problems when I left this deselected on installation.

How do I deploy ExtJS 4.2.2 to production for app not initially created with Sencha Cmd?

We have an app that was not initially created with Sencha Cmd.
While we will eventually restructure the app to adhere to the structure that works best with Sencha Cmd, for now we just need to know the steps to deploy the app to production in our case.
1) For example, I've heard we need to minify the code by building with Sencha Cmd. Can we do that even if our app was not initially created using Sencha Cmd?
2) I've also heard that we can use Sencha Cmd to ensure that the minified file only contains the classes that are actually used by our application (even reducing the number of ExtJS core classes included). Is that true and if so, can we do that even if our app was not initially created using Sencha Cmd?
3) Anything else to deploy our app to production, especially considering our app was not initially created using Sencha Cmd?
Thanks much in advance!
1) We can deploy & compile our application , even if we have not created the project using sencha CMD. We have to follow the standard application structure given in their tutorial/docs
2)Yes by compiling our js files using sencha compiler/sencha cmd minifies our code to a single file say xyz.js file, so in webapps folder only one file is needed not all other js files containing src code also the import statement in some parent jsp files need to be updated accordingly, instead importing "app.js" . By this process the performance is upgraded as only required/used components are complied.
Note : While compiling our src files,If any component say button,grid etc in any file is used without mentioning its xtype in 'requires[]' field in that particular view file then errors are thrown which are very difficult to track, So make sure all requires[] are updated.

Enable Sencha Touch 2.2.1 Offline

I'm currently toying around with Sencha Touch 2.2.1 and am trying to get it to run offline using an HTML5 cache.manifest. Anyone know how to get this to work? I can only find old guides from the last version which no longer seem to work. After some fiddling I have my manifest as follows:
CACHE MANIFEST
index.html
app.js
touch/microloader/development.js
But this seems to throw errors in the development.js script when it attempts to send fetch the app.json file. Are there some Sencha settings I have to adjust for offline mode? Thank you for your help.
After some hunting around it seems this feature is present in Sencha Touch 2.0 but still a bit incomplete. To get it to work, do as follows:
You must have the Sencha command line installed (which you probably
already have since it's required to make a Sencha project in the
first place).
Navigate to your project's parent directory in command line
Use the sencha app build production command to "compile" your project into a single file
Navigate to your production directory in YourApp/build/YourApp/production
Chane the extension of cache.appcache to cache.manifest
Edit the index.html file's html tag so that manifest="cache.manifest"
Ensure your server is configured to serve .manifest files correctly
Now your production code should have a working cache manifest. Note you only need to change the extension so that the app works on iOS, it seems to work in browser (or at least Chrome where I tested this) with the .appcache extension.
Compiling to production appears to be the only way to generate a cache manifest file but you can use this same file in a testing build if you don't want all the code minified for debugging. Of course you'll have to copy your manifest over and ensure it's referenced in your testing build's html tag.
All in all Sencha clearly needs to update their documentation here but I'm glad I found this out. I only tested this with a super basic, static, two page application. Hoping it scales decently.
Instead of changing manually your production package, you should change in app.json lines after 'appCache'. Here is what will be generated by Sencha CMD and will work just fine after running sencha app build production.
You can see a live example here https://github.com/flrent/ConfMate/blob/master/app.json#L79

How to build only css files from sass using sencha command?

is there an easy way to build only css files from sass files in extjs project without running the whole build process? I know I could create a config file for compass and use compass watch but isn't there a simpler way?
It is possible to use the command "sencha ant sass" to recompile the CSS using Sass. With Sencha Cmd 4 the command "sencha app watch" will also recompile CSS when needed.
Note that simply running "compass watch" no longer works with Ext JS 4.2 since the theme structure changed.
Source: http://www.sencha.com/blog/using-the-new-app-watch-command-in-sencha-cmd-4/

Resources