aboutsummaryrefslogtreecommitdiffstats
path: root/docs/adk15ProgGuideDB
ModeNameSize
-rw-r--r--adk15notebook.xml1870logstatsplain
-rw-r--r--annotations.xml50617logstatsplain
-rw-r--r--aspectj-docs.css1205logstatsplain
-rw-r--r--ataspectj.xml42017logstatsplain
-rw-r--r--autoboxing.xml3964logstatsplain
-rw-r--r--covariance.xml4528logstatsplain
-rw-r--r--dd_arrow.gif851logstatsplain
-rw-r--r--enumeratedtypes.xml2606logstatsplain
-rw-r--r--generics.xml55548logstatsplain
-rw-r--r--grammar.xml6140logstatsplain
-rw-r--r--joinpointsignatures.xml19120logstatsplain
-rw-r--r--ltw.xml412logstatsplain
-rw-r--r--miscellaneous.xml2813logstatsplain
-rw-r--r--pertypewithin.xml3744logstatsplain
-rw-r--r--reflection.xml1158logstatsplain
-rw-r--r--varargs.xml8321logstatsplain
ame.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
"use strict";

module.exports = function( Release ) {

var crypto = require( "crypto" );
var shell = require( "shelljs" ),
	path = require( "path" ),
	fs = require( "fs" );

function replaceAtVersion() {
	console.log( "Replacing @VERSION..." );
	var matches = [];

	function recurse( folder ) {
		fs.readdirSync( folder ).forEach( function( fileName ) {
			var content,
				fullPath = folder + "/" + fileName;
			if ( fs.statSync( fullPath ).isDirectory() ) {
				recurse( fullPath );
				return;
			}
			content = fs.readFileSync( fullPath, {
				encoding: "utf-8"
			} );
			if ( !/@VERSION/.test( content ) ) {
				return;
			}
			matches.push( fullPath );
			fs.writeFileSync( fullPath, content.replace( /@VERSION/g, Release.newVersion ) );
		} );
	}

	[ "ui", "themes" ].forEach( recurse );

	console.log( "Replaced @VERSION in " + matches.length + " files." );

	return matches;
}

function removeExternals( packager ) {
	Object.keys( packager.builtFiles ).forEach( function( filepath ) {
		if ( /^external\//.test( filepath ) ) {
			delete packager.builtFiles[ filepath ];
		}
	} );
}

function addManifest( packager ) {
	var output = packager.builtFiles;
	output.MANIFEST = Object.keys( output ).sort( function( a, b ) {
		return a.localeCompare( b );
	} ).map( function( filepath ) {
		var md5 = crypto.createHash( "md5" );
		md5.update( output[ filepath ] );
		return filepath + " " + md5.digest( "hex" );
	} ).join( "\n" );
}

function buildCDNPackage( callback ) {
	console.log( "Building CDN package" );
	var JqueryUi = require( "download.jqueryui.com/lib/jquery-ui" );
	var PackageWithoutThemes = require( "download.jqueryui.com/lib/package-1-13" );
	var PackageOfThemes = require( "download.jqueryui.com/lib/package-1-13-themes" );
	var Packager = require( "node-packager" );

	// PackageOfThemes doesn't contain JS files, PackageWithoutThemes doesn't contain themes;
	// we need both.
	function Package() {

		// PackageOfThemes invokes PackageWithoutThemes's constructor in its own so we don't
		// need to do it by ourselves; we just need to handle prototypes that way.
		PackageOfThemes.apply( this, arguments );
	}

	Object.assign( Package.prototype, PackageWithoutThemes.prototype, PackageOfThemes.prototype );

	var jqueryUi = new JqueryUi( path.resolve( "." ) );
	var target = fs.createWriteStream( "../" + jqueryUi.pkg.name + "-" + jqueryUi.pkg.version +
		"-cdn.zip" );
	var packager = new Packager( jqueryUi.files().cache, Package, {
		components: jqueryUi.components().map( function( component ) {
			return component.name;
		} ),
		jqueryUi: jqueryUi,
		themeVars: null
	} );
	packager.ready
		.then( function() {
			removeExternals( packager );
			addManifest( packager );
			packager.toZip( target, {
				basedir: ""
			}, function( error ) {
				if ( error ) {
					Release.abort( "Failed to zip the CDN package", error );
				}
				callback();
			} );
		} )
		.catch( function( error ) {
			Release.abort( "Failed to create the CDN package", error );
		} );
}

Release.define( {
	npmPublish: true,
	issueTracker: "github",
	changelogShell: function() {
		var monthNames = [ "January", "February", "March", "April", "May", "June", "July",
				"August", "September", "October", "November", "December" ],
			now = new Date();
		return "<script>{\n\t\"title\": \"jQuery UI " + Release.newVersion + " Changelog\"\n" +
			"}</script>\n\nReleased on " + monthNames[ now.getMonth() ] + " " + now.getDate() +
			", " + now.getFullYear() + "\n\n";
	},
	generateArtifacts: function( fn ) {
		var files = replaceAtVersion();

		buildCDNPackage( function copyCdnFiles() {
			var zipFile = shell.ls( "../jquery*-cdn.zip" )[ 0 ],
				tmpFolder = "../tmp-zip-output",
				unzipCommand = "unzip -o " + zipFile + " -d " + tmpFolder;

			console.log( "Unzipping for dist/cdn copies" );
			shell.mkdir( "-p", tmpFolder );
			Release.exec( {
				command: unzipCommand,
				silent: true
			}, "Failed to unzip cdn files" );

			shell.mkdir( "-p", "dist/cdn" );
			shell.cp( tmpFolder + "/jquery-ui*.js", "dist/cdn" );
			shell.cp( "-r", tmpFolder + "/themes", "dist/cdn" );

			// Copy all the files to be published on the CDN to the dist directory
			// as well.
			shell.cp( "dist/cdn/jquery-ui.js", "dist" );
			shell.cp( "dist/cdn/jquery-ui.min.js", "dist" );
			shell.cp( "-r", "dist/cdn/themes", "dist" );

			Release.exec( "git add --force dist/jquery-ui.js",
				"Error adding dist/jquery-ui.js." );
			Release.exec( "git add --force dist/jquery-ui.min.js",
				"Error adding dist/jquery-ui.min.js." );
			Release.exec( "git add --force dist/themes",
				"Error adding dist/themes." );

			fn( files );
		} );
	}
} );

};

module.exports.dependencies = [
	"download.jqueryui.com@2.2.7",
	"node-packager@0.0.6",
	"shelljs@0.8.4"
];