Can I minimized and is it useful when the UI is completely in Javascript (ExtJS) ?
How can I minimized, a folder and all subfolders (both with .js files) ?
Can I minimized and is it useful when the UI is completely in Javascript (ExtJS) ?
How can I minimized, a folder and all subfolders (both with .js files) ?
You can minimize your Code using UglifyJS2 by providing a list of source files. UglifyJS has an option to minimize variables within different files.
var result = UglifyJS.minify([ "file1.js", "file2.js", "file3.js" ]);
console.log(result.code);
You can use require('fs')
and write a short node.js
script to load all js files in your directory and all subdirectories in an array and pass it to UglifyJS.minify
Minimization makes sense in most cases since it shortens the loading time of your scripts and hides the functionality and readability .
Copied from ==> How to form the folder structured tree in EXTJS?
Below link may help you
How to form the folder structured tree in EXTJS?
Ext.onReady(function(){
// shorthand
var Tree = Ext.tree;
var tree = new Tree.TreePanel({
useArrows: true,
autoScroll: true,
animate: true,
enableDD: true,
containerScroll: true,
border: false,
// auto create TreeLoader
dataUrl: 'get-nodes.php',
root: {
nodeType: 'async',
text: 'Ext JS',
draggable: false,
id: 'src'
}
});
// render the tree
tree.render('tree-div');
tree.getRootNode().expand();
});
Demo Link also available at there http://dev.sencha.com/deploy/ext-4.0.0/examples/tree/reorder.html