ExtJS Sencha Build getting ext SDK from remote/CDN location - extjs

I use ExtJS 5 and build my application using Sencha Cmd.
I have Sencha app generated inside my maven based webapp.
I would like to host the SDK on some CDN and still be able to use Sencha Cmd "sencha app build" etc. Is this possible? I need to trip down the size of my webapp.
Please guide.

Do not upload this folder to source control at all.
Instead, put a readme file to tell fellow developers (who will want to build the dev version of the app) how to install Sencha ExtJS and re-generate this ext folder on their side using this command:
cd <path_to_your_app_root>
sencha app upgrade <path_to_extjs_root_folder>
Other project stackholders (Testers, management, ...) should use the production version of the app.

Related

publish extjs 6 application using sencha cmd

I build an app in extjs 6 using sencha cmd and I try this command:
sencha -sdk /path/to/sdk generate app MyApp ./
but its folder has a massive size on disk(about 150MB), how can i remove unnecessary files and publish the app on a server(probably using sencha cmd)?
For development environment 150 MB is fine. The folder size is big because by default sencha cmd copies the framework code in the project directory.
It is not recommended to put this all files into final build.
Sencha cmd provides another useful command
sencha app build
which will generate the minified production build in build folder which is smaller and considered as code to publish.
To generate development, build without minified code you can try following command:
sencha app build development
You can find more featuers provided by sencha cmd at : http://docs.sencha.com/cmd/guides/extjs/cmd_app.html

How to "watch" sencha build process?

I am working on a Ext JS project and I need to compile JSB3 file using Sencha build. I just wanted to know if there is a way to automate the build process. When I use "watch" Sencha Cmd shows it as unknown command.
I am using Sencha Cmd v6 and Ext Js 4.1.
You have to run sencha app watch in the application root folder. Now when you change anything in your project the build will be run automatically.
The other commands which can be interesting for your are sencha app build production and sencha app build testing
You can also use sencha help SomeCommand and it will print you all the options about that command.
You can learn more at http://docs.sencha.com/cmd/guides/extjs/cmd_app.html#extjs-_-cmd_app_-_development_mode
You looking for this i think
sencha app watch
sencha app refresh
sencha app build
these are cammands use to watch refresh and build a sencha application
for example::
if you are locally and using xampp
C:>cd xampp/htdocs/foldername/applicationname
and then sencha app watch

Ext JS - Creating a new application

I have installed SenchaCmd-6.0.2.14-windows-64bit.exe and it installed into the folder C:\users\myname\bin....
I am trying to create a new app. I have tried the cmd given in the sencha site. But it says "Not a framework directory".
Kindly help me to start it... I am new to Extjs
After downloading Sencha CMD you'll need to download the EXT JS SDK or you can download the GPL version. You can get them from official Sencha website (as you would have downloaded Sencha CMD).
Then you can generate the app by specifying the location where you have kept the EXT JS SDK or else, navigate to location where you have kept the EXT JS SDK using command prompt, then give the generate command. For example.
D:\ext-6.0.2-trial\ext-6.0.2>sencha generate app YouAppName <location>
Specify the location where you want to create the files of the application, usually the c:\inetpub\wwwroot directory if you are using IIS server on Windows.

How to migrate a non sencha cmd application to build using sencha cmd (ExtJS 4.2)

I have an extjs 4.2 application which was built by hand coding controllers, views, stores and models. I was looking for a step by step approach to migrate to sencha cmd and could not find one.
The reasons for moving to sencha cmd are packaging benefits (1 app.js to load instead of 100s of js files), obfuscating/ minimizing code for production, theming, ease of migration to newer extjs versions.
Please let me know what steps you took to migrate to sencha cmd? I am planning to do this (actually tried it and did not succeed):
Start fresh and create a new sencha app using cmd keeping the same Ext.application.name as the hand coded one
Copy all models, views, controllers, stores over to sencha cmd app
Add those models, views, controllers in app/Application.js
Run sencha app watch and it should work
A little guidance or a pointer to how you migrated a non sencha cmd app to a sencha cmd app will help.
Thanks
First of all you need to download Sencha ExtJS and Sencha CMD. After that you need to install Sencha CMD.
Generation ExtJS Build:
run terminal;
sencha -sdk /path/to/extjs-5.x.x generate workspace my-workspace
cd my-workspace
sencha -sdk ext generate app NameApp name-app
cd name-app
sencha app build
Also, if you want to migrate exists application, you can perform the steps listed above, copy your application in workspace and run sencha app build -c production for example

How to package Simple Sencha MVC app for Window Phone 8

I am able to wrap sencha APP in window Phone 8 if using UIView Control or PhonegapView and accessing app over localhost.
But not able to package app when putting all pages in www folder (Tried with phonegap also).
Other Non Sencha web APP works fine.
I have searched on forum . Many people are facing same issue.
Can any one post a successful solution?
I am using latest Sencha touch 2.3.1
I am getting that first sencha need to be packaged and then it could be put in www folder.
But i am not able to get the correct packaging required which can work.
I had a similar problem; instead of using the package files, I used the command:
sencha app build native
and I used the app.js and app.json files generated that were created in the path
build/native/<YOUR_APP>

Resources