extjs minification using jsb2 builder - extjs

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?

Related

Minified file breaks angular

So I'm working on an older solution where we're on Angular 1.6. I decided to make it somewhat more up to date by adding using ES6. We're using grunt as a task runner so I introduced babel as a watch-task, where I add transpiled files to its own dir. After that I concatinate the files to one big file using grunt-contrib-concat, and then minify by using grunt-contrib-uglify. The concatinated file runs fine, but when minified a function from babel is hoisted and with this, breaks angular when I try to run my site.
This is added to the top of the .min.js file
"use strict";function _asyncToGenerator(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){return function o(r,i){try{var a=t[r](i),d=a.value}catch(e){return void n(e)}if(!a.done)return Promise.resolve(d).then(function(e){o("next",e)},function(e){o("throw",e)});e(d)}("next")})}}
In the concatinated file, this file is added at line 3700 and doesn't break execution. Anyone tips would be greatly appreciated
Edit: This is different from the problem described bellow as all angular controllers, directives, services etc are annotated correctly.

How to Remove Angular js File from Source Code?

When I run my project, it shows my all angular.JS files in Source Code. How can I remove the js files?
You Can Use Gulp or web-pack for hide js files from source

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.

where to put compiled typescript files in angular 2 production app?

following this application structure in angular 2.
angular app structure
If I put the compiled .js and .map files in the same directory as typescript file it becomes more cluttered structure.
so, where should I place the compiled js files (.js) and map (.js.map) files?
where should I place the compiled js files (.js) and map (.js.map) files?
You can git ignore these .js / .js.map files and they will not clutter your git history and stuff (and your IDE might support hiding them as well).
That said you are free to use the outDir option to move the generated assets into a seperate directory 🌹

grunt-sencha-dependencies to process the existing php project

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!

Resources