1. #1
    Sencha Premium Member
    Join Date
    May 2007
    Posts
    12
    Vote Rating
    0
    Clay is on a distinguished road

      0  

    Question shorthand element in .jsb targets

    shorthand element in .jsb targets


    I'm working on a PHP-based build tool for JSBuilder-managed projects that's a bit more than what has been done with PHP previously. (To my knowledge, anyway.)

    In parsing .jsb files, I'm baffled a bit by how the shorthand list changes per-adapter. The SVN trunk has three .jsb files, each of which have multiple build targets that all have the same YUI shorthand list.

    Reading through the actual build process here:

    http://js-builder.googlecode.com/svn...jectBuilder.cs

    ... I'm not seeing how those shorthand items are actually being used anywhere. I've seen the *result* of shorthand substitutions in Ext releases, but am thinking that some other .jsb projects are being used to do the actual release builds. This belief is based on the settings in the trunk .jsb files ... such as minify=False, and the seemingly-outdated shorthand list, among other things.

    Can someone familiar with JSBuilder and the actual build/release process for Ext comment on this? I'm aiming for very close (if not identical) output from my PHP build script relative to actual Ext release builds.

    Thanks,
    Clay

  2. #2
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    17
    jack.slocum will become famous soon enough jack.slocum will become famous soon enough

      0  

    Default


    The shorthand list isn't being used. I don't think it does anything anymore and the code it used to run may have been eliminated.
    Jack Slocum
    Ext JS Founder
    Original author of Ext JS 1, 2 & 3.
    Twitter: @jackslocum
    jack@extjs.com

  3. #3
    Sencha Premium Member
    Join Date
    May 2007
    Posts
    12
    Vote Rating
    0
    Clay is on a distinguished road

      0  

    Default


    Quote Originally Posted by jack.slocum View Post
    The shorthand list isn't being used. I don't think it does anything anymore and the code it used to run may have been eliminated.
    Hey Jack, I mention it because of lines 150-179 in /JSBuild/ProjectBuilder.cs

    Code:
    if (!target.Shorthand)
    {
    	foreach (string f in target.Includes)
    	{
    		sw.Write(files[f].Minified + "\n");
    	}
    }
    else
    {
    	string[] sh = target.ParseList();
    	StringBuilder fcn = new StringBuilder();
    	fcn.Append("(function(){");
    	int index = 0;
    	foreach (string s in sh)
    	{
    		fcn.AppendFormat("var _{0} = {1};", ++index, s);
    	}
    	sw.Write(fcn.Append("\n"));
    	foreach (string f in target.Includes)
    	{
    		string min = files[f].Minified;
    		index = 0;
    		foreach (string s in sh)
    		{
    			min = min.Replace(s, "_" + index);
    		}
    		sw.Write(min + "\n");
    	}
    	sw.Write("})();");
    }
    ... which seems close to where the slight obfuscation-for-brevity that minified Ext builds have is coming from.

    Is the conversion to "var _2=..." and so on that minimized Ext builds have sprinkled all over now coming from a procedure external to JSBuilder?

    Thanks,
    Clay

  4. #4
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    17
    jack.slocum will become famous soon enough jack.slocum will become famous soon enough

      0  

    Default


    Yes, I use ShrinkSafe for that. That's why the shorthand was axed.
    Jack Slocum
    Ext JS Founder
    Original author of Ext JS 1, 2 & 3.
    Twitter: @jackslocum
    jack@extjs.com

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi