grunt-sencha-dependencies to process the existing php project - extjs

I have a php+ext 4.1.1a project which have the index.php(not index.html) but without the app.js. It use MVC structure but I am fed up the sencha cmd. It keep giving me errors when parsing the js files.
But when I tried to use the grunt-sencha-dependencies:
https://npmjs.org/package/grunt-sencha-dependencies
I stucked when I tried to generate the js file lists:
1. I can't generate the app.json file from different versions of sencha cmd
2. I don't have the index.html and app.js grunt-sencha-dependencies required
My question is:
1. if I have a app.jsb3 file how can I generate the app.json file which can be used by grunt
2. Is there any way I have grunt to parse the js files though the index.php file instead of local html file?
Thanks in advance.

Finally I gave up generating from app.json. Instead, I can generate from the index.html and app.js without problem.
Sencha Cmd is so messy!

Related

How to add React build files into existing JSP project

I have build a react app with some external libraries and would like to include it into an existing project that has nothing put JSP's.
Running the command react-scripts build generates files in a build folder.
build/asset-manifest.json
build/favicon.ico
build/index.html
build/manifest.json
build/precache-manifest.23802519359aee1ffa0ec2f3ba332c80.js
build/work.js
build/static
build/tab.png
What do I include and how do I include these files.
I have tried to add the index.html into index.jsp but is doesnt seem to work. Although I do see the title change to what is in my react app.
<%#include file="index.html"%>
or do I need to include all the files similar to how I added index.html
The index.html file does load a couple of script files in the build/js folder like so below.
<script src="/static/js/2.57fa75d6.chunk.js"></script><script src="/static/js/main.fe75a1b9.chunk.js"></script>
I have project with similar requirements as yours.
Some info needs to be render at server, but could not find proper way to do it in java, so I created maven plugin for that:
https://github.com/maasdi/react-assets-maven-plugin
You can try check it out, hope that can help with yours.

For sencha app build , do we need to include all js files related to view in main.js(portal.js)?

I am using sencha cmd 6 for building my application.
my folder structure is
classic
src
model
view
account
jobs
portal
portal.js
controller
store
production build process execution is successful but when i load that build its giving .js file not found error.
So i include all js files in folder structure into main js portal.js then .js error is removed and build works.
But i dont want to include all these list of files in one single js, so can we skip the js include part from portal.js and use any property or attribute to include all js files ?
You can specify with * like 'Ext.chart.*' in requires section of Ext.app.Application.
Hope this helps.

extjs minification using jsb2 builder

I am using JS builder to minify my extjs 4.1.3 JS and CSS files and my files are converting into minified file with name which i have given in .jsb2 file script.
And then I am referring that minified file name in my .txt file to run.
Now, I have to add some kind of versioning in minified file name to solve cache problem.
please let me know how I can add dynamic versioning like unique value in minified filename in .jsb2 file script.
is there any solution that we can do some javascript coding in .jsb2 file script?

Why does the index.html file not reference sencha-touch-all.js when I run the package command?

I created a simple Hello World application using Sencha Architect. The program automatically creates an app.html file, not index.html. Everything works great in my browser.
Next, I run the package command from Sencha Architect and it creates 100's of files in my project folder, including index.html, app.json, packager.json, etc.
The main difference between the app.html and the index.html file is the following line:
<_script src="http://cdn.sencha.com/touch/sencha-touch-2.2.1/sencha-touch-all.js"></script>"
** I added an underscore because this line was editted out
Without this line, the index.html doesn't work in the browser but the app.html does.
I could add this line manually to the index.html file but it gets overwritten every time I run the packager program.
Does anybody know why this is occurring? Is there an option or something I'm missing?

SenchaTouch Error while Building with SenchaCmd: Failed to find file(s) for depdency reference

When I want to build my app with SenchaCmd I get the following error:
Failed to find file(s) for depdency reference /workspace/SmartphoneClient/app.js::ExtRequire::Ext.ux.picker.DateTime
This is how my app.js looks:
Ext.Loader.setPath({
'Ext': 'touch/src',
'CatchMyPain': 'app',
'Ext.ux': 'extensions/ux'
});
Ext.require('Ext.ux.picker.DateTime');
Ext.require('Ext.ux.field.DateTimePicker');
The two files DateTime and DateTimePicker are in the correct folders under extension/ux/field/DateTimePicker.js and extensions/ux/picker/DateTime.js
The app works fine with the Chrome Browser and on Safari mobile Browser. There I get no Messages or Errors in the Console.
Where could be my error?
Because Sencha CMD build cannot automatically resolve the paths from the loader. However it uses classpath. This should be defined in the config file (as as comma seperated list). I haven't tested it thought because I use the sencha compile command (see bellow)
From the docs:
The sencha app build command knows where to find the source of your application due to the app.classpath configuration value stored in ".sencha/app/sencha.cfg". By default, this value is:
app.classpath=${app.dir}/app
Adding directories to this comma-separated list informs the compiler where to find the source code required to build the application.
Yours should be: app.classpath=${app.dir}/app, ${app.dir}/extensions/ux
If you use the sencha compile command:
sencha compile -classpath=./extensions/ux -classpath=./app page -in index.html -out test.html
I had to add the directory into the classpath of .sencha/app/sencha.cfg
app.classpath=${app.dir}/app.js,${app.dir}/app,${app.dir}/extensions
this way the senchaCMD found all the files.

Resources