0
votes

I have just generated new ExtJS 6 app by Sencha CMD with -ext -classic options, and i have a lot of files in myapp/ext directory, including some examples, builded framework with examples in myapp/ext/build and other files i don't want put under source control.

What i can safely delete from myapp/ext?

3
You could exclude ext/ from source control (e.g. .gitignore)...Alexander

3 Answers

0
votes

The files in myapp/ext/build are referenced from the uncompiled version, so don't delete them.

You should at least keep

  • everything in the build directory (required for uncompiled version)
  • in the classic/classic folder, the subfolders overrides, sass, src (required for both uncompiled and compiled)
  • your theme and the parent theme and the parent's parent theme (e.g. triton is derived from neptune is derived from neutral is derived from base, so you would have to keep these four!)
  • at least packages/core, for some themes also packages/font-*, and if you use ux components, the packages/ux folder also
  • the sass directory is also required for compile.

So what can you delete?

  • In fact, only those themes and packages you don't want to use (e.g. classic or charts) are safe to delete. Unless you (or your boss) make up your mind, though...

In short, I wouldn't delete anything. I myself haven't, I just removed the whole ext folder from source control.

0
votes

You can exclude the build and ext folder while performing a check-in into your source control. When you have to checkout, create a new app-build and replace files with your source control files.

0
votes

The strategy I use is to have the ext folder which is basically the whole framework - about 12K files - in the source control and inside my web app.

Source control Explanation:-

I know that having ext folder in source control will slow down the checkout process but that will be only once generally. Because once you have the code checked out, even if you switch your code to a different branch, it will not require to download the whole ext folder again because there will be hardly any changes in that ext folder as it is kind of a library for the project. So the switching, merging in the source control will not be impacted.

Having it inside the war file explanation

The reason I put it inside my webapp is to allow running sencha app watch command from the target folder so that it picks up the scss and sass changes instantly. For these watch and build commands to execute properly, it needs to have ext folder within the app - I didn't find a way to externalize it. Now the problem with this approach is that when the war file gets deployed and the war contents are extracted in the deploy folder, it copies the whole ext folder and thus deployment time is highly increased. And every time we clean and redeploy the application, it will un-necessarily delete the whole ext folder (at the time of clean operation) and then again copy the files (at the time of deploy operation). To avoid this unwanted deletion and re-copying, I maintain 2 development profiles - one that includes the ext folder for clean and build purposes and one that excludes the ext folder. The profile that includes the ext folder for deployment is required by developers only once for the first time. But every time thereafter, I just use the profile that excludes the ext folder from clean and deploy process so that the whole deployment process is not impacted.

I know that this whole thing is complicated to set it up, but once its in place, it makes life much simpler. And yes if someone can find a way to externalize the ext folder and still allow sencha app watch commands to function as is, then kindly post their answer here for everyone's benefit.