import Sencha Touch 2.4.2 source

Extracted from ZIP file previously hosted in the (old) pve-manager
repository.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2023-05-28 16:58:02 +02:00
parent 004cd4ca24
commit c4685c8425
5190 changed files with 918936 additions and 0 deletions

View File

@ -0,0 +1,3 @@
.sencha/package/sencha.cfg={"pkgName":"ext-theme-neutral","senchadir":".sencha","uniqueId":"950d69eb-0125-4518-9150-8135087a911f"}
build.xml={"pkgName":"ext-theme-neutral","senchadir":".sencha","uniqueId":"950d69eb-0125-4518-9150-8135087a911f"}
package.json={"pkgName":"ext-theme-neutral","senchadir":".sencha","uniqueId":"950d69eb-0125-4518-9150-8135087a911f"}

View File

@ -0,0 +1,11 @@
<project basedir=".">
<!--
If framework.config.dir is already set, this next task will do nothing and
the original value will remain... but if framework.config.dir is not yet
defined, we are running in a workspace sans framework and so we need to go
directly to the plugin base from cmd.config.dir instead.
-->
<property name="framework.config.dir" value="${cmd.config.dir}"/>
<import file="${framework.config.dir}/plugin.xml"/>
</project>

View File

@ -0,0 +1,24 @@
# -----------------------------------------------------------------------------
# This file contains configuration options that apply to all applications in
# the workspace. By convention, these options start with "workspace." but any
# option can be set here. Options specified in an application's sencha.cfg will
# take priority over those values contained in this file. These options will
# take priority over configuration values in Sencha Cmd or a framework plugin.
#------------------------------------------------------------------------------
# This is the folder for build outputs in the workspace
workspace.build.dir=${workspace.dir}/build
#------------------------------------------------------------------------------
# This folder contains all generated and extracted packages.
workspace.packages.dir=${workspace.dir}/packages
# =============================================================================
# Customizations go below this divider to avoid merge conflicts on upgrade
# =============================================================================
touch.dir=${workspace.dir}
sencha.is.sdk.repo=1

78
src/SETUP.html Normal file
View File

@ -0,0 +1,78 @@
<!DOCTYPE html>
<head>
<style>
h1 {font-family: Calibri; font-size: 18pt;}
h2 {font-family: Calibri; font-size: 14pt;}
h3 {font-family: Calibri; font-size: 12pt;}
body {font-family: Calibri; font-size: 11pt;}
</style>
</head>
<body style="width: 700px">
<a href="http://sencha.com"><span style="left: 50px"></span><img src="SenchaLogo.png" width="110" height="40" /></a>
<h1>Sencha Touch Setup Guide</h1>
<p><b>Topics:</b></p>
<ul>
<li><a href="Intro">Introduction</a></li>
<li><a href="Install">Installing Sencha Touch</a></li>
<li><a href="Info">Sencha Touch Information</a></li>
</ul>
<a name="Intro"></a>
<h2>Introduction</h2>
<p>Sencha Touch, a high-performance HTML5 mobile application framework, is the cornerstone
of the Sencha HTML5 platform. Built for enabling world-class user experiences,
Sencha Touch is the only framework that enables developers to build powerful apps
that work on iOS, Android, BlackBerry, Windows Phone, and Internet Explorer 10.
<br>Learn more at <a href="http://docs.sencha.com/touch/#!/guide/whats_new">What's New</a>.
<br>Learn about new APIs in the "New in this version"
section near the end of the <a href="http://docs.sencha.com/touch/#!/api">API page</a>.</p>
<a name="Install"></a>
<h2>Installing Sencha Touch</h2>
<p>To install Sencha Touch:</p>
<ol>
<li>Download <a href="http://www.sencha.com/products/sencha-cmd/download">Sencha Cmd</a>.
Sencha Cmd enables you to publish, package, and simulate an application, as well as to upgrade Sencha software.
Sencha Cmd also installs Apache Ant, Compass, and Sass.</li>
<li>Download <a href="http://www.ruby-lang.org/en/downloads/">Ruby</a>
<ul>
<li><b>Mac OS</b>: Ruby is pre-installed. You can verify
it with the <b>ruby -v</b> command.</li>
<li><b>Windows</b> Download the open source <a href="http://www.7-zip.org">7-Zip</a> archiver.
Download Ruby (any version) from <a href="http://rubyinstaller.org/downloads/">rubyinstaller.org</a>.
Set the Path environment variable to point to the directory in which you unzip the installer file.</li>
<li><b>Ubuntu</b>: Use <b>sudo apt-get install ruby2.0.0</b> to download and install Ruby.</li>
</ul>
</li>
<li>Start your web server.
If using the Sencha Cmd web server, change directory to where you want to serve
your application, open a new command line window and start the server with the
<b>sencha&nbsp;web&nbsp;start</b> command. You can stop the server by typing
CTRL+c or opening another command line and typing the <b>sencha&nbsp;web&nbsp;stop</b> command.
You can access the Sencha Cmd web server using
the <code>http://localhost:1841/&lt;app_name&gt;</code> URL.</li>
<li>If you are using Windows and running the IIS web server, add "application/x-json"
as a MIME type; otherwise, IIS returns the JSON file with an error when you preview
your project. In Windows, enable IIS from the add/remove programs or programs and features dialog
(add/remove windows features), you can also add extra functionality by downloading the web platform
toolkit to make config of IIS features extra simple.
For information on adding this MIME type, see this
<a href="http://stackoverflow.com/a/1121114/273985">Stackoverflow article</a>.</li>
<li>Use a modern web browser such as
<a href="https://www.google.com/intl/en/chrome/browser">Chrome</a>
or <a href="http://www.apple.com/safari/">Safari</a>.</li>
</ol>
<a name="Info"></a>
<h2>Sencha Touch Information</h2>
<ul>
<li><a href="http://sencha.com/">Sencha.com</a></li>
<li><a href="http://docs.sencha.com/">Sencha Documentation</a></li>
<li><a href="release-notes.html">Sencha Touch Release Notes</a></li>
<li><a href="examples/">Sencha Touch Examples</a></li>
<li><a href="http://www.sencha.com/products/touch-bundle/">Sencha Touch Bundle</a></li>
<li><a href="http://www.sencha.com/training/">Sencha Training</a></li>
<li><a href="http://www.sencha.com/support/">Sencha Support</a></li>
</ul>
</body>
</html>

BIN
src/SenchaLogo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

164
src/build.xml Normal file
View File

@ -0,0 +1,164 @@
<project name="extjs" default="build" basedir=".">
<target name="init-antcontrib">
<taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath>
<pathelement location="${cmd.dir}/lib/ant-contrib-1.0b3.jar"/>
<pathelement
location="${cmd..dir}/lib/commons-httpclient-3.0.1.jar"/>
<pathelement
location="${cmd.dir}/lib/commons-logging-1.0.4.jar"/>
<pathelement location="${cmd.dir}/lib/commons-codec-1.3.jar"/>
</classpath>
</taskdef>
</target>
<target name="init-sencha-cmd" depends="init-antcontrib">
<taskdef resource="com/sencha/ant/antlib.xml" classpath="${cmd.dir}/sencha.jar"/>
</target>
<target name="build" depends="init-sencha-cmd">
<property name="build.dir" location="${basedir}"/>
<property name="classpath.excludes"
value="auth2/Auth.js,scroller/Infinite.js,locale,platform/src"/>
<!--
Produce base concatenation for standard distribution files
-->
<x-sencha-command>
<![CDATA[
compile
--ignore=${classpath.excludes}
--include-preprocessor-tags=true
--options=debug:true,product:touch,minVersion:3,logger:yes,charts:yes
exclude
-namespace=Ext.device
and
exclude
-file=src/ux
and
concatenate
--output-file=${build.dir}/sencha-touch-all-debug.js
and
union
--tag=core
and
concatenate
--output-file=${build.dir}/sencha-touch-debug.js
and
include
+all
and
exclude
--tag=core
and
metadata
+append
+alternates
--base-path=${build.dir}
--output-file=${build.dir}/sencha-touch-debug.js
and
metadata
+append
+alias
--base-path=${build.dir}
--output-file=${build.dir}/sencha-touch-debug.js
and
--options=debug:false,logger:no
union
+all
and
exclude
-namespace=Ext.device
and
exclude
-file=src/ux
and
concatenate
+yui
--output-file=${build.dir}/sencha-touch-all.js
and
--options=debug:true,minVersion:2,logger:yes
concatenate
--output-file=${build.dir}/builds/sencha-touch-all-compat.js
]]>
</x-sencha-command>
<loadfile property="header.text" srcfile="${build.dir}/file-header.txt"/>
<property name="header.comment" value="${header.text}"/>
<!--
Apply yui compressor
-->
<x-compress-js
srcfile="${build.dir}/sencha-touch-debug.js"
outfile="${build.dir}/sencha-touch.js"/>
<!--
Add license headers
-->
<for param="file">
<path>
<fileset dir="${build.dir}" includes="*.js"/>
<fileset dir="${build.dir}/builds" includes="*.js"/>
</path>
<sequential>
<move file="@{file}" tofile="@{file}.tmp"/>
<concat destfile="@{file}">
<header>${header.comment}</header>
<fileset file="@{file}.tmp"/>
</concat>
<delete file="@{file}.tmp"/>
</sequential>
</for>
</target>
<target name="build-examples" depends="init-sencha-cmd">
<local name="example.workspace.build.dir"/>
<property name="example.workspace.build.dir"
value="${basedir}/built-examples"/>
<delete dir="${example.workspace.build.dir}"/>
<for param="example">
<dirset dir="${basedir}/examples" includes="*"/>
<sequential>
<local name="example.name"/>
<local name="example.build.dir"/>
<basename file="@{example}" property="example.name"/>
<property name="example.build.dir"
value="${example.workspace.build.dir}/${example.name}"/>
<if>
<and>
<available file="@{example}/.sencha/app/sencha.cfg"/>
<available file="@{example}/build.xml"/>
</and>
<then>
<x-sencha-command dir="@{example}" inheritall="false">
<property name="app.build.dir" value="${example.build.dir}"/>
<property name="build.dir" value="${example.build.dir}/production"/>
<property name="skip.sass" value="1"/>
app
build
</x-sencha-command>
<delete dir="@{example}/archive"/>
<move todir="${example.build.dir}">
<fileset dir="${example.build.dir}/production" includes="**/*"/>
</move>
<delete dir="${example.build.dir}/production"/>
</then>
<else>
<copy todir="${example.build.dir}">
<fileset dir="@{example}" includes="**/*"/>
</copy>
</else>
</if>
</sequential>
</for>
<copy todir="${example.workspace.build.dir}">
<fileset dir="${basedir}/examples" includes="*"/>
</copy>
</target>
</project>

File diff suppressed because it is too large Load Diff

13
src/cmd/sencha.cfg Normal file
View File

@ -0,0 +1,13 @@
# This is the SDK version. By defining this property, we are declaring this
# folder to be an SDK distribution.
framework.name=touch
framework.version=2.4.2.571
framework.classpath=${framework.dir}/src
#------------------------------------------------------
# This is the minimum required Sencha Cmd version:
framework.cmd.minver=3.1.0.53
# This is the current version of the Sencha Cmd at the time of this SDK release:
framework.cmd.version=4.0.5.87

12
src/docs/index.html Normal file
View File

@ -0,0 +1,12 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<HTML>
<HEAD>
<TITLE>Sencha Touch</TITLE>
<SCRIPT TYPE="text/javascript">
document.location.href = 'http://docs.sencha.com/touch/';
</SCRIPT>
</HEAD>
<BODY>
Redirecting to Sencha Touch documentation...
</BODY>
</HTML>

View File

@ -0,0 +1,3 @@
<project basedir=".">
<import file="${framework.config.dir}/plugin.xml"/>
</project>

View File

@ -0,0 +1,2 @@
touch.dir=${workspace.dir}/../
workspace.build.dir=${framework.dir}/built-examples

View File

@ -0,0 +1,609 @@
importPackage(com.sencha.tools.compressors.yui);
importPackage(com.sencha.tools.compressors.closure);
importPackage(com.sencha.tools.external);
importPackage(com.sencha.tools.compiler.jsb.statements);
var _logger = SenchaLogManager.getLogger("app-build");
function runAppBuild(proj) {
var basedir = proj.getProperty("framework.config.dir"),
appPath = proj.getProperty("args.path"),
envArg = proj.getProperty("args.environment"),
ignores = proj.getProperty("framework.ignores"),
options = proj.getProperty("build.options"),
cssCompression = proj.getProperty("build.compress.css"),
config = readConfig(resolvePath(appPath, "app.json")),
environment = (envArg == "native") ? 'package' : envArg,
destination =
(proj.getProperty("args.destination") + '') ||
(proj.getProperty("build.dir") + '') ||
(proj.getProperty("app.build.dir") + ''),
operations = toJS(proj.getProperty("build.operations")),
v2deps = !!(proj.getProperty("v2deps") == "true"),
src = appPath,
sdk = proj.getProperty("framework.dir"),
archive =
(proj.getProperty("args.archive") + '') ||
(config.archivePath) ||
"archive",
nativePackaging = !!(envArg == 'native'),
indexHtmlPath = config.indexHtmlPath || 'index.html',
appUrl = config.url || resolvePath(src, indexHtmlPath),
jsAssets = config.js || [],
cssAssets = config.css || [],
appCache = config.appCache,
ignore = config.ignore,
remoteAssets = [],
extras = config.extras || config.resources,
appJs, sdkJs, sdkIsAll, assets, processIndex;
destination = joinPath(destination, environment);
if(!PathUtil.isAbsolute(archive)) {
archive = resolvePath(appPath, archive);
}
if (operations) {
operations = operations.split('\n');
} else {
operations = [];
}
if (appUrl.indexOf("file:") != 0 && appUrl.indexOf("http:") != 0) {
appUrl = 'file:///' + StringUtil.replace(resolvePath(appUrl), '\\', '/');
}
// check for build dir being immediate child of application dir
// native packager can get in to infinite looping when scanning files
// under this scenario
var canonicalAppPath = new File(appPath).getCanonicalPath(),
canonicalDestPath = new File(destination).getCanonicalPath(),
parent = new File(canonicalDestPath).getParentFile();
if(parent && parent.getCanonicalPath() == canonicalAppPath) {
_logger.error("Application : {}", canonicalAppPath);
_logger.error("Destination : {}", canonicalDestPath);
_logger.error("Destination path cannot reside one level under the Application directory")
throw "Destination path cannot reside one level under the Application directory";
}
_logger.info("Deploying your application to " + destination);
PathUtil.ensurePathExists(resolvePath(destination));
jsAssets = each(
map(jsAssets, function (asset) {
if (typeof asset == 'string') {
asset = { path:asset };
}
asset.type = 'js';
return asset;
}),
function (jsAsset) {
if (jsAsset.bundle) {
appJs = jsAsset.path;
}
});
if (!appJs) {
appJs = 'app.js';
}
appJs = resolvePath(destination, appJs);
cssAssets = map(cssAssets, function (asset) {
if (typeof asset == 'string') {
asset = { path:asset };
}
asset.type = 'css';
return asset;
});
assets = filter(concat(jsAssets, cssAssets), function (asset) {
return !asset.shared || (environment != 'production');
});
_logger.debug("copying all assets");
each(assets, function (asset) {
if (asset.remote) {
asset.bundle = false;
asset.update = false;
remoteAssets.push(asset);
} else {
file = asset.path;
// if not in testing mode, and using the new compiler, and this is
// one of the sencha-touch files, don't copy to output directory
if( asset.type === 'js' &&
!v2deps &&
file.indexOf("sencha-touch") != -1) {
asset['x-bootstrap'] = true;
// only skip the sdk code in the bundle if the bundle flag
// on the sdk asset is explicitly set to false
if(('bundle' in asset) && asset.bundle === false) {
sdkJs = asset.path;
sdkIsAll = sdkJs.indexOf("-all.js") >= 0;
asset.isSdk = true;
}
}
if (asset['x-bootstrap'] && !asset.isSdk) {
return;
}
_logger.debug("copying file {}", resolvePath(src, file));
var srcPath = resolvePath(src, file),
dstPath = resolvePath(destination, stripSpecialDirNames(file));
if(srcPath != dstPath) {
PathUtil.ensurePathExists(dstPath);
copy(srcPath, dstPath);
_logger.info("Copied {} to {}", srcPath, dstPath);
}
}
});
var ignoreFilter = Filter.getFileNameFilter(
new RegexFilter(ignore).setInclusive(false));
_logger.debug("copying all extras");
each(extras, function (extra) {
var from = resolvePath(src, extra),
to = resolvePath(destination, extra);
_logger.debug("Copying from {} to {}", from, to);
if (new File(from).exists()) {
PathUtil.ensurePathExists(to);
copy(from, to, ignoreFilter);
_logger.info("Copied {}", from);
} else {
_logger.warn("File or folder {} not found", from);
}
});
// build the app
processIndex = function () {
_logger.debug("processing page : index.html");
jsAssets = filter(jsAssets, function(asset){
return !(asset['x-bootstrap'] && !asset.isSdk);
});
var appJson = jsonEncode({
id:config.id,
js:jsAssets,
css:cssAssets
}),
indexHtml, content, compressor, remotes, microloader;
writeFileContent(new File(destination, 'app.json'), appJson);
_logger.info("Generated app.json");
indexHtml = readFileContent(new File(src, indexHtmlPath));
if (environment == 'production' && appCache) {
indexHtml = StringUtil.replace(
indexHtml,
'<html manifest=""',
'<html manifest="cache.appcache"');
}
compressor = new ClosureCompressor();
microloader = (environment == 'production'
? 'production'
: 'testing') +
'.js';
_logger.debug("using microloader : {}", microloader);
content = readFileContent(joinPath(sdk, "microloader", microloader));
content = compressor.compress(content);
remotes = [
'<script type="text/javascript">' +
content + ';Ext.blink(' +
(environment == 'production' ? jsonEncode({
id:config.id
}) : appJson) + ')' +
'</script>'
];
each(remoteAssets, function (asset) {
var uri = asset.path;
if (asset.type === 'js') {
remotes.push(
'<script type="text/javascript" src="' +
uri +
'"></script>');
} else if (asset.type === 'css') {
remotes.push(
'<link rel="stylesheet" type="text/css" href="' +
uri +
'" />');
}
});
indexHtml = ('' + indexHtml).replace(
/<script id="microloader"([^<]+)<\/script>/,
remotes.join(''));
_logger.debug("generating new built index.html");
writeFileContent(resolvePath(destination, indexHtmlPath), indexHtml);
_logger.info("Embedded microloader into " + indexHtmlPath);
};
_logger.info("Resolving your application dependencies (" + appUrl + ")");
var preprocessor = new Parser(),
jsCompressor = new YuiJavascriptCompressor(),
cssCompressor = new YuiCssCompressor(),
phantomRunner = new PhantomJsRunner(),
processedAssetCount = 0,
assetsCount, dependencies, files, file,
destinationFile, compressor,
cleanFile, cleanDestinationFile;
if(v2deps) {
// if v2deps, use the sencha command 2 sytle dependency resolution mechanism
// by running the phantomjs dependencies.js script
var phantomOut = phantomRunner.run([
resolvePath(basedir, "dependencies.js"),
appUrl
]),
exitCode = phantomOut.getExitCode(),
stdout = phantomOut.getOutput(),
buffer = new StringBuilder();
if (exitCode > 0) {
_logger.error("dependencies.js exited with non-zero code : " + exitCode);
_logger.error(stdout);
throw new ExBuild("failed gathering dependencies").raise();
}
dependencies = jsonDecode(stdout);
_logger.info("Found " + dependencies.length + " dependencies. Concatenating all into '" + appJs + "'");
files = map(dependencies, function (dependency) {
return resolvePath(src, dependency.path);
});
files.push(appJs);
each(files, function (file) {
buffer.append(FileUtil.readUnicodeFile(resolvePath(file))).append('\n');
});
writeFileContent(appJs, buffer.toString());
// clear the buffer to free memory
buffer.setLength(0);
} else {
var sdkTag = sdkIsAll ? 'framework' : 'core',
sdkFile = sdkJs,
sdkJsArgs = [
'--options=' + options,
'union',
'-tag',
sdkTag,
'and',
'concat',
'-out=' + resolvePath(destination, sdkFile)
],
appJsArgs = [
'-options=' + options,
'restore',
'app-all',
'and',
'exclude',
'-tag',
sdkTag,
'and',
'concatenate',
'-out=' + appJs,
''],
compilerId = proj.getProperty("compiler.ref.id"),
compiler = proj.getReference(compilerId);
if(sdkJs) {
_logger.info("Compiling " + sdkFile + " and dependencies");
_logger.debug("running compiler with options : '{}'", sdkJsArgs.join(' '));
compiler.dispatchArgs(sdkJsArgs);
_logger.info("Compiling app.js and dependencies");
_logger.debug("running compiler with options : '{}'", appJsArgs.join(' '));
compiler.dispatchArgs(appJsArgs);
_logger.info("Completed compilation.");
} else {
appJsArgs = [
'-options=' + options,
'restore',
'app-all',
'and',
'concatenate',
'-out=' + appJs,
''];
_logger.debug("running compiler with options : '{}'", appJsArgs.join(' '));
compiler.dispatchArgs(appJsArgs);
_logger.info("Completed compilation.");
}
}
for (var name in config.buildOptions) {
if (config.buildOptions.hasOwnProperty(name)) {
preprocessor.setParam(name, config.buildOptions[name]);
}
}
assetsCount = assets.length;
each(assets, function (asset) {
if(!asset.remote) {
file = asset.path;
destinationFile = resolvePath(destination, file),
cleanFile = stripSpecialDirNames(file),
cleanDestinationFile = resolvePath(destination, cleanFile);
// adjust the asset path to use the cleaned filename
asset.path = cleanFile;
}
_logger.debug("Assets => Processed : {} Total : {}",
processedAssetCount, assetsCount);
if (asset.type == 'js') {
if (!asset.remote && !(asset['x-bootstrap'] && !asset.isSdk)) {
_logger.debug("running preprocessor for file {}", cleanDestinationFile);
writeFileContent(
cleanDestinationFile,
preprocessor.parse(readFileContent(cleanDestinationFile)));
_logger.info('Processed local file ' + asset.path);
} else {
_logger.info('Processed remote file ' + asset.path);
}
}
if (environment == 'testing') {
return;
}
if (asset.remote || (asset['x-bootstrap'] && !asset.isSdk)) {
++processedAssetCount;
} else {
_logger.debug("Minifying " + file);
if(asset.type == 'js') {
writeFileContent(
cleanDestinationFile,
jsCompressor.compress(readFileContent(cleanDestinationFile)));
_logger.info("Minified " + file);
} else if (cssCompression == "true") {
writeFileContent(
cleanDestinationFile,
cssCompressor.compress(readFileContent(cleanDestinationFile)));
_logger.info("Minified " + file);
}
if (environment == 'production') {
var content = readFileContent(cleanDestinationFile),
version = '' + FileUtil.createChecksum(content);
asset.version = version;
_logger.debug("prepending checksum on {}", cleanDestinationFile);
writeFileContent(
cleanDestinationFile,
"/*" + version + "*/" + content);
content = "";
_logger.debug("copying destination to archive");
PathUtil.ensurePathExists(resolvePath(archive, cleanFile, version));
copy(cleanDestinationFile, resolvePath(archive, cleanFile, version));
if (asset.update == 'delta') {
// generate all the deltas to the other archived versions
_logger.debug("generating file deltas");
var archivedVersions = new File(joinPath(archive, cleanFile))
.listFiles();
each(archivedVersions, function (archivedVersion) {
if(archivedVersion.isDirectory()) {
return;
}
archivedVersion = archivedVersion.name;
if (archivedVersion == version) {
return;
}
var deltaFile = joinPath(
destination,
'deltas',
cleanFile,
archivedVersion + '.json');
writeFileContent(deltaFile, '');
_logger.debug("Generating delta from {} to {}",
archivedVersion,
version);
var runner = new VcDiffRunner(),
args = [
'encode',
'-json',
'-dictionary',
joinPath(archive, cleanFile, archivedVersion),
'-target',
cleanDestinationFile,
'-delta',
resolvePath(deltaFile),
'--stats'
],
runnerOut = runner.run(args),
exitCode = runnerOut.getExitCode(),
stdout = runnerOut.getOutput();
if (exitCode > 0) {
_logger.error("failed generating diff from {} to {}",
archivedVersion,
version);
_logger.error(stdout);
throw new ExBuild("failed generating diff from {0} to {1}",
archivedVersion,
version).raise();
}
// fixup malformed vcdiff content
var deltaFilePath = resolvePath(deltaFile),
content = FileUtil.readFile(deltaFilePath);
if(content.endsWith(",]")) {
_logger.debug("Correcting trailing comma issue in vcdiff output");
FileUtil.writeFile(deltaFilePath, content.substring(0, content.length() - 2) + "]");
}
content = null;
_logger.info(
"Generated delta for: {} from hash: '{}' to hash: '{}'",
[cleanFile, archivedVersion, version]);
});
}
}
if (++processedAssetCount == assetsCount) {
_logger.debug("processed all assets, finalizing build...");
processIndex();
if (environment == 'production' && appCache) {
_logger.info("Generating appcache");
appCache.cache = map(appCache.cache, function (cache) {
var checksum = '';
if (!/^(\/|(.*):\/\/)/.test(cache)) {
_logger.info(
"Generating checksum for appCache item: {}",
cache);
checksum = FileUtil.createChecksum(
readFileData(joinPath(destination, cache)));
}
return {
uri:cache,
checksum:checksum
}
});
writeAppCache(appCache, joinPath(destination, 'cache.appcache'));
}
if (nativePackaging) {
_logger.info("Generating native package");
var packagerConfig = readConfig(
joinPath(src, 'packager.json'));
if (packagerConfig.platform.match(/iOS/)) {
copy(
resolvePath(joinPath(src, 'resources', 'icons')),
resolvePath(destination),
ignoreFilter);
copy(
resolvePath(joinPath(src, 'resources', 'loading')),
resolvePath(destination),
ignoreFilter);
}
// add '' here to coerce to javascript string instead of java string
// for json encoding later...
packagerConfig.inputPath = destination + '';
var origDestination = proj.getProperty("args.destination"),
nativePackagePath = proj.getProperty("native.build.dir") ||
joinPath(origDestination, "native");
packagerConfig.outputPath = resolvePath(nativePackagePath) + '';
PathUtil.ensurePathExists(packagerConfig.outputPath);
writeFileContent(
joinPath(src, 'packager.temp.json'),
jsonEncode(packagerConfig, true));
_logger.info(
"Packaging your application as a native app to {} ...",
packagerConfig.outputPath);
var stbuildRunner = new StBuildRunner(),
args = ['package', resolvePath(src, 'packager.temp.json')],
stbuildOut = stbuildRunner.run(args),
exitCode = stbuildOut.getExitCode(),
stdout = stbuildOut.getOutput();
if (exitCode > 0) {
_logger.error("failed running native packager");
_logger.error(stdout);
throw new ExBuild("failed running native packager")
.raise();
} else {
_logger.info("Successfully packaged native application");
_logger.info(
"Package may be run with 'sencha package run -p {}",
joinPath(src, 'packager.temp.json'))
}
} else {
_logger.debug("skipping native packaging");
}
}
}
});
if (environment == 'testing') {
processIndex();
}
_logger.info("Successfully deployed your application to " + destination);
};
function writeAppCache(appCache, outfile) {
_logger.debug("generating appcache manifest...");
// build the appCache file
var builder = new StringBuilder();
builder.append("CACHE MANIFEST\n");
each(appCache.cache, function (cache) {
builder.append("# " + cache.checksum + "\n");
builder.append(cache.uri + "\n");
});
builder.append("\n\nFALLBACK:\n");
each(appCache.fallback, function (fallback) {
builder.append(fallback + '\n');
});
builder.append("\n\nNETWORK:\n");
each(appCache.network, function (network) {
builder.append(network + '\n');
});
writeFileContent(
outfile,
builder.toString());
builder.setLength(0);
};
(function (proj) {
_logger.info("building application");
runAppBuild(proj);
})(project);

View File

@ -0,0 +1,503 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
********************************** DO NOT EDIT **********************************
This file will be replaced during upgrades so DO NOT EDIT this file. If you need to
adjust the process, reading and understanding this file is the first step.
In most cases, the adjustments can be achieved by setting properties or providing one
of the "hooks" in the form of a "-before-" or "-after-" target. Whenever possible, look
for one of these solutions.
Failing that, you can copy whole targets to your build.xml file and it will overrride
the target provided here. Doing that can create problems for upgrading to newer
versions of Cmd so it is not recommended but it will be easier to manage than editing
this file in most cases.
-->
<project name="app-build-impl">
<!--
===============================================================
helper targets for ant integrations with IDE's
(human readable target names)
===============================================================
-->
<target name="-before-build-testing"/>
<target name="-build-testing" depends="testing,build"/>
<target name="-after-build-testing"/>
<target name="build-testing"
depends="-before-build-testing,
-build-testing,
-after-build-testing"/>
<target name="Build - Testing"
description="Create a Testing build of this project"
depends="build-testing"/>
<target name="-before-build-production"/>
<target name="-build-production" depends="production,build"/>
<target name="-after-build-production"/>
<target name="build-production"
depends="-before-build-production,
-build-production,
-after-build-production"/>
<target name="Build - Production"
description="Create a Production build of this project"
depends="build-production"/>
<target name="-before-build-native"/>
<target name="-build-native" depends="native,build"/>
<target name="-after-build-native"/>
<target name="build-native"
depends="-before-build-native,
-build-native,
-after-build-native"/>
<target name="Build - Native"
description="Create a Native build of this project"
depends="build-native"/>
<target name="-before-start-local-webserver"/>
<target name="-start-local-webserver" depends="init">
<x-launch-terminal>
<![CDATA[
${cmd.dir}/sencha fs web -port=${build.web.port} start -map=${build.web.root}
]]>
</x-launch-terminal>
</target>
<target name="-after-start-local-webserver"/>
<target name="start-local-webserver"
depends="-before-start-local-webserver,
-start-local-webserver,
-after-start-local-webserver"/>
<target name="WebServer - Start Local"
description="Starts a local webserver for this project"
depends="start-local-webserver"/>
<target name="-before-compass-watch"/>
<target name="-compass-watch" depends="init">
<x-launch-terminal>
compass watch ${app.sass.dir}
</x-launch-terminal>
</target>
<target name="-after-compass-watch"/>
<target name="compass-watch"
depends="-before-compass-watch,
-compass-watch,
-after-compass-watch"/>
<target name="Compass - Watch"
description="Opens terminal and watches for SASS updates"
depends="compass-watch"/>
<!--
===============================================================
environment setters
===============================================================
-->
<target name="production"
description="Sets the build environment to production.">
<property name="build.environment" value="production"/>
</target>
<target name="testing"
description="Sets the build environment to testing.">
<property name="build.environment" value="testing"/>
</target>
<target name="native"
description="Sets the build environment to native.">
<property name="build.environment" value="native"/>
</target>
<target name="package"
description="Sets the build environment to package.">
<property name="build.environment" value="package"/>
</target>
<!--
===============================================================
Find Cmd
uses targets from find-cmd-impl.xml to detect the current
install of Sencha Cmd
===============================================================
-->
<import file="${basedir}/.sencha/app/find-cmd-impl.xml"/>
<target name="init-cmd"
depends="find-cmd-in-path,
find-cmd-in-environment,
find-cmd-in-shell">
<echo>Using Sencha Cmd from ${cmd.dir} for ${ant.file}</echo>
<!--
load the sencha.jar ant task definitions.
NOTE: the 'loaderref' attribute stores this task def's class loader
on the project by that name, so it will be sharable across sub-projects.
This fixes out-of-memory issues, as well as increases performance.
To supoprt this, it is recommended that any customizations that use
'ant' or 'antcall' tasks set 'inheritrefs=true' on those tasks, in order
to propagate the senchaloader reference to those subprojects.
The sencha 'x-ant-call' task, which extends 'antcall' and defaults
'inheritrefs' to true, may be used in place of antcall in
build process customizations.
-->
<taskdef resource="com/sencha/ant/antlib.xml"
classpath="${cmd.dir}/sencha.jar"
loaderref="senchaloader"/>
<!--
Some operations require sencha.jar in the current java classpath,
so this will extend the java.lang.Thread#contextClassLoader with the
specified java classpath entries
-->
<x-extend-classpath>
<jar path="${cmd.dir}/sencha.jar"/>
</x-extend-classpath>
</target>
<!--
===============================================================
Init
uses targets from init-impl.xml to load Sencha Cmd config
system properties and ant task definitions
===============================================================
-->
<import file="${basedir}/.sencha/app/init-impl.xml"/>
<target name="init"
depends="init-local,
init-cmd,
-before-init,
-init,
-after-init,
-before-init-defaults,
-init-defaults,
-after-init-defaults,
-init-compiler"/>
<!--
===============================================================
Build
this is the starting point for the build process. The 'depends'
attribute on the -build target controls the ordering of the
different build phases
===============================================================
-->
<target name="-before-build"/>
<target name="-build"
depends="refresh,
resolve,
js,
resources,
sass,
slice,
page,
native-package"/>
<target name="-after-build"/>
<target name="build"
depends="init,-before-build,-build,-after-build"
description="Builds the application"/>
<!--
===============================================================
Clean
removes all artifacts from the output build directories
===============================================================
-->
<target name="-before-clean"/>
<target name="-clean">
<delete dir="${build.dir}"/>
<delete dir="${build.temp.dir}"/>
</target>
<target name="-after-clean"/>
<target name="clean"
depends="init"
description="Removes all build output produced by the 'build' target">
<x-ant-call unless="skip.clean">
<target name="-before-clean"/>
<target name="-clean"/>
<target name="-after-clean"/>
</x-ant-call>
</target>
<!--
===============================================================
Watch
uses targets from watch-impl.xml to initiate the application
watch process using instrumented state from the compiler
===============================================================
-->
<import file="${basedir}/.sencha/app/watch-impl.xml"/>
<target name="watch">
<property name="build.optimize" value=""/>
<x-ant-call>
<target name="-before-watch"/>
<target name="-watch"/>
<target name="-after-watch"/>
</x-ant-call>
</target>
<!--
===============================================================
JS
uses targets from js-impl.xml to produce the output js files
containing needed application and framework js classes
===============================================================
-->
<import file="${basedir}/.sencha/app/js-impl.xml"/>
<target name="js"
depends="init"
description="Builds the output javascript file(s)">
<x-ant-call unless="skip.js">
<target name="-before-js"/>
<target name="-js"/>
<target name="-after-js"/>
</x-ant-call>
</target>
<!--
===============================================================
Sass
uses targets from sass-impl.xml to produce the output css
files for the application's styling
===============================================================
-->
<import file="${basedir}/.sencha/app/sass-impl.xml"/>
<target name="sass"
depends="init"
description="Builds the Sass files using Compass.">
<x-ant-call unless="skip.sass">
<target name="-before-sass"/>
<target name="-sass"/>
<target name="-after-sass"/>
</x-ant-call>
</target>
<!--
===============================================================
Resources
uses targets from resources-impl.xml to copy resources from
the application and required packages to the output directory
===============================================================
-->
<import file="${basedir}/.sencha/app/resources-impl.xml"/>
<target name="resources"
depends="init"
description="Copy resources to build folder.">
<x-ant-call unless="skip.resources">
<target name="-before-resources"/>
<!-- Legacy targets: -->
<target name="-before-inherit-resources"/>
<target name="-before-copy-resources"/>
<target name="-resources"/>
<!-- Legacy targets: -->
<target name="-after-copy-resources"/>
<target name="-after-inherit-resources"/>
<target name="-after-resources"/>
</x-ant-call>
</target>
<!--
===============================================================
Slice
uses targets from slice-impl.xml to extract theme images from
the application for use with older browsers that don't
support modern css features
===============================================================
-->
<import file="${basedir}/.sencha/app/slice-impl.xml"/>
<target name="slice"
depends="init"
description="Slices CSS3 theme to produce non-CSS3 images and sprites.">
<x-ant-call unless="skip.slice">
<target name="-before-slice"/>
<target name="-slice"/>
<target name="-after-slice"/>
</x-ant-call>
</target>
<!--
Theme - this is a legacy support target for extjs 4.1 apps. It redirects
to the "slice" ant target
-->
<target name="theme"
depends="init"
description="Builds the application's theme(s) images using the slicer (Ext JS 4.1 only).">
<x-ant-call unless="skip.theme">
<target name="-before-theme"/>
<target name="slice"/>
<target name="-after-theme"/>
</x-ant-call>
</target>
<!--
Refresh Theme - uses targets from refresh-impl.xml to rebuild the current
theme
-->
<target name="refresh-theme"
depends="init"
description="Rebuilds the currently enabled app theme (Ext JS 4.1 only).">
<x-ant-call unless="skip.theme">
<target name="-before-refresh-theme"/>
<target name="-refresh-theme"/>
<target name="-after-refresh-theme"/>
</x-ant-call>
</target>
<!--
===============================================================
Refresh
uses targets from refresh-impl.xml to generate bootstrapping
information for the application
===============================================================
-->
<import file="${basedir}/.sencha/app/refresh-impl.xml"/>
<target name="refresh"
depends="init"
description="Refreshes the application bootstrap data.">
<x-ant-call unless="skip.refresh">
<target name="-before-refresh"/>
<target name="-refresh"/>
<target name="-after-refresh"/>
</x-ant-call>
</target>
<!--
===============================================================
Page
uses targets from page-impl.xml to generate the output markup
file and associated microloader / app manifest
===============================================================
-->
<import file="${basedir}/.sencha/app/page-impl.xml"/>
<target name="page"
depends="init"
description="Builds the application's HTML page.">
<x-ant-call unless="skip.page">
<target name="-before-page"/>
<target name="-page"/>
<target name="-after-page"/>
</x-ant-call>
</target>
<!--
===============================================================
Resolve
uses targets from resolve-impl.xml to detect dynamic app
dependencies using phantomjs
===============================================================
-->
<import file="${basedir}/.sencha/app/resolve-impl.xml"/>
<target name="resolve"
depends="init"
description="Resolve application dependencies dynamically.">
<x-ant-call unless="skip.resolve">
<target name="-before-resolve"/>
<target name="-resolve"/>
<target name="-after-resolve"/>
</x-ant-call>
</target>
<!--
===============================================================
Native Package
uses targets from packager-impl.xml to run native packager
applications to produce stand-alone installable web apps from
this built Cmd application
===============================================================
-->
<import file="${basedir}/.sencha/app/packager-impl.xml"/>
<target name="native-package"
depends="init"
description="Builds native packages of the application">
<x-ant-call unless="skip.native-package">
<target name="-before-native-package"/>
<target name="-native-package"/>
<target name="-after-native-package"/>
</x-ant-call>
</target>
<!--
===============================================================
Help - properties
displays all current ant properties
===============================================================
-->
<target name=".props" depends="init"
description="Lists all properties defined for the build">
<echoproperties/>
</target>
<!--
===============================================================
Help - docs
displays the help message
===============================================================
-->
<target name=".help" depends="init"
description="Provides help on the build script">
<x-get-project-targets property="help.message"/>
<echo><![CDATA[${help.message}
This is the main build script for your application.
The following properties can be used to disable certain steps in the build
process.
* skip.page Do not build the HTML page.
* skip.js Do not build the output js code file(s)
* skip.resources Do not copy resources to the build directory
* skip.sass Do not build the SASS.
* skip.slice Do not build the theme image slicer.
* skip.theme Do not build the theme images.
The following properties can be used to modify the build process.
* build.compression.yui Specify yui compression for the build
* build.compression.closure Specify closure compression for the build
* build.compression.uglify Specify uglify compression for the build
* build.options Set general options for the build
(eg: enable a debug build)
To modify any of the previous build specific options, see:
${basedir}/.sencha/app/${build.environment}.properties
* build.operations Insert commands into the compile command
for the build.
* app.page.name Set the input and output page file
for the compile command.
* build.classes.name Specify the compiled js file
For details about how these options affect your build, see
${basedir}/.sencha/app/build-impl.xml
These options can be stored in a local.properties file in this folder or in the
local.properties file in the workspace.
Alternatively, these can be supplied on the command line. For example:
ant -Dskip.sass=1 build
To see all currently defined properties, do this:
ant .props
]]></echo>
</target>
</project>

View File

@ -0,0 +1,20 @@
# =============================================================================
# This file provides an override point for default variables defined in these
# lower priority files:
#
# - touch.properties
# - *.defaults.properties
# - defaults.properties
#
# To override a property based on build.environment instead add properties to
# one of these higher priority files:
#
# - production.properties
# - testing.properties
# - native.properties
# - package.properties
#
# IMPORTANT - Sencha Cmd will merge your changes with its own during upgrades.
# To avoid potential merge conflicts avoid making large, sweeping changes to
# this file.
# =============================================================================

View File

@ -0,0 +1,282 @@
{
"sources": {
"app.scss.tpl.merge": {
"3d3f6b023c31a4e49cd626dd27cff9474aff32d7": "eJx9kL1uAyEQhHs/xXRnS8nRx40lK0Xq8wusYc8QceyJH5/99gHsOh3MDLMfqxQuljGL97K5cEPeBN4FTnDLKjEjV9vwTMVnTBy0JVykaNuMhUf8zHhKAUXGtThvaslOKRACb6/MByIvcud+AwXTO8mY9jBCtoDzNEECsqyQudtXStzl/Wadtq3SJZCPTOYJF7Qvhk09vEpoXcffVCtm5/kw7k5v+iF15M/ckNX7H8Pxf1+R9zXTZp5LyrJAi2HcpG7FcuRx7N73g5bVV60il9SXV8GdrhSLe7jw1UKnN2rX90NJHIfD8Q/mSX+o"
},
"config.rb.tpl.merge": {
"e254e92dd21bc9ecb27f3b8251d67dfbc79fa1af": "eJxlkMFOwzAMhu95Cqs7bEiQB0DaCTGEtAPiBSIrddtAG5c4ASrEu+N00kDjYtl/7O+PvYEHypAHgjYk8pnTohVWKQh4jl3oS8IcOEIXRgL6DJIFQjQ6AHs4qGg1jTjRzrnD4/HeuStjNnBkbFeyUPQD3mQufoAuaeMHp1fAknlSssdxXKwZa/tKe+EQd4q8hq2123P8Oo8+YR6+q5RIuCRPUgu1mjRbve94mlEuFhAjqrlZp/XjamD8b3nh3FjbaNSGZgU+01vRAwHGBbBtQ+XhqPyTzzyWPkSBgRJZEybsSdyfA/0Dn1qUzSXPJTvJix53D7eVqGsJtYbie0gcJ4q5vsyJ2+KrsfkBl52Ucw\u003d\u003d"
},
"build.properties.merge": {
"ec0f832e80d63d776086203cffe9fed5c73b4294": "eJytUstOw0AMvPcrRuoNQT8AiQPixIGHoD/gZp3E6saOdjeJ+vc4fagSQZy6N3vs8YzXazzd8q3W2LaSUUtk9MlGCZxBChs5JQ/Qm2hBbQmBaxpiwUhJaBe9zjOiHCCK0nJmZ4s2cXImsSTlcOTNj6u1I8ADig1Vu/E5PacinM/pu82ZOy+xP5FZtl01Es7gATvKLsgUu0Fi2LCOkkw7dg+iuTAFUAi4krkmZzNlWH1ygVaa9h8T3huGqojpUm3hXESbJaBUZORlvqdqTw3/dvf69vnxtX1+33rJN2vVEl66gEliRMepYRxsSPC8Nu5hktJCSoZNijAkl4ChbxL5b25Oy6LRxH1b8VUIXVgq0zpK5Z0nvKP93BvJwXvkibmf48uc467K5WBm5tte4w874erN"
},
"index.html.tpl.merge": {
"5c2622f8945945e183e62230dbbcdc870ee41e31": "eJydVU1vGjEQvfMrJhvlEnVZogoppYAq5UONlKqVQg49eu0BHLz2yh4gKMp/z3gXkuVDRakPyGY8857fjN72T65/X43+/rmBn6Nf98NWf0qFgUJYPcZAgyQBI+xkkKBNHx+SGEehhi3g1S+QBMip8AH55uPoNr1M1iHSZHD4YkWBr/2sPtWRQCuDQKsSBwnhM2UyhHVWtbLz84/DOdw8i6LkBDcGYUFbTVoYME4obSd8VloKcr7dzLkj0AE8SlcUaBUqIAczxBJoygERoOBCBdfhbelC0Hmk5KD0bqEVctlAwhKMEVUu5KxZfDnVkQ5N0TNEcHMvkWt6hEDaGMgxEosEGXfsPGMijLUPBKQLbJTK3vdR8y+QO7WCl48LMYB6MqUeXHQ6Z9+3IpHWxLu5Val0xvkenF58u+xed95vvbbet6eiLO9rye42iu0gsQwsrbM9EHlwZk64jUeu7EF3l0Uh/ETbtAqmF93yeSeJ+5sKoydcVqIl9NvxpVY0PfS6zbu/dnZLpkvMZ5qrxgZGwmmcMWa9/8JjiWruRf3kTrsbjt3WzL7eSVaduWk7juOIR2E0T2KNY7RF0eB1rEVDnreXY22/rdY2C6VDacQqkoyYaW6cnH1W4tx5hT71TGoeuEt77a27z/LBXmjd2f3irhRS0ypqfnlQiB8b+Bmuxp57Gw71dluVztmOTLtIW8HXrVP3SPI/UuPc/h9wvetnlRmujfEkTWHEXhEbxi5i3BKKObtGjuxdJVuaJSGpspQHtGy7cMX+JmzlbvlcGwUrdqOoloki8cRBmm5cV3oda6hBUmjpXeVPPmn68JNYiPpaAsHLQdIOFUzGBbNGUqZwwexKtlZqP7F38zOqNP44ZPXXoR+tbI2s9KKCPdDEhu3Ha1wo/n7qv/W2n9WITICtdNh6Az5F4Bg\u003d"
},
"packager.json.tpl.merge": {
"79175610d9330cc0582cd66bb8103f2e24409b4a": "eJytWN1z0zgQf27/Ck144GNCfJRCmfJCSFPIUZJMEg7mGCYothLrsC2fJLfNdXp/++1K8mcTtw/XYZhEWu3ub783N4cH3rNnhwfkGXnnrzfkZq4lTza3hKZpxH2quUjGNGaWQrK/My5ZYL4tQq4I/NMhIwmQELEmW5HJ6tMuuQq5HyJZwFUa0S0LiEjMm4Bdcp8BAbPf4RnS8URpGkUs6JFJQkaTeRdu4VyFIosCElPth0Z+m1zgYu77cMTIVIpLruAYkJGpkMC/hyy8w4NOA2fntHODTG873cMHmGa0xxT4n0opwFsLeUe7FmT/P6pR8BBMqywJIjZnLHCQ+kSDX/yQSuprJokyhM6d4KEkUGTFAB06rlBwdIY67tUvV68qDbT7NP12Ppz++Xp43qLhJZPIzH69Jxwd7S4bFiaq8QMlXvR+2yF9lGi2YbIQPxDBfbnA7ZNCCR+e7M4NGxrEpwmRbA1PtCBcE6oIBYdwiIkki1dM9sgXZfIm2pp46ieBFDywNKqJCFVEPDvQTFZ/MV/fEu6LxByfAzeOgQgOo4qVagAQLkkg/CxmibbOpSuRafOWKP4PU6eGRah1qk49D9KZRSIFbREj6/ki9iK+klRuPS6U96jGzMsUk+wayDlLfOYBU5+lOqORF4sVj1jIN94ITtUophumqp97oY5NKBUQnEF2wiAfhNhAOF7QLPFDOEYAimwyHrASQR2AZWcgGDovxSyAaqW8jC/NUcQT+Ia8lgFTfJMsIyegUA8tSwCnIq9OuuTkqEtevDgmwJy8OD5+W3jRULx83SXHb8zlydFbwk24EKggvwBxzel5xIBITD6UYRHhW1NRIQ58mgcF3nVOyc3hwUHn5WuIC8kUBKLvlLeGXTrmL1/3UkiGLhIfv7mH+PhNSfzqZA9xSXJytIfkX57SoKQDG+0hfHd0XSE73kdm+OW0hwe3+0sKT9JMT6kOWzI6Eq605Rk8h3gNKVmIDArhUT2hJYvg0yWzoQevQZ0132TSslhDXBfZWggHGD2vpfBB0t2vJnRRCAYMdywKutY1UCy54jqEgk0UvcTW+pn+gs+ZeUO1kwHxpk2vToTGOm7wGj3NTdfEXky3ZMPwHkAyrONKAXA/g+IDyH2Rbl2BRpSl8giz55mS1Ya2ZrEWwA3L7uyyP8/YKtv8zBssja7oFrsWphzkXWJUR0xUojFWMdcam1XOCd0ImQZ1F5LdSFcac+45Gsd2Qh/Lzc8ZM3WnkIR2TpnP1xxsnZuipjFYwyjXYgmYljTgiu9pNzmZCwGEc8WjCHWQWZJU8ZSW6V9SHtEVxIVI8UShCWw1RHST+ZzHGTAWsnKWf3T53/g6rDxAuLlegLTKrwWwHQgX27Stw7qpUQOVDd07Q1ITvev5hstoXfjblXukWFdbiHaCMAcSBqVFQQcrOdxjuWkoXKiYb7Sw0peEY38uZ6ASLViouG3LDCY1RBSgZEUxqAbCnUpVedCrUeeGtbN3u0HyIaVBAWK+8iQQV+X40dAPUHlYNTwtvKomWI0ehrIfcaraV40mROvkc6NxIIwPbSJurV9B7cn8G2wlzIaJllvTN2mmBczfwCjCGQuQGVkV9nmJgdqB+N3CUg7ZpXijLHZoiMG/MgW1GMalGCdiM+HjOIczC7umeNh1vb6GxYIENh0bUOQsn01OyUzARKjJmcg2IONJ//3gbHj+4ePo96cdU6CNDijeyMbafYdJp1T2K0aAhUSbEVZxcrdq0QTmdiyNVcvuigLjPwgDbNgPCGmlroTMkx3qmjtwhfYKpuKippIgM9tI1WQwTMKOsTMYLaNWTdJ8WYGtBSO0ogYYwk2SBRF+Ml31SX86XY77n4c9O7UWFE+d2vm05kuGSlIbWAmY8iqJBA3IWorYLkyPVSkAwaW1lampYCsa8JIFb9aBZkMdV2539NE0U2GNA3jfhTMULdOzCAxepuN1sDywONXbfGQNRPJYY4PdwaeYKQAMLiJF0OzVtxWlCn7tLIRVl+VVbH72Kc+0ZikDaDnVrj3RSamWM7cfPIertp8JLFV/OrpAYTU13R2BSxLhbbe5t1YURyxg0G5lWYTAic3qbVcyTbD3nz5kkwGIMLTxa/jAnxvRdp+yHeJ9PhSK/HcYCBAJU3Yq4BEGZT5toObgTlpRM6YJxcX3iTtcgn3AXCJSucWeFr9P1G0Dxn2DliTur27QvpR0+92a9QekKpMxV2gn2xzMNZqscmFHAzC0mfRWWORrM8KTorvBTv2U2EUyA7QRh6LZ4FXthlUmLinWIoOsfoADzFZqtl136n2mCV8zpXulOOOMR/3BYDifLwcfh4NPo/FyOptMh7PFaDgvykGpX+f0e2E4/OuMxovhbDxcgEVr544p3HydzD4t54v+YtikGUAtm/Wbp3+M3s92EDuG56PxcHkxGfQXo8l4D81g0p/N91MN+hcXy+nHyXjYKS5+3E2tRiQI/PHA/p6gWkbGKpkNDDMLNF0J82KR9NUnsD1/x40T67GkXNv9M8JfwHyasgu2bh7N+CZ0Z/mjL6mC7DuDqg8r6Y/D28P/ACQ3720\u003d"
},
"native.properties.merge": {
"2c8c063f9588eecff09624782d7369a8a000d61c": "eJytkEsOwjAMRPecYkT3vQF3YMEFguJSi2BXjgni9rgfFQ5AdrEm743T4fTPc+hwGbli4EKYTBtnqkgCbWQWF0zK4hjUkGlIz+JoyThdS+RiwkIZLAiQJOdG/RarfeAmMmeqfUioLoJtgmQElfIGPyY1D8hrJMH1ySWz3AI3K30kHFfuESSNTeVB4v2hi8T5i/tp4vs+nu6zk9XY38tGK/+nWQx87hK0pU3RlAMzu3fv8qaG8s9f/wFV3ZB9"
},
"production.properties.merge": {
"cbdf9712e9b5d37cecb4d0530ba1fccd0ed004a3": "eJytkUEOwjAMBO+8YkXv/QF/4MAHAnGpRbArxy3i97gFQbk3t6ycmbXS4LDl2TU49VzRcSEMphNnqkgCncgsLhiUxdGpIVOXxuKYknE6l5iLhIUyWBCgeJ7Hi7NK+xmtbWQDmTPVNkRUF8knQTKCSnmC74OaB+jRk+A8csks10DOWu8J+x97D5KJTeVO4u2uianjD7lq5N+9PN1mL6uxP5fN3o5Vuwh87hO0pVHRlAMz+//cy7sa2o2/4QV6LJW9"
},
"app.js.tpl.merge": {
"bf7e5518d2efd28e0a64077e1e7666428cf994ae": "eJx1VdtuEzEQfc9XjILQblDkpCEtEFRxKTxEAlRxkxDiwV1PErdee/GlSajCtzP2ZnMhiR/2NnPOzBx7Zh8ey7Iy1l/z4o5PMS9MyRzqYsZZ8FJ1Hq96T1pA6+tMOphIhUD3KWq03KMArgWESqTnmyV8SVC4KgWDHyZAwTWgkB78Bs5d4tOIgjATY2FpggVeVUoW3Euju3ATIgIdJrCDuVQKZvwewRu4QSjRTlPARLUNCvMZaqBwFVpiLh0URmCTLlGD5+7OgQvFjBLZGPSU8pknspIAynUJqL01SqF1QDneS5y7VG0KYYPWEdWutYrZkwxTywW2WSsRjQVypZZAZj1FFzPfijA3QYlYiZKlbHQsjfNksXdbszAaE5vUYEgRC5XiBbHlTQlX2zw7DMaTXTVIfW18rVZSOVE1CcWQUdztZkaxulG+pHdljQgFbRi0awaSZEJ75NtUCPeRMPEl57idsUSLzijap5LrEMtnrSe9Vuv9wrOdDc4f6iPASxxB9kCWT/S4yrq1chZ/B0lEI/iZ3uPKIsVHdI4O6VuzyJLh1xqQNmfP+yOXet9HUvYjeNi6nD/LKHjMN1hStBcdXG9MV1bpKeWy8Xw2OOX5V1Zc/O9+djY85f96sDjwHp70TuwNJCFWTTEu2q8tUrtWxqEYgbcB11bnufWhGpek1V7JTwf9xfCivx9v7d1bG9lttZffxbC/eDE4gVkbDwS7eL446/eHx0GN9QA1jN8Hp1Br64F+508vFoN+//lx2MZ8qPuLaBiewjXmQ/EVD9RhI5jQLZ3mzo7GvR68Q0cduYwDDB7R2f5guKBZMdYiHn+aJaiwRO03mHi0J2qZZ0ecsw4TNV/eednaDTPW0kuu5B9MkUo68akR9mi/04c43hkXIo8fCovU6vm26VjEsNQvHYqwW6jR3+rJfqLW1JJuyuJckLbMN4a42m+2/Q41T7u775F+KTtjgSa8g9tAQ5CGG22Gm4Q4QG+QBm7zj0lTlMYmvZDfPU09AjL4jIqEA23mr/6Lssmc/ine6LHYraBZcgIbO1xeXkK2RJcd84xrLrUwc6ZMnTazKXi+Vm93rVrH3xqhWyt6+geQsUAZ"
},
"testing.properties.merge": {
"360e715956c81757e53736789fe20be045acb544": "eJytkMENwjAMRe+d4oveuwE7cGCBoLjUItiVY4q6PW6pKAM0t1g/732nxfnI07S4DlzRcyGMphNnqkgCncgsLhiVxdGrIVOfXsUxJeN0K5GLCQtlsCBATtVZ7t2Wq13wRjJnql1YqK6GbYJkBJUyg5+jmgflPZDg9uKSgxK8xekD4bSBTyCZ2FSeJN41bUQuO++vi/828vRYpKzGPq87fQV/1WLgS5mgrXWKphyYRb6L10c1nAf//gdqIpHi"
},
"app.json.tpl.merge": {
"a36200bbd84dffd4133a6074252425c15a5f25b1": "eJzFWMtu2zgU3ecrCGOAtoFjrWYTTAtk0hTNTJoWdYpZtF3QFGWxpUiVpOwYgf99zqUeluwkrdOiERBIscR7z33wHJI3BwxXcngY7+yQXeWS8bLUSvCgrHnimeGF9CUXcswqL1M2W7GpNCLn7NQWBTcpC5bNpZGOB8mE5t5L35hL4n1EJkbHbHRDD+vR+OA2r5nSkpU85GQv5Mpv4cicNYG9vnpzwVIrqkKaMGZOarxfyP6YyRdvTTQ3RKFMKq9fh0K/gxOCE3+Y5PjlDkh85q2uENWH9xe3oWLKsFQupLYlwWHSLBRQ1tDURB5jRDfYVWbHQOsMpla2cmwpZ2zm7NJLx9LKKTPv2x8zOZkDdx5CeZwk2gquc+tDUqxgM+mFM2kMb4KB3wXXlWR4MFKmKOQyl4bNKqVjBZ1ErEhkxDHMfCpLCdtGKOmZypgK+PpbpTCEAelCuiOvUhlNVE501Ue4PDDuJDMWd4E3Xs1Q5YXidbn9ygdZsNLZYIXVk2HBKqdRJlNpvVueC+UDsxnjWrN/+IJPhVMlnKD5gqe6UOadmueoyrUUVSyXdal0rRN2xkWOWOCfioK3sy9SBLZU1ILUkFZru6QaZNYVPBy3A+N1M/gv4i2bvqJ7EmziIya044glCXvXtDYFPqY0xvrVeUBGiwoBzeSPdXTPqZOFDTS7gkN1BxecPn1bUuRcP9sZed+FkUfspcx4pZFNIKlQ/0wZdM3TjGsvV8/oV6/mMM14P5RlrpDWpUJdEI2wpZLp/r6npRQqW9VBIVcxE3WqkBFWB73jkNoMsO72O6rKlMdsjVKpAx/9qmwB8nkW/fuIHM7HPdARnTV6Rdi05TT9rCFKBX/u7YsxgdaFCWXivIvZnwbr+FyiUkHp2nU34UHWZi7TyQOiavOEtErDafJamu+YH0dcgaToLauzStNkE/NDfGWY6iNWSG5gA8+t4babCiSupq1NauvY/G6pr49m1gYfHC+3Z8dPlfrcpESNkvqwT/6FBbhY444vVxPG9jUP3fF1Z/tNU3cdjZJHXpANcacgYYHKr8BtmBWZdHC7/4Rr+LJT8Y5zoO8qk2CmurYogRLO1i3stlUmXushh4P8jtnHg9bXzUHfc8eYN5nDymBp3VdiyXXi4wLjKNhK5H+FUoMCno+0mjmOSJ8/Z09A+09GL45w+yvB+xdEsuOh7d36d+/X4+8B6ob+asN1ZrdNzsCvuiXxMQldr81qFUUnxLXVUI1JXAWYBB8a/HX90RHPRuObinQ+t6lwE0R8+ny/5p5Op7eKrTJCV/4RxJZsT4R/JK19MKM8otI+ktD+TKp+l8z+jMpGqURbYwlvDXgaArHcP8zforu/THbvUwCakz8gAd3mIcGAhCYiDdziyf0564OvK8KrYEEroFSN9thsV6nEk07lnsbt5Z+DPV78pBPCZz1exVap5tZhwBh8SmMAcxNrB6mG1VIpsVbHoKcnp6/P2JuTy/NXZ9MrbK3EZo/Yc1BntfHwcZig3h6we/F5vBeKy7Or/96+//d+90YGUutdAIcP9vvq5OLi75PT7zgGJ+oZF9Hz5/jzerfoZ9cQ5812dEBVUC8LldkI47B43aBBaL3uVAXmf78x++8gxXe88oG7UJWju/r0FXVV0lvP0VEJui6gzC5GAAWwruk8hLIireyvBf240zVQkkoR/7zS3GH/WzraeQPb1oFItDgM9NOniV+YP+7E+bID2B7V+ECwaE0ANwtlK0/7+bSKRWygTdglyUhcyRBg5CnQmrmdhx3JRoLpktA6beP6KktaYQQu6gUp/JSg2cZKXHRkNTV6fB6WEqmqKWMrcu5EDt1vD4Kaf285BWo7tUTLEe/Hw7D6uCQegHTrYlGkzToLoOigY7ut6vOSLtm3UZVR3yrZYydkJd2Qe4+TmpM4TpnGYuE6fjTQp69y5bu11yWtqIj2iLB8biugNNi5uIbFezq2dQKj0rg6ryKy83Q9Olgf/A/eSIqN"
},
"package.properties.merge": {
"c6c1fb2fb1dda28480ad0f6e5caffc9b97d196ae": "eJytkUFygzAMRfc5hSZsOxygM11223aRCwgsQBNH8tiCTG5fGWjDAcLOsnjvS27g45XfqYHLxAUGjgQp68KBCqCALpSzHyApi8GgGQINOEeDBTNjF73PKywUgAUclLC/4kjt3lda5yXKxlRat1BZDXsFMBOoxAfwLWk2p9wnEuhmjoFldF512kRw3sFnIFk4q9xIrD013vLz5B2y2P9EhtcqZc1sj3WmTXCI5gWrYZy2xomKwTFV/hSvP5XN+fV9+Xzftjb7SDoc+jClWJmmIGi80N9SwnbVe1HlDUTdWfNvt1togpGEMkYoLP1K7tVfIHKXfeVU/S9+/V9rlbyW"
},
"sencha.cfg.tpl.merge": {
"d2e6e42720f88befc892f12df5fd7bab587f7879": "eJxtUDEOwjAM3PsKSzAi6MaUhQfwAhaTujTQNpHtClWof8cpamFgSU53F/sumNK+x47cK59TUaARNRt+Rn641wrPX9m3KJJQG7e9DGV5PGWyCjwdMrjL7g9dFBvQJggkjolYR5BEPtSBBBB87DoEoYSMShW0QRRiDXmJmNorhj70NxvCJHFgb880mpLGfGtDcB1CW4HtI6+RxznpYt7Pg9wn/mzMwZb4uZ71MdsqTYefDp+feQN/i2pK"
}
},
"targets": {
"resources/sass/config.rb": {
"source": "config.rb.tpl.merge",
"version": "e254e92dd21bc9ecb27f3b8251d67dfbc79fa1af",
"parameters": {
"viewNamespace": "Ajax.view",
"frameworkName": "touch",
"frameworkPath": "../..",
"senchadir": ".sencha",
"appModels": "",
"appControllers": "",
"appViews": "",
"uniqueId": "3a867610-670a-11e1-a90e-4318029d18bb",
"appName": "Ajax",
"modelNamespace": "Ajax.model",
"name": "Ajax",
"library": "core",
"controllerNamespace": "Ajax.controller",
"appStores": ""
}
},
"index.html": {
"source": "index.html.tpl.merge",
"version": "5c2622f8945945e183e62230dbbcdc870ee41e31",
"parameters": {
"viewNamespace": "Ajax.view",
"frameworkName": "touch",
"frameworkPath": "../..",
"senchadir": ".sencha",
"appModels": "",
"appControllers": "",
"appViews": "",
"uniqueId": "3a867610-670a-11e1-a90e-4318029d18bb",
"appName": "Ajax",
"modelNamespace": "Ajax.model",
"name": "Ajax",
"library": "core",
"controllerNamespace": "Ajax.controller",
"appStores": ""
}
},
"packager.json": {
"source": "packager.json.tpl.merge",
"version": "79175610d9330cc0582cd66bb8103f2e24409b4a",
"parameters": {
"viewNamespace": "Ajax.view",
"frameworkName": "touch",
"frameworkPath": "../..",
"senchadir": ".sencha",
"appModels": "",
"appControllers": "",
"appViews": "",
"uniqueId": "3a867610-670a-11e1-a90e-4318029d18bb",
"appName": "Ajax",
"modelNamespace": "Ajax.model",
"name": "Ajax",
"library": "core",
"controllerNamespace": "Ajax.controller",
"appStores": ""
}
},
".sencha/app/native.properties": {
"source": "native.properties.merge",
"version": "2c8c063f9588eecff09624782d7369a8a000d61c",
"parameters": {
"viewNamespace": "Ajax.view",
"frameworkName": "touch",
"frameworkPath": "../..",
"senchadir": ".sencha",
"appModels": "",
"appControllers": "",
"appViews": "",
"uniqueId": "3a867610-670a-11e1-a90e-4318029d18bb",
"appName": "Ajax",
"modelNamespace": "Ajax.model",
"name": "Ajax",
"library": "core",
"controllerNamespace": "Ajax.controller",
"appStores": ""
}
},
".sencha/app/production.properties": {
"source": "production.properties.merge",
"version": "cbdf9712e9b5d37cecb4d0530ba1fccd0ed004a3",
"parameters": {
"viewNamespace": "Ajax.view",
"frameworkName": "touch",
"frameworkPath": "../..",
"senchadir": ".sencha",
"appModels": "",
"appControllers": "",
"appViews": "",
"uniqueId": "3a867610-670a-11e1-a90e-4318029d18bb",
"appName": "Ajax",
"modelNamespace": "Ajax.model",
"name": "Ajax",
"library": "core",
"controllerNamespace": "Ajax.controller",
"appStores": ""
}
},
".sencha/app/package.properties": {
"source": "package.properties.merge",
"version": "c6c1fb2fb1dda28480ad0f6e5caffc9b97d196ae",
"parameters": {
"viewNamespace": "Ajax.view",
"frameworkName": "touch",
"frameworkPath": "../..",
"senchadir": ".sencha",
"appModels": "",
"appControllers": "",
"appViews": "",
"uniqueId": "3a867610-670a-11e1-a90e-4318029d18bb",
"appName": "Ajax",
"modelNamespace": "Ajax.model",
"name": "Ajax",
"library": "core",
"controllerNamespace": "Ajax.controller",
"appStores": ""
}
},
".sencha/app/build.properties": {
"source": "build.properties.merge",
"version": "ec0f832e80d63d776086203cffe9fed5c73b4294",
"parameters": {
"viewNamespace": "Ajax.view",
"frameworkName": "touch",
"frameworkPath": "../..",
"senchadir": ".sencha",
"appModels": "",
"appControllers": "",
"appViews": "",
"uniqueId": "3a867610-670a-11e1-a90e-4318029d18bb",
"appName": "Ajax",
"modelNamespace": "Ajax.model",
"name": "Ajax",
"library": "core",
"controllerNamespace": "Ajax.controller",
"appStores": ""
}
},
"app.json": {
"source": "app.json.tpl.merge",
"version": "a36200bbd84dffd4133a6074252425c15a5f25b1",
"parameters": {
"viewNamespace": "Ajax.view",
"frameworkName": "touch",
"frameworkPath": "../..",
"senchadir": ".sencha",
"appModels": "",
"appControllers": "",
"appViews": "",
"uniqueId": "3a867610-670a-11e1-a90e-4318029d18bb",
"appName": "Ajax",
"modelNamespace": "Ajax.model",
"name": "Ajax",
"library": "core",
"controllerNamespace": "Ajax.controller",
"appStores": ""
}
},
"app.js": {
"source": "app.js.tpl.merge",
"version": "bf7e5518d2efd28e0a64077e1e7666428cf994ae",
"parameters": {
"viewNamespace": "Ajax.view",
"frameworkName": "touch",
"frameworkPath": "../..",
"senchadir": ".sencha",
"appModels": "",
"appControllers": "",
"appViews": "",
"uniqueId": "3a867610-670a-11e1-a90e-4318029d18bb",
"appName": "Ajax",
"modelNamespace": "Ajax.model",
"name": "Ajax",
"library": "core",
"controllerNamespace": "Ajax.controller",
"appStores": ""
}
},
".sencha/app/testing.properties": {
"source": "testing.properties.merge",
"version": "360e715956c81757e53736789fe20be045acb544",
"parameters": {
"viewNamespace": "Ajax.view",
"frameworkName": "touch",
"frameworkPath": "../..",
"senchadir": ".sencha",
"appModels": "",
"appControllers": "",
"appViews": "",
"uniqueId": "3a867610-670a-11e1-a90e-4318029d18bb",
"appName": "Ajax",
"modelNamespace": "Ajax.model",
"name": "Ajax",
"library": "core",
"controllerNamespace": "Ajax.controller",
"appStores": ""
}
},
".sencha/app/sencha.cfg": {
"source": "sencha.cfg.tpl.merge",
"version": "d2e6e42720f88befc892f12df5fd7bab587f7879",
"parameters": {
"viewNamespace": "Ajax.view",
"frameworkName": "touch",
"frameworkPath": "../..",
"senchadir": ".sencha",
"appModels": "",
"appControllers": "",
"appViews": "",
"uniqueId": "3a867610-670a-11e1-a90e-4318029d18bb",
"appName": "Ajax",
"modelNamespace": "Ajax.model",
"name": "Ajax",
"library": "core",
"controllerNamespace": "Ajax.controller",
"appStores": ""
}
},
"resources/sass/app.scss": {
"source": "app.scss.tpl.merge",
"version": "3d3f6b023c31a4e49cd626dd27cff9474aff32d7",
"parameters": {
"viewNamespace": "Ajax.view",
"frameworkName": "touch",
"frameworkPath": "../..",
"senchadir": ".sencha",
"appModels": "",
"appControllers": "",
"appViews": "",
"uniqueId": "3a867610-670a-11e1-a90e-4318029d18bb",
"appName": "Ajax",
"modelNamespace": "Ajax.model",
"name": "Ajax",
"library": "core",
"controllerNamespace": "Ajax.controller",
"appStores": ""
}
}
}
}

View File

@ -0,0 +1,592 @@
# =============================================================================
# This file defines properties used by build-impl.xml and the associated
# *-impl.xml files (sass-impl.xml, js-impl.xml, etc.), which are the core of
# the applications build process.
#
# This file represents the lowest priority file for defining these properties
# as well as the place to look for documentation and learning what properties
# exist.
#
# The full set of these files is as follows (in priority order):
#
# - One of these (based on build.environment):
# - production.properties
# - testing.properties
# - native.properties
# - package.properties
#
# - build.properties
#
# - One of these (based on app.framework):
# - ext.properties
# - touch.properties
#
# - One of these (based on build.environment):
# - production.defaults.properties
# - testing.defaults.properties
# - native.defaults.properties
# - package.defaults.properties
#
# - defaults.properties
#
# Properties are controlled by the first file in the above list to define the
# value. Values from all levels, however, can reference each other via the
# property expansion.
#
# IMPORTANT - This file should not be modified by an app as it is overwritten
# during each app upgrade.
# =============================================================================
# *****************************************************************************
# Global Build Properties
# these are cross-concern properties used by many build phases
# *****************************************************************************
# the default build enviornment type (production, testing, native, package)
# NOTE: this is only a default and will typically be set before this file is
# loaded, typically by the 'sencha app build" command.
# See "sencha help app build" for details.
#
# The corresponding properies files:
# (production.properties, testing.properties, etc.) provide examples of
# overriding sets of properties depending on the selected environment
# NOTE: this replaces the deprecated args.environment
build.environment=production
# the directory to place built application files
build.dir=${workspace.build.dir}/${build.environment}/${app.name}
# a temporary output directory used for staging intermediate build artifacts
build.temp.dir=${workspace.build.dir}/temp/${build.environment}/${app.name}
# the directory under the output folder for placing resources
build.resources.dir=${build.dir}/resources
# *****************************************************************************
# JS
# these properties control various aspects of output js code construction
# *****************************************************************************
# the output js file that contains all needed js code
build.classes.name=app.js
build.classes.file=${build.dir}/${build.classes.name}
# the output js file for framework code, if the framework
# classes are not included in the default all-classes.js file
build.framework.name=framework.js
build.framework.file=${build.dir}/${build.framework.name}
# Don't use these - they are deprecated
build.options.debug.enable=debug:true
build.options.debug.disable=debug:false
build.options.logger.enable=logger:yes
build.options.logger.disable=logger:no
# This property enables/disables <feature logger> blocks in js output, see build.options
build.options.logger=no
# This property enables/disables <debug> blocks in js output, see build.options
build.options.debug=false
# This property can be used to pass custom build options in addition to any of the other
# build.options flags. When overlapping, these options take priority, see build.options
build.options.custom=
# This value is specified by the framework
build.options.default=
# This property contains the framework ("product") used for filtering of JavaScript using
# the preprocessor. This is set by either ext.properties or touch.properties.
#
#build.options.product=touch
# This property contains the desired API level used for preprocessor filtering of JavaScript.
# This is set by either ext.properties or touch.properties.
#
#build.options.minVersion=2.1
# This property holds the set of js preprocessor options in the form:
#
# name1:value1,name2:value2,...
#
# (used by -init-compiler in init-impl.xml)
#
# This property is not likely to be set directly. Rather, you should set one of the
# contributing properties that are combined to form this one:
#
# build.options.debug
# build.options.logger
# build.options.custom
#
# The other properties that contribute to this are typically not needing to be set:
#
# build.options.product
# build.options.minVersion
#
build.options=logger:${build.options.logger},debug:${build.options.debug},product:${build.options.product},minVersion:${build.options.minVersion},${build.options.default},${build.options.custom}
# This property can be modified to change general build options
# such as excluding files from the set. The format expects newlines
# for each argument, for example:
#
# build.operations=\
# exclude\n \
# -namespace=Ext\n
#
# NOTE: modifications to build.operations are intended to be
# placed in an override of the "-after-init" target, where it
# can be calculated based on other
# ant properties
#
# build.operations=
# enables / disables the full class optimizer during js builds
# (used by the -compile-* targets in js-impl.xml)
build.optimize.enable=\
optimize\n \
-define-rewrite\n
build.optimize.disable=
build.optimize=${build.optimize.disable}
# enables / disables yui compression
build.compression.yui=0
# enables / disables closure compression
build.compression.closure=0
# enables / disables uglify compression
build.compression.ugilfy=0
build.compile.temp.dir=${build.temp.dir}/sencha-compiler
# controles whether to keep the temp compile dir after the build
build.compile.temp.dir.keep=true
# ------------------------------------------
# DOC ONLY - Do Not Set
# this variable will be set to the appropriate compressor
# option, and is calculated in init-impl.xml, but may be overridded in
# app.properties, <environment>.properties, or via command line
#
# build.compression=
# ------------------------------------------
# *****************************************************************************
# Page
# these variables control aspects of building the output markup page
# *****************************************************************************
# controls whether the output will be microloader-enabled, or markup only
build.output.markuponly=false
# controls whether the microloader content will be embedded in the output
# markup, or left as a separate resource
build.enable.embedded.microloader=true
# whether to include the page's manifest.json code with the
# microloader content. Production.properties files should set this to
# false to have app.json exist as a server resource.
build.enable.embedded.manifest=true
# enables / disables delta patch generation
enable.deltas=false
# enables / disables generation of cache manifest
enable.cache.manifest=false
# enables / disables compression of resources referenced in app.json / package.json
# js and css entries
enable.resource.compression=false
# defaults to index.html, but may be overridden in app.json
app.indexHtmlPath=index.html
# the input page file for the application
app.page.name=${app.indexHtmlPath}
app.page.file=${app.dir}/${app.page.name}
# the output page file
build.page.name=${app.page.name}
build.page.file=${build.dir}/${build.page.name}
# the directory where the microloader files may be found
app.microloader.dir=${app.config.dir}/microloader
# the file names of the individual microloaders
app.microloader.development=development.js
app.microloader.testing=testing.js
app.microloader.production=production.js
# the target microloader to use for builds
app.microloader.name=${app.microloader.development}
app.microloader.path=${app.microloader.dir}/${app.microloader.name}
# specifies how to embed the microloader code into the output markup
# {0} is replaced with the content of the microloader file specified
# by app.microloader.path
build.microloader.code.tpl={0}
# the template to use when generating a stand-alone json manifest file
build.microloader.json.tpl.standalone={0}
# the template to use when embedding the manifest json directly next to the
# microloader in the output microloader content
build.microloader.json.tpl.embedded=Ext.blink({0});
# the template to use in the output microloader content when supplying
# the manifest json as a separate server-side resource ('production' builds)
build.microloader.json.tpl.external=Ext.blink('{'id:''${app.id}'''}');
# the template string to use when embedding the microloader content
# into the output markup
build.embedded.microloader.tpl=<script type="text/javascript">{0}</script>
# the compressor to use when embedding the microloader into a page
# can be -closure or -yui, or leave empty to disable compression
build.embedded.microloader.compressor=
# the name of the output microloader file
build.microloader.name=microloader.js
# the path to the microloader content file, if external to the outpout markup
build.microloader.path=${build.dir}/${build.microloader.name}
# the inner markup to embed into the output markup when not including
# the microloader content directly into the output markup
build.embedded.microloader.src=${build.microloader.name}
build.external.microloader.markup=<script src="${build.embedded.microloader.src}"></script>
# a flag indicating which mode the microloader should run in (production, testing, etc.)
# currently unused : is a placeholder for future microloader interactions
build.microloader.mode=${build.environment}
# the tag name to use when generating the compiler save set for
# the page's js code
build.tag.name=full-page
# the name of the archive folder containing source versions for
# delta patch generation
build.archive.name=archive
build.out.archive.path=${workspace.build.dir}/${build.archive.name}/${app.name}
# the name of the output folder for calculated delta patches
build.deltas.name=deltas
build.out.delta.path=${build.dir}/${build.deltas.name}
# the output cache manifest file
build.manifest.name=cache.appcache
build.manifest.path=${build.dir}/${build.manifest.name}
# the path to the output markup page
build.out.page.path=${build.dir}/${app.page.name}
# the name of the manifest json file
build.json.name=app.json
# the full path to the manifest json file
build.out.json.path=${build.dir}/${build.json.name}
# Defines the file that will contain Ext.setVersion calls for each used package.
build.out.package.versions=${build.compile.temp.dir}/cmd-packages.js
# a temp directory for managing extracted resources during the page build
build.app.temp.dir=${build.compile.temp.dir}/app
# controls the format of checksum headers injected into microloaded content
# either comment style, or code style for js and css files
delta.comment.checksums=false
# *****************************************************************************
# Refresh
# these properties are used for generating bootstrap js and css
# files to support dev-time interaction with the app
# *****************************************************************************
# the base path to use for generating / calculating bootstrap info
app.bootstrap.base.path=${app.dir}
# these control the name of the bootstrap js file
# note: there will be corresponding entries in either the index page
# or app.json that reference these names
app.bootstrap.js.name=bootstrap.js
app.bootstrap.js=${app.bootstrap.base.path}/${app.bootstrap.js.name}
# these control the name of the bootstrap css file (for ext 4.2+ apps)
# note: there will be corresponding entries in either the index page
# or app.json that reference these names
app.bootstrap.css.name=bootstrap.css
app.bootstrap.css=${app.bootstrap.base.path}/${app.bootstrap.css.name}
# the microloader to use for bootstrapping operations
app.microloader.bootstrap=${app.microloader.dir}/${app.microloader.development}
# the name of the bootstrap microloader manifest
build.json.bootstrap.name=bootstrap.json
# the full path to the bootstrap microloader manifest
build.json.bootstrap.path=${app.dir}/${build.json.bootstrap.name}
# *****************************************************************************
# Sass / Css
# properties for controling features of sass generation and compilation
# *****************************************************************************
# controls the ruby command that is used to execute compasss
# a full path to ruby may be specified rather than allowing the system
# shell to resolve the command
build.ruby.path=ruby
# --------------------
# these control properties select the mode used to build the app's styling
# see sass-impl.xml for how then are used
# enables theme builds for apps using ext 41 style themes
enable.ext41.themes=false
# enables theme builds for apps using ext 42 style themes
enable.ext42.themes=false
# enables theme builds for apps using touch style themes
enable.touch.themes=false
# --------------------
# selector count threshold to use when
# splitting a single css file into multiple
# css files (IE selector limit workaround)
#
# NOTE: applies only to ext js 4.2+ style theme management, currently
# see the above theme control variables for details
build.css.selector.limit=4095
# enables / disable css preprocessor (enable.ext42.themes only)
build.css.preprocess=true
# sets the css preprocessor options, in the form:
# name1:value1,name2:value2,...
build.css.preprocessor.opts=
# enables / disable css compressor (enable.ext42.themes only)
build.css.compress=true
# controls the directory used to generate the output app scss file
# for apps that use theme packages
build.sass.dir=${build.temp.dir}/sass
# Specify the name for the individual resource dirs in the app
# (enable.touch.themes only)
app.sass.name=sass
# Specify the sass path in the app
# (enable.touch.themes only)
app.sass.dir=${app.dir}/resources/${app.sass.name}
# name prefix to use for output css / sass files
app.out.base=${app.name}-all
app.out.base.debug=${app.out.base}
# the output sass file to generate (used with enable.ext42.themes)
app.out.scss=${build.sass.dir}/${app.out.base.debug}.scss
# the output ruby compass config file to generate (used with enable.ext42.themes)
app.out.ruby=${build.sass.dir}/config.rb
# output css file prefix
app.out.css.prefix=${app.out.base.debug}
# output css file name
app.out.css.name=${app.out.css.prefix}.css
# output css file path (relative to build directory root
app.out.css.rel=resources/${app.out.css.name}
# output css file path (full path)
app.out.css=${build.dir}/${app.out.css.rel}
# separate file name to use for generating a compressed copy
# of the output css file (this default will compress the file in-place)
app.out.css.compressed=${build.dir}/resources/${app.out.base}.css
# the directory containing sass files for compass to compile
compass.sass.dir=${build.sass.dir}
# the output directory where compass should place built css files
compass.css.dir=${build.dir}/resources
# the directory containing the ruby config file for compass
compass.config.file=${app.out.ruby}
# enables / disables console highlighting for compass
compass.compile.boring=false
# enables / disables forced rebuilds for compass
compass.compile.force=true
# enables / disables stack traces in compass failure output
compass.compile.trace=true
# the directory that will be the current working directory of the compass
# process (controls the location of .sass-cache folder creation)
# NOTE: this directory will also typically need to contain the config.rb file
# used for compass invocation, so it is ideal to set build.sass.dir instead of this
# variable, as that will control both the config.rb location as well as the
# .sass-cache location
compass.working.dir=${build.sass.dir}
# ---------------------------------------------------
# Legacy properties for ext41 theme directories
# Specify the resources path in the app
app.packages.dir=${app.dir}/packages
# Specify the theme path in the app (this directory contains the themes)
app.theme.dir=${app.packages.dir}
# the currently selected ext 41 theme name
theme.name=default
# ---------------------------------------------------
# *****************************************************************************
# Slice
# these properties control features of the theme slice build phase
# *****************************************************************************
# the resources directory of the application
# note: this property is currently only used for building ext 4.1 style themes
# (used by x-build-theme and x-copy-resources in slice-impl.xml)
app.resources.dir=${app.dir}/resources
# the directory containing the slicer widget example page
app.example.dir=${app.dir}/sass/example
# properties to control the recirect css file that is
# generated for the slicer example page
app.example.css.name=example.css
app.example.css.file=${app.example.dir}/${app.example.css.name}
# the base path for generating the bootstrap code for the
# slicer page
bootstrap.base.path=${app.example.dir}
# the full file name of the slicer page's bootstrap js file
bootstrap.example.js=${app.example.dir}/bootstrap.js
# this is the directory used for intermediate build artifacts used
# by the slicer for generating theme images
app.example.build.dir=${build.temp.dir}/slicer-temp
# the name of the intermediate screenshot file used for image slicing
build.capture.png=${app.example.build.dir}/theme-capture.png
# the name of the intermediate widget manifest file used for image slicing
build.capture.json=${app.example.build.dir}/theme-capture.json
# the location of the slicer widget page
app.example.theme.html.name=theme.html
app.example.theme.html=${app.example.dir}/${app.example.theme.html.name}
# a name prefix used for slicer page temporary artifacts
app.example.base=${app.name}-example
# the special slicer page scss file name to generate
app.example.scss=${app.example.build.dir}/${app.example.base}.scss
# the relative path from the slicer css file to the slicer html file
app.example.css.rel=${app.example.base}.css
# the path to the css file that will be built for the slicer page
app.example.css=${app.example.build.dir}/${app.example.css.rel}
# the ruby compass config file to generate for slicer page scss
app.example.out.ruby=${app.example.build.dir}/config.rb
app.example.compass.config=${app.example.out.ruby}
# legacy ext 41 theme property indicating the name of the
# slicer example page contained in the theme directory
theme.page.name=theme.html
# Options to pass to the "sencha fs slice" command.
build.slice.options=
# *****************************************************************************
# Packager
# these properties control features of the native packaging phase of the
# build process
# *****************************************************************************
# enables packaging the built application with the Sencha Desktop Packager
# NOTE: currently unsupported
enable.desktop.packager=false
# skips packaging the built application with sencha mobile packager (stbuild) or cordova/phonegap
skip.native-package=true
# a property that controls whether a standalone manifest.json file will be
# generated for the native packaged application
enable.standalone.manifest=false
# these set the name of the mobile native packager's config file
build.mobile.packager.name=packager.json
build.mobile.packager.file=${app.dir}/${build.mobile.packager.name}
# the default mobile packager config to use when specifying the autorun argument
# with "sencha app build -run native"
build.mobile.packager.default.name=packager.json
build.mobile.packager.default.file=${app.dir}/${build.mobile.packager.default.name}
# these set the name of the mobile native packager's temporary config file
# that will have the input and output path properties updated
build.mobile.packager.temp.name=packager.temp.json
build.mobile.packager.temp.file=${app.dir}/${build.mobile.packager.temp.name}
# the input directory for the mobile native packager that contains the
# built Sencha Cmd application
build.mobile.packager.in.dir=${build.dir}
# the output location of the mobile native packaged application
build.mobile.packager.out.dir.name=native-package-mobile
build.mobile.packager.out.dir=${workspace.build.dir}/${build.mobile.packager.out.dir.name}/${app.name}
# *****************************************************************************
# Resolve
# these properties control aspects of the dynamic dependency resolver, which
# uses phantomjs to load the applicaiton and extract Ext.Loader class load
# history.
# *****************************************************************************
# enables / disables dynamic dependency resolution
skip.resolve=true
# enables the local web server. this may be disabled to load the application's
# page from an existing web server.
skip.web-start=false
# the port number to start the local web server on
build.web.port=54321
# the directory representing the root web folder
build.web.root=${workspace.dir}
# the base url to access the local web server
build.resolve.url=http://localhost:${build.web.port}
# a template string used to format the detected dynamic dependencies
build.resolve.tpl={0}
# the mode to use when formatting the detected dynamic dependencies
build.resolve.mode=references
# the output file for the detected dynamic dependencies
build.resolve.file=${build.temp.dir}/resolve.json
# controls whether unmatched external references in the specified file will
# generate build warnings or build failures
build.resolve.allow.unmatched=true
# *****************************************************************************
# Watch
# these properties adjust the behavior of the app watch process.
# *****************************************************************************
# the default set of actions to run when triggering a rebuild
build.trigger.targets=-refresh,-resources,-compass-compile
# the watcher targets to run that monitor for code changes
build.watcher.targets=-watch-compiler

View File

@ -0,0 +1,58 @@
<project name="find-cmd-impl">
<!--
Run "sencha which" to find the Sencha Cmd basedir and get "cmd.dir" setup. We
need to execute the command with curdir set properly for Cmd to pick up that we
are running for an application.
-->
<target name="find-cmd-in-path" unless="cmd.dir">
<exec executable="sencha"
dir="${basedir}"
failifexecutionfails="false"
outputproperty="exec.error">
<arg value="which"/>
<arg value="-p=cmd.dir"/>
<arg value="-o=$cmddir$"/>
</exec>
<!-- Now read the generated properties file and delete it -->
<property file="$cmddir$"/>
<delete file="$cmddir$"/>
</target>
<!--
Run "sencha which" again, similar to the above target, but explicitly check
for the 'SENCHA_CMD' environment variable to have been set, in case sencha
cmd isn't on the current path settings for the user
-->
<target name="find-cmd-in-environment" unless="cmd.dir">
<exec executable="${env.SENCHA_CMD}/sencha"
dir="${basedir}"
failifexecutionfails="false">
<arg value="which"/>
<arg value="-p=cmd.dir"/>
<arg value="-o=$cmddir$"/>
</exec>
<property file="$cmddir$"/>
<delete file="$cmddir$"/>
</target>
<!--
== Mac OSX launchd fix ==
create a child shell process that will source in ~/.bash_profile
and then attempt to call 'sencha which' with the current user's
shell profile settings. sencha which will create a properties file
that can then be loaded into this (the parent) process.
This allows ant integrations in IDE's like netbeans or eclipse to properly
locate Sencha Cmd, even if the IDE was launched via launchd (Finder)
-->
<target name="find-cmd-in-shell" unless="cmd.dir">
<delete quiet="true" file="$cmddir$"/>
<echo file="tmp.sh"> source ~/.bash_profile; sencha which -p cmd.dir -o '$cmddir$'</echo>
<exec executable="/bin/sh"><arg value="tmp.sh"/></exec>
<property file="$cmddir$"/>
<delete file="tmp.sh"/>
<delete file="$cmddir$"/>
</target>
</project>

View File

@ -0,0 +1,214 @@
<project name="init-impl">
<!--
Init-Local
-->
<target name="-before-init-local"/>
<target name="-init-local">
<!--
${basedir} is actually the basedir of build.xml, in the app root
so this imports ${app.dir}/local.properties, if present
-->
<property file="${basedir}/local.properties"/>
<!--
This will traverse upwards in the file system, starting at the
app root directory, looking for the workspace. Once found,
${workspace.dir}/local.properties will be imported into this
project
-->
<script language="javascript">
<![CDATA[
var f = new java.io.File(project.getProperty("basedir"));
var sub = ".sencha/workspace/sencha.cfg";
for (var p = f; p; p = p.getParentFile()) {
var t = new java.io.File(p, sub);
if (t.exists()) {
// we found the workspace folder!
t = new java.io.File(p, "local.properties");
if (t.exists()) {
var loader = project.createTask("property");
loader.setFile(new java.io.File(t.getCanonicalPath()));
loader.execute();
}
break;
}
}
]]>
</script>
</target>
<target name="-after-init-local"/>
<target name="init-local"
depends="-before-init-local,-init-local,-after-init-local"/>
<target name="-before-init"/>
<target name="-init" unless="internal.x-sencha-initialized">
<!--
Now, apply various project updates, such as ant class loader path
updates, as well as loading Sencha Cmd config system properties
into ant property space
-->
<x-sencha-init prefix=""/>
<!--
default the build environment to production if it is unset by this point
-->
<property name="build.environment" value="production"/>
<property name="CR" value="&#10;"/>
<x-load-properties>
<!-- Load user-defined properties for environment then general: -->
<file path="${app.config.dir}/${build.environment}.properties" required="false"/>
<file path="${app.config.dir}/build.properties" required="false"/>
<!-- Pick up the defaults by framework/environment followed by general: -->
<file path="${app.config.dir}/${framework.name}.properties" required="true"/>
<file path="${app.config.dir}/${build.environment}.defaults.properties" required="true"/>
<file path="${app.config.dir}/defaults.properties" required="true"/>
</x-load-properties>
<!--
calculate the appropriate build.compression value
-->
<condition property="build.compression" value="-yui">
<x-is-true value="${build.compression.yui}"/>
</condition>
<condition property="build.compression" value="-closure">
<x-is-true value="${build.compression.closure}"/>
</condition>
<condition property="build.compression" value="-uglify">
<x-is-true value="${build.compression.uglify}"/>
</condition>
<property name="build.compression" value=""/>
<x-verify-app-cmd-ver/>
<!--
this id string is used to share a common compiler instance
for all x-compile calls in this project
-->
<property name="compiler.ref.id" value="app-compiler"/>
<!--
this property is set indicating we've reached the end of the
core init phase. it's presence will indicate that we've already
executed this target, and will bypass firing the init code
repeatedly in sub projects (antcall, x-ant-call)
See the above 'unless' attribute on the -init target
-->
<property name="internal.x-sencha-initialized" value="true"/>
</target>
<target name="-after-init"/>
<target name="-before-init-defaults"/>
<target name="-init-defaults">
<!--
This property can be modified to change general build options
such as excluding files from the set. The format expects newlines
for each argument, for example:
<property name="build.operations"/>
exclude
-namespace=Ext
</property>
-->
<property name="build.operations" value=""/>
<!--
This property can be modified to change concatenation
specific options
-strip-comments: comment suppression
-remove-text-references: transform string literal class references to objects
-beautify: unpack the source
<property name="build.concat.options"/>
-strip-comments
-remove-text-references
-beautify
</property>
-->
<property name="build.concat.options" value=""/>
<!--
This property can be modified to change page compilation options
-scripts: inject the given script path into the generated markup ahead of the all classes file
<property name="build.page.options"/>
-scripts=framework.js
</property>
-->
<property name="build.page.options" value=""/>
</target>
<target name="-after-init-defaults"/>
<!--
Initializes the compiler instances, reading in the app.json and package.json
definitions, as well as scanning and parsing all js files found on the
various classpath entries for the framework, workspace, packages, and app
-->
<target name="-init-compiler" depends="-init">
<condition property="internal.app.css.rel" value="${app.out.css.rel}">
<x-is-true value="${enable.ext42.themes}"/>
</condition>
<property name="internal.app.css.rel" value=""/>
<x-compile refid="${compiler.ref.id}"
dir="${app.dir}"
initOnly="true"
inheritAll="true">
<![CDATA[
# base build command
-tempDir=${build.compile.temp.dir}
-keepTempDir=${build.compile.temp.dir.keep}
-options=${build.options}
load-app
-frameworkFile=${build.framework.name}
-jsBundleFile=${build.classes.name}
-cssBundleFile=${internal.app.css.rel}
-tempDir=${build.app.temp.dir}
-tag=${build.tag.name}
and
restore
${build.tag.name}
and
meta
+packages
-out=${build.out.package.versions}
and
classpath
-path=${build.out.package.versions}
-name=framework
and
require
-source=@${build.tag.name}
-requires=@overrides
-allow-unmet=true
and
require
-scopeName=framework
-source=Ext.util.Observable
-requires=${build.out.package.versions}
-allow-unmet=false
and
union
-recursive
-tag=${build.tag.name}
and
save
${build.tag.name}-overrides
and
${build.operations}
and
save
page
]]>
</x-compile>
</target>
</project>

View File

@ -0,0 +1,78 @@
<project name="js-impl">
<!--
this target extracts split mode information from the compiler's app
processor to determine various pieces of information
-->
<target name="-detect-app-build-properties"
depends="-init-compiler">
<x-load-app-builder-properties
refid="${compiler.ref.id}"
splitModePropName="enable.split.mode"
pageModePropName="app.page.mode"/>
</target>
<!--
this is the standard js compile target that builds the output js file(s)
-->
<target name="-compile-js" depends="-detect-app-build-properties">
<if>
<x-is-true value="${enable.split.mode}"/>
<then>
<x-compile refid="${compiler.ref.id}">
<![CDATA[
# build a separate sdk-only js file
union
-tag=package-sencha-core,framework
and
${build.optimize}
and
concat
${build.compression}
-out=${build.framework.file}
${build.concat.options}
# now build the all-classes file, without
# the framework code included
and
restore
page
and
exclude
-tag=framework,package-sencha-core
and
${build.optimize}
and
concat
${build.compression}
-out=${build.classes.file}
${build.concat.options}
]]>
</x-compile>
</then>
<else>
<x-compile refid="${compiler.ref.id}">
<![CDATA[
# build an all-classes.js file that contains
# all code needed by the app
restore
page
and
${build.optimize}
and
concat
${build.compression}
-out=${build.classes.file}
${build.concat.options}
]]>
</x-compile>
</else>
</if>
</target>
<!--
Build javascript
-->
<target name="-before-js"/>
<target name="-js" depends="-compile-js"/>
<target name="-after-js"/>
</project>

View File

@ -0,0 +1,189 @@
/**
* Sencha Blink - Development
* @author Jacky Nguyen <jacky@sencha.com>
*/
(function() {
var head = document.head || document.getElementsByTagName('head')[0];
function write(content) {
document.write(content);
}
function addMeta(name, content) {
var meta = document.createElement('meta');
meta.setAttribute('name', name);
meta.setAttribute('content', content);
head.appendChild(meta);
}
var xhr = new XMLHttpRequest();
xhr.open('GET', 'bootstrap.json', false);
xhr.send(null);
var options = eval("(" + xhr.responseText + ")"),
scripts = options.js || [],
styleSheets = options.css || [],
i, ln, path, platform, theme, exclude;
if(options.platform && options.platforms && options.platforms[options.platform] && options.platforms[options.platform].js) {
scripts = options.platforms[options.platform].js.concat(scripts);
}
if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
var msViewportStyle = document.createElement("style");
msViewportStyle.appendChild(
document.createTextNode(
"@media screen and (orientation: portrait) {" +
"@-ms-viewport {width: 320px !important;}" +
"}" +
"@media screen and (orientation: landscape) {" +
"@-ms-viewport {width: 560px !important;}" +
"}"
)
);
document.getElementsByTagName("head")[0].appendChild(msViewportStyle);
}
addMeta('viewport', 'width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no');
addMeta('apple-mobile-web-app-capable', 'yes');
addMeta('apple-touch-fullscreen', 'yes');
if (!window.Ext) {
window.Ext = {};
}
Ext.microloaded = true;
var filterPlatform = window.Ext.filterPlatform = function(platform) {
var profileMatch = false,
ua = navigator.userAgent,
j, jln;
platform = [].concat(platform);
function isPhone(ua) {
var isMobile = /Mobile(\/|\s)/.test(ua);
// Either:
// - iOS but not iPad
// - Android 2
// - Android with "Mobile" in the UA
return /(iPhone|iPod)/.test(ua) ||
(!/(Silk)/.test(ua) && (/(Android)/.test(ua) && (/(Android 2)/.test(ua) || isMobile))) ||
(/(BlackBerry|BB)/.test(ua) && isMobile) ||
/(Windows Phone)/.test(ua);
}
function isTablet(ua) {
return !isPhone(ua) && (/iPad/.test(ua) || /Android|Silk/.test(ua) || /(RIM Tablet OS)/.test(ua) ||
(/MSIE 10/.test(ua) && /; Touch/.test(ua)));
}
// Check if the ?platform parameter is set in the URL
var paramsString = window.location.search.substr(1),
paramsArray = paramsString.split("&"),
params = {},
testPlatform, i;
for (i = 0; i < paramsArray.length; i++) {
var tmpArray = paramsArray[i].split("=");
params[tmpArray[0]] = tmpArray[1];
}
testPlatform = params.platform;
if (testPlatform) {
return platform.indexOf(testPlatform) != -1;
}
for (j = 0, jln = platform.length; j < jln; j++) {
switch (platform[j]) {
case 'phone':
profileMatch = isPhone(ua);
break;
case 'tablet':
profileMatch = isTablet(ua);
break;
case 'desktop':
profileMatch = !isPhone(ua) && !isTablet(ua);
break;
case 'ios':
profileMatch = /(iPad|iPhone|iPod)/.test(ua);
break;
case 'android':
profileMatch = /(Android|Silk)/.test(ua);
break;
case 'blackberry':
profileMatch = /(BlackBerry|BB)/.test(ua);
break;
case 'safari':
profileMatch = /Safari/.test(ua) && !(/(BlackBerry|BB)/.test(ua));
break;
case 'chrome':
profileMatch = /Chrome/.test(ua);
break;
case 'ie10':
profileMatch = /MSIE 10/.test(ua);
break;
case 'windows':
profileMatch = /MSIE 10/.test(ua) || /Trident/.test(ua);
break;
case 'tizen':
profileMatch = /Tizen/.test(ua);
break;
case 'firefox':
profileMatch = /Firefox/.test(ua);
}
if (profileMatch) {
return true;
}
}
return false;
};
for (i = 0,ln = styleSheets.length; i < ln; i++) {
path = styleSheets[i];
if (typeof path != 'string') {
platform = path.platform;
exclude = path.exclude;
theme = path.theme;
path = path.path;
}
if (platform) {
if (!filterPlatform(platform) || filterPlatform(exclude)) {
continue;
}
if(!Ext.theme) {
Ext.theme = {};
}
if(!Ext.theme.name) {
Ext.theme.name = theme || 'Default';
}
}
write('<link rel="stylesheet" href="'+path+'">');
}
for (i = 0,ln = scripts.length; i < ln; i++) {
path = scripts[i];
if (typeof path != 'string') {
platform = path.platform;
exclude = path.exclude;
path = path.path;
}
if (platform) {
if (!filterPlatform(platform) || filterPlatform(exclude)) {
continue;
}
}
write('<script src="'+path+'"></'+'script>');
}
})();

View File

@ -0,0 +1,788 @@
/**
* Sencha Blink
* @author Jacky Nguyen <jacky@sencha.com>
*/
(function(global) {
var emptyFn = function(){},
callbacks = [],
doc = global.document,
head = doc.head || doc.getElementsByTagName('head')[0],
addWindowListener = global.addEventListener,
removeWindowListener = global.removeEventListener,
jsonParse = JSON.parse,
a = doc.createElement('a'),
documentLocation = doc.location,
documentUri = documentLocation.protocol + '//' + documentLocation.hostname + documentLocation.pathname + documentLocation.search,
manifestFile = 'app.json',
isRefreshing = false,
activeManifest, appCache, storage;
try {
storage = global.localStorage;
appCache = global.applicationCache;
}
catch(e) {}
function getManifestStorageKey(id) {
return id + '-' + documentUri + manifestFile;
}
function Manifest(manifest) {
var manifestContent;
if (typeof manifest == 'string') {
manifestContent = manifest;
manifest = jsonParse(manifestContent);
}
else {
manifestContent = JSON.stringify(manifest);
}
var applicationId = manifest.id,
key = getManifestStorageKey(applicationId),
assetMap = {};
function processAsset(asset) {
var uri;
if (typeof asset == 'string') {
asset = {
path: asset
};
}
if (asset.shared) {
asset.version = asset.shared;
uri = asset.shared + asset.path;
}
else {
uri = toAbsoluteUri(asset.path);
}
asset.uri = uri;
asset.key = applicationId + '-' + uri;
assetMap[uri] = asset;
return asset;
}
function processAssets(assets, type) {
var ln = assets.length,
i, asset;
for (i = 0; i < ln; i++) {
asset = assets[i];
assets[i] = asset = processAsset(asset);
asset.type = type;
asset.index = i;
asset.collection = assets;
asset.ready = false;
asset.evaluated = false;
}
return assets;
}
this.key = key;
this.css = processAssets(manifest.css, 'css');
this.js = processAssets(manifest.js, 'js');
Ext.microloaded = true;
var filterPlatform = window.Ext.filterPlatform = function(platform) {
var profileMatch = false,
ua = navigator.userAgent,
j, jln;
platform = [].concat(platform);
function isPhone(ua) {
var isMobile = /Mobile(\/|\s)/.test(ua);
// Either:
// - iOS but not iPad
// - Android 2
// - Android with "Mobile" in the UA
return /(iPhone|iPod)/.test(ua) ||
(!/(Silk)/.test(ua) && (/(Android)/.test(ua) && (/(Android 2)/.test(ua) || isMobile))) ||
(/(BlackBerry|BB)/.test(ua) && isMobile) ||
/(Windows Phone)/.test(ua);
}
function isTablet(ua) {
return !isPhone(ua) && (/iPad/.test(ua) || /Android|Silk/.test(ua) || /(RIM Tablet OS)/.test(ua) ||
(/MSIE 10/.test(ua) && /; Touch/.test(ua)));
}
// Check if the ?platform parameter is set in the URL
var paramsString = window.location.search.substr(1),
paramsArray = paramsString.split("&"),
params = {},
testPlatform, i;
for (i = 0; i < paramsArray.length; i++) {
var tmpArray = paramsArray[i].split("=");
params[tmpArray[0]] = tmpArray[1];
}
testPlatform = params.platform;
if (testPlatform) {
return platform.indexOf(testPlatform) != -1;
}
for (j = 0, jln = platform.length; j < jln; j++) {
switch (platform[j]) {
case 'phone':
profileMatch = isPhone(ua);
break;
case 'tablet':
profileMatch = isTablet(ua);
break;
case 'desktop':
profileMatch = !isPhone(ua) && !isTablet(ua);
break;
case 'ios':
profileMatch = /(iPad|iPhone|iPod)/.test(ua);
break;
case 'android':
profileMatch = /(Android|Silk)/.test(ua);
break;
case 'blackberry':
profileMatch = /(BlackBerry|BB)/.test(ua);
break;
case 'safari':
profileMatch = /Safari/.test(ua) && !(/(BlackBerry|BB)/.test(ua));
break;
case 'chrome':
profileMatch = /Chrome/.test(ua);
break;
case 'ie10':
profileMatch = /MSIE 10/.test(ua);
break;
case 'windows':
profileMatch = /MSIE 10/.test(ua) || /Trident/.test(ua);
break;
case 'tizen':
profileMatch = /Tizen/.test(ua);
break;
case 'firefox':
profileMatch = /Firefox/.test(ua);
}
if (profileMatch) {
return true;
}
}
return false;
};
this.css = this.css.filter(function(css) {
var platform = css.platform,
exclude = css.exclude;
css.type = "css";
if (platform) {
if (filterPlatform(platform) && !filterPlatform(exclude)) {
if(!Ext.theme) {
Ext.theme = {};
}
if(!Ext.theme.name) {
Ext.theme.name = css.theme || 'Default';
}
return true;
}
css.filtered = true;
return false;
}
return true;
});
this.js = this.js.filter(function(js) {
var platform = js.platform,
exclude = js.exclude;
js.type = "js";
if (platform) {
if (filterPlatform(platform) && !filterPlatform(exclude)) {
return true;
}
else {
js.filtered = true;
return false;
}
}
return true;
});
this.assets = this.css.concat(this.js);
this.getAsset = function(uri) {
return assetMap[uri];
};
this.store = function() {
store(key, manifestContent);
};
}
if (typeof global.Ext === 'undefined') {
var Ext = global.Ext = {};
}
function toAbsoluteUri(uri) {
a.href = uri;
return a.href;
}
function addMeta(name, content) {
var meta = document.createElement('meta');
meta.setAttribute('name', name);
meta.setAttribute('content', content);
head.appendChild(meta);
}
function request(uri, isShared, onSuccess, onFailure) {
(isShared ? requestIframe : requestXhr)(uri, onSuccess, onFailure);
}
function requestXhr(uri, onSuccess, onFailure) {
var xhr = new XMLHttpRequest();
onFailure = onFailure || emptyFn;
uri = uri + ((uri.indexOf('?') == -1) ? '?' : '&') + Date.now();
try {
xhr.open('GET', uri, true);
xhr.onreadystatechange = function() {
if (xhr.readyState == 4) {
var status = xhr.status,
content = xhr.responseText;
if ((status >= 200 && status < 300) || status == 304 || (status == 0 && content.length > 0)) {
onSuccess(content);
}
else {
onFailure();
}
}
};
xhr.send(null);
} catch (e) {
onFailure();
}
}
function requestIframe(uri, onSuccess) {
var iframe = doc.createElement('iframe');
callbacks.push({
iframe: iframe,
callback: onSuccess
});
iframe.src = uri + '.html';
iframe.style.cssText = 'width:0;height:0;border:0;position:absolute;z-index:-999;visibility:hidden';
doc.body.appendChild(iframe);
}
// for remote assets, inject a script element
function addRemoteScript(uri, onSuccess, onFailure) {
var script = document.createElement('script');
script.src = uri;
script.type = "text/javascript";
script.charset = "UTF-8";
script.onerror = onFailure;
if ('addEventListener' in script ) {
script.onload = onSuccess;
} else if ('readyState' in script) {
script.onreadystatechange = function() {
if (this.readyState === 'loaded' ||
this.readyState === 'complete') {
onSuccess();
}
};
} else {
script.onload = onSuccess;
}
head.appendChild(script);
}
function addRemoteLink(uri) {
var link = document.createElement('link');
link.rel = "stylesheet";
link.href = uri;
head.appendChild(link);
}
function requestAsset(asset, onSuccess, onFailure) {
var isRemote = !!asset.remote,
isShared = !!asset.shared;
if (isRemote) {
if(asset.type === "js") {
addRemoteScript(asset.uri, function(){
onSuccess('');
}, onFailure);
} else {
addRemoteLink(asset.uri);
onSuccess('');
}
return;
}
if (!isShared && asset.version && asset.version.length) {
var onRequestSuccess = onSuccess,
version = asset.version,
versionLn = version.length,
checksumFail, checksumType;
onSuccess = function(content) {
checksumType = content.substring(0, 1);
if (checksumType == '/') {
if (content.substring(2, versionLn + 2) !== version) {
checksumFail = true;
}
}
else if (checksumType == 'f') {
if (content.substring(10, versionLn + 10) !== version) {
checksumFail = true;
}
}
else if (checksumType == '.') {
if (content.substring(1, versionLn + 1) !== version) {
checksumFail = true;
}
}
if (checksumFail === true) {
if (confirm("Requested: '" + asset.uri + " seems to have been changed. Attempt to refresh the application?")) {
refresh();
}
return;
}
onRequestSuccess(content);
};
}
request(asset.uri, isShared, onSuccess, onFailure);
}
function onMessage(e) {
var data = e.data,
sourceWindow = e.source.window,
i, ln, callback, iframe;
for (i = 0, ln = callbacks.length; i < ln; i++) {
callback = callbacks[i];
iframe = callback.iframe;
if (iframe.contentWindow === sourceWindow) {
callback.callback(data);
doc.body.removeChild(iframe);
callbacks.splice(i, 1);
return;
}
}
}
function patch(content, delta) {
var output = [],
chunk, i, ln;
if (delta.length === 0) {
return content;
}
for (i = 0,ln = delta.length; i < ln; i++) {
chunk = delta[i];
if (typeof chunk === 'number') {
output.push(content.substring(chunk, chunk + delta[++i]));
}
else {
output.push(chunk);
}
}
return output.join('');
}
function log(message) {
if (typeof console != 'undefined') {
(console.error || console.log).call(console, message);
}
}
function store(key, value) {
try {
storage.setItem(key, value);
}
catch (e) {
if (storage && e.code == e.QUOTA_EXCEEDED_ERR && activeManifest) {
log("LocalStorage Quota exceeded, cannot store " + key + " locally");
// Quota exceeded, clean up unused items
// var items = activeManifest.assets.map(function(asset) {
// return asset.key;
// }),
// i = 0,
// ln = storage.length,
// cleaned = false,
// item;
//
// items.push(activeManifest.key);
//
// while (i <= ln - 1) {
// item = storage.key(i);
//
// if (items.indexOf(item) == -1) {
// storage.removeItem(item);
// cleaned = true;
// ln--;
// }
// else {
// i++;
// }
// }
// Done cleaning up, attempt to store the value again
// If there's still not enough space, no other choice
// but to skip this item from being stored
// if (cleaned) {
// store(key, value);
// }
}
}
}
function retrieve(key) {
try {
return storage.getItem(key);
}
catch (e) {
// Private browsing mode
return null;
}
}
function retrieveAsset(asset) {
return retrieve(asset.key);
}
function storeAsset(asset, content) {
return store(asset.key, content);
}
function refresh() {
if (!isRefreshing) {
isRefreshing = true;
requestXhr(manifestFile, function(content) {
new Manifest(content).store();
global.location.reload();
});
}
}
function blink(currentManifest) {
var currentAssets = currentManifest.assets,
assetsCount = currentAssets.length,
newManifest;
activeManifest = currentManifest;
addWindowListener('message', onMessage, false);
function onAssetReady(asset, content) {
var assets = asset.collection,
index = asset.index,
ln = assets.length,
i;
asset.ready = true;
asset.content = content;
for (i = index - 1; i >= 0; i--) {
asset = assets[i];
if (!asset.filtered && (!asset.ready || !asset.evaluated)) {
return;
}
}
for (i = index; i < ln; i++) {
asset = assets[i];
if (asset.ready) {
if (!asset.evaluated) {
evaluateAsset(asset);
}
}
else {
return;
}
}
}
function evaluateAsset(asset) {
asset.evaluated = true;
if (asset.type == 'js') {
try {
eval(asset.content);
}
catch (e) {
log("Error evaluating " + asset.uri + " with message: " + e);
}
}
else {
var style = doc.createElement('style'),
base;
style.type = 'text/css';
style.textContent = asset.content;
if ('id' in asset) {
style.id = asset.id;
}
if ('disabled' in asset) {
style.disabled = asset.disabled;
}
base = document.createElement('base');
base.href = asset.path.replace(/\/[^\/]*$/, '/');
head.appendChild(base);
head.appendChild(style);
head.removeChild(base);
}
delete asset.content;
if (--assetsCount == 0) {
onReady();
}
}
function onReady() {
var updatingAssets = [],
appCacheReady = false,
onAppCacheIdle = function() {},
onAppCacheReady = function() {
appCache.swapCache();
appCacheReady = true;
onAppCacheIdle();
},
updatingCount;
removeWindowListener('message', onMessage, false);
if (appCache.status == appCache.UPDATEREADY) {
onAppCacheReady();
}
else if (appCache.status == appCache.CHECKING || appCache.status == appCache.DOWNLOADING) {
appCache.onupdateready = onAppCacheReady;
appCache.onnoupdate = appCache.onobsolete = function() {
onAppCacheIdle();
};
}
function notifyUpdateIfAppCacheReady() {
if (appCacheReady) {
notifyUpdate();
}
}
function notifyUpdate() {
var updatedCallback = Ext.onUpdated || emptyFn;
if ('onSetup' in Ext) {
Ext.onSetup(updatedCallback);
}
else {
updatedCallback();
}
}
function doUpdate() {
newManifest.store();
updatingAssets.forEach(function(asset) {
storeAsset(asset, asset.content);
});
notifyUpdate();
}
function onAssetUpdated(asset, content) {
asset.content = content;
if (--updatingCount == 0) {
if (appCache.status == appCache.IDLE) {
doUpdate();
}
else {
onAppCacheIdle = doUpdate;
}
}
}
function checkForUpdate() {
removeWindowListener('online', checkForUpdate, false);
requestXhr(manifestFile, function(manifestContent) {
activeManifest = newManifest = new Manifest(manifestContent);
var assets = newManifest.assets,
currentAsset;
assets.forEach(function(asset) {
currentAsset = currentManifest.getAsset(asset.uri);
if (!currentAsset || asset.version !== currentAsset.version) {
updatingAssets.push(asset);
}
});
updatingCount = updatingAssets.length;
if (updatingCount == 0) {
if (appCache.status == appCache.IDLE) {
notifyUpdateIfAppCacheReady();
}
else {
onAppCacheIdle = notifyUpdateIfAppCacheReady;
}
return;
}
updatingAssets.forEach(function(asset) {
var currentAsset = currentManifest.getAsset(asset.uri),
path = asset.path,
update = asset.update;
function updateFull() {
requestAsset(asset, function(content) {
onAssetUpdated(asset, content);
});
}
// New asset (never used before)
// OR Shared from CDN
// OR Missing local storage
// OR Full update
if (!currentAsset || !update || retrieveAsset(asset) === null || update != 'delta') {
updateFull();
}
else {
requestXhr('deltas/' + path + '/' + currentAsset.version + '.json',
function(content) {
try {
onAssetUpdated(asset, patch(retrieveAsset(asset), jsonParse(content)));
}
catch (e) {
log("Malformed delta content received for " + asset.uri);
}
},
updateFull
);
}
})
});
}
if (navigator.onLine !== false) {
checkForUpdate();
}
else {
addWindowListener('online', checkForUpdate, false);
}
}
if (assetsCount == 0) {
onReady();
return;
}
currentAssets.forEach(function(asset) {
var content = retrieveAsset(asset);
if (content === null) {
requestAsset(asset, function(content) {
if (!asset.remote) {
storeAsset(asset, content);
}
onAssetReady(asset, content);
}, function() {
onAssetReady(asset, '');
});
}
else {
onAssetReady(asset, content);
}
});
}
function blinkOnDomReady(manifest) {
if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
var msViewportStyle = document.createElement("style");
msViewportStyle.appendChild(
document.createTextNode(
"@media screen and (orientation: portrait) {" +
"@-ms-viewport {width: 320px !important;}" +
"}" +
"@media screen and (orientation: landscape) {" +
"@-ms-viewport {width: 560px !important;}" +
"}"
)
);
document.getElementsByTagName("head")[0].appendChild(msViewportStyle);
}
var readyStateRe = (/MSIE 10/.test(navigator.userAgent)) ? /complete|loaded/ : /interactive|complete|loaded/;
if (doc.readyState.match(readyStateRe) !== null) {
blink(manifest);
}
else {
addWindowListener('DOMContentLoaded', function() {
if (navigator.standalone) {
// When running from Home Screen, the splash screen will not disappear until all
// external resource requests finish.
// The first timeout clears the splash screen
// The second timeout allows inital HTML content to be displayed
setTimeout(function() {
setTimeout(function() {
blink(manifest);
}, 1);
}, 1);
}
else {
setTimeout(function() {
blink(manifest);
}, 1);
}
}, false);
}
}
Ext.blink = function(manifest) {
var manifestContent = retrieve(getManifestStorageKey(manifest.id));
addMeta('viewport', 'width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no');
addMeta('apple-mobile-web-app-capable', 'yes');
addMeta('apple-touch-fullscreen', 'yes');
if (manifestContent) {
manifest = new Manifest(manifestContent);
blinkOnDomReady(manifest);
}
else {
requestXhr(manifestFile, function(content) {
manifest = new Manifest(content);
manifest.store();
blinkOnDomReady(manifest);
});
}
};
})(this);

View File

@ -0,0 +1,180 @@
/**
* Sencha Blink - Testing
* @author Jacky Nguyen <jacky@sencha.com>
*/
(function(global) {
var head = global.document.head || global.document.getElementsByTagName('head')[0],
Ext = global.Ext;
if (typeof Ext == 'undefined') {
global.Ext = Ext = {};
}
function write(content) {
document.write(content);
}
function addMeta(name, content) {
var meta = document.createElement('meta');
meta.setAttribute('name', name);
meta.setAttribute('content', content);
head.appendChild(meta);
}
Ext.blink = function(options) {
var scripts = options.js || [],
styleSheets = options.css || [],
i, ln, path, platform, theme, exclude;
if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
var msViewportStyle = document.createElement("style");
msViewportStyle.appendChild(
document.createTextNode(
"@media screen and (orientation: portrait) {" +
"@-ms-viewport {width: 320px !important;}" +
"}" +
"@media screen and (orientation: landscape) {" +
"@-ms-viewport {width: 560px !important;}" +
"}"
)
);
document.getElementsByTagName("head")[0].appendChild(msViewportStyle);
}
addMeta('viewport', 'width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no');
addMeta('apple-mobile-web-app-capable', 'yes');
addMeta('apple-touch-fullscreen', 'yes');
Ext.microloaded = true;
var filterPlatform = window.Ext.filterPlatform = function(platform) {
var profileMatch = false,
ua = navigator.userAgent,
j, jln;
platform = [].concat(platform);
function isPhone(ua) {
var isMobile = /Mobile(\/|\s)/.test(ua);
// Either:
// - iOS but not iPad
// - Android 2
// - Android with "Mobile" in the UA
return /(iPhone|iPod)/.test(ua) ||
(!/(Silk)/.test(ua) && (/(Android)/.test(ua) && (/(Android 2)/.test(ua) || isMobile))) ||
(/(BlackBerry|BB)/.test(ua) && isMobile) ||
/(Windows Phone)/.test(ua);
}
function isTablet(ua) {
return !isPhone(ua) && (/iPad/.test(ua) || /Android|Silk/.test(ua) || /(RIM Tablet OS)/.test(ua) ||
(/MSIE 10/.test(ua) && /; Touch/.test(ua)));
}
// Check if the ?platform parameter is set in the URL
var paramsString = window.location.search.substr(1),
paramsArray = paramsString.split("&"),
params = {},
testPlatform, i;
for (i = 0; i < paramsArray.length; i++) {
var tmpArray = paramsArray[i].split("=");
params[tmpArray[0]] = tmpArray[1];
}
testPlatform = params.platform;
if (testPlatform) {
return platform.indexOf(testPlatform) != -1;
}
for (j = 0, jln = platform.length; j < jln; j++) {
switch (platform[j]) {
case 'phone':
profileMatch = isPhone(ua);
break;
case 'tablet':
profileMatch = isTablet(ua);
break;
case 'desktop':
profileMatch = !isPhone(ua) && !isTablet(ua);
break;
case 'ios':
profileMatch = /(iPad|iPhone|iPod)/.test(ua);
break;
case 'android':
profileMatch = /(Android|Silk)/.test(ua);
break;
case 'blackberry':
profileMatch = /(BlackBerry|BB)/.test(ua);
break;
case 'safari':
profileMatch = /Safari/.test(ua) && !(/(BlackBerry|BB)/.test(ua));
break;
case 'chrome':
profileMatch = /Chrome/.test(ua);
break;
case 'ie10':
profileMatch = /MSIE 10/.test(ua);
break;
case 'windows':
profileMatch = /MSIE 10/.test(ua) || /Trident/.test(ua);
break;
case 'tizen':
profileMatch = /Tizen/.test(ua);
break;
case 'firefox':
profileMatch = /Firefox/.test(ua);
}
if (profileMatch) {
return true;
}
}
return false;
};
for (i = 0,ln = styleSheets.length; i < ln; i++) {
path = styleSheets[i];
if (typeof path != 'string') {
platform = path.platform;
exclude = path.exclude;
theme = path.theme;
path = path.path;
}
if (platform) {
if (!filterPlatform(platform) || filterPlatform(exclude)) {
continue;
}
if(!Ext.theme) {
Ext.theme = {};
}
if(!Ext.theme.name) {
Ext.theme.name = theme || 'Default';
}
}
write('<link rel="stylesheet" href="'+path+'">');
}
for (i = 0,ln = scripts.length; i < ln; i++) {
path = scripts[i];
if (typeof path != 'string') {
platform = path.platform;
exclude = path.exclude;
path = path.path;
}
if (platform) {
if (!filterPlatform(platform) || filterPlatform(exclude)) {
continue;
}
}
write('<script src="'+path+'"></'+'script>');
}
}
})(this);

View File

@ -0,0 +1,28 @@
# =============================================================================
# This file defines default property values that apply to the "native" build
# environment.
#
# Please use native.properties to customize these properties unless you want
# your customizations to be for all environments. In that case, you can instead
# override these properties in build.properties.
#
# The properties defined in this file take priority over defaults.properties
# but are lower priority than build.properties which in turn is lower priority
# than native.properties.
#
# IMPORTANT - This file should not be modified by an app as it is overwritten
# during each app upgrade.
# =============================================================================
build.options.logger=no
build.options.debug=false
# enable yui compression
build.compression.yui=1
enable.standalone.manifest=true
app.microloader.name=testing.js
skip.native-package=false

View File

@ -0,0 +1,8 @@
# =============================================================================
# This file provides an override point for default variables defined in
# native.defaults.properties. These properties are only imported when building
# for the "native" environment.
#
# Properties defined in this file take priority over build.properties but are
# only loaded for "native" builds.
# =============================================================================

View File

@ -0,0 +1,27 @@
# =============================================================================
# This file defines default property values that apply to the "package" build
# environment.
#
# Please use package.properties to customize these properties unless you want
# your customizations to be for all environments. In that case, you can instead
# override these properties in build.properties.
#
# The properties defined in this file take priority over defaults.properties
# but are lower priority than build.properties which in turn is lower priority
# than package.properties.
#
# IMPORTANT - This file should not be modified by an app as it is overwritten
# during each app upgrade.
#
# NOTE: This use of "package" applies to native packaged application, not a
# Package in the general since of code libraries.
# =============================================================================
build.options.logger=no
build.options.debug=false
# enable yui compression
build.compression.yui=1
app.microloader.name=testing.js

View File

@ -0,0 +1,11 @@
# =============================================================================
# This file provides an override point for default variables defined in
# package.defaults.properties. These properties are only imported when building
# for the "package" environment.
#
# Properties defined in this file take priority over build.properties but are
# only loaded for "package" builds.
#
# NOTE: This use of "package" applies to native packaged application, not a
# Package in the general since of code libraries.
# =============================================================================

View File

@ -0,0 +1,127 @@
<project name="packager-impl">
<macrodef name="x-run-mobile-packager">
<attribute name="configfile"/>
<attribute name="action"/>
<sequential>
<echo>Running mobile packager action @{action} on file @{configFile}</echo>
<x-sencha-command dir="${app.dir}" inheritall="true">
<![CDATA[
app
package
@{action}
-path=@{configfile}
]]>
</x-sencha-command>
</sequential>
</macrodef>
<macrodef name="x-run-mobile-packager-config">
<attribute name="config"/>
<attribute name="run" default="${args.autorun}"/>
<sequential>
<if>
<not>
<available file="@{config}"/>
</not>
<then>
<!--
if the input packager config file for stbuild is
not available, then create it
-->
<echo><![CDATA[
Creating default mobile packager config file at :
@{config}
]]></echo>
<x-run-mobile-packager
configfile="@{config}"
action="generate"/>
</then>
</if>
<local name="local.build.mobile.out.dir"/>
<local name="local.build.mobile.config.name"/>
<!--
append the current config file name to the output directory
for mobile packages. this allows multiple config outputs to
be sandboxed by the name of the config file in the mobile
package output directory.
-->
<basename file="@{config}" property="local.build.mobile.config.name"/>
<property name="local.build.mobile.out.dir"
value="${build.mobile.packager.out.dir}/${local.build.mobile.config.name}"/>
<!--
duplicate the config file, so that we can set the
input and output properties w/o losing comment blocks
-->
<x-set-json-property file="@{config}"
tofile="${build.mobile.packager.temp.file}">
<property name="inputPath"
value="${build.mobile.packager.in.dir}"/>
<property name="outputPath"
value="${local.build.mobile.out.dir}"/>
</x-set-json-property>
<echo><![CDATA[
Processing Mobile Packager config file
config: @{config}
inputPath: ${build.mobile.packager.in.dir}
outputPath: ${local.build.mobile.out.dir}
]]></echo>
<local name="mobile.packager.platform"/>
<x-load-properties file="${build.mobile.packager.temp.file}"
prefix="mobile.packager"
required="true"/>
<if>
<contains string="${mobile.packager.platform}" substring="iOS"/>
<then>
<copy todir="${build.dir}">
<fileset dir="${app.dir}/resources/icons" includes="**/*"/>
<fileset dir="${app.dir}/resources/loading" includes="**/*"/>
</copy>
</then>
</if>
<local name="build.mobile.action"/>
<condition property="build.mobile.action" value="run">
<x-is-true value="@{run}"/>
</condition>
<property name="build.mobile.action" value="build"/>
<x-run-mobile-packager
configFile="${build.mobile.packager.temp.file}"
action="${build.mobile.action}"/>
</sequential>
</macrodef>
<target name="-native-package-mobile">
<if>
<x-is-true value="${args.autorun}"/>
<then>
<echo>Running default mobile packager config.</echo>
<x-run-mobile-packager-config config="${build.mobile.packager.default.file}"
run="true"/>
</then>
<else>
<echo>Building all specified mobile packager configs.</echo>
<for param="configfile" list="${build.mobile.packager.file}">
<sequential>
<x-run-mobile-packager-config config="@{configfile}" run="false"/>
</sequential>
</for>
</else>
</if>
</target>
<target name="-before-native-package"/>
<target name="-native-package"
depends="-native-package-mobile">
</target>
<target name="-after-native-package"/>
</project>

View File

@ -0,0 +1,191 @@
<project name="page-impl.xml">
<target name="-build-output-microload-page">
<if>
<x-is-true value="${build.enable.embedded.manifest}"/>
<then>
<x-compile refid="${compiler.ref.id}">
<![CDATA[
# generate microloader file
microload
-operation=microloader
-microloaderPath=${app.microloader.path}
-tpl=${build.microloader.code.tpl}
-out=${build.microloader.path}
and
# generate json file
microload
-operation=json
-append
-tpl=${build.microloader.json.tpl.embedded}
-out=${build.microloader.path}
]]>
</x-compile>
</then>
<else>
<x-compile refid="${compiler.ref.id}">
<![CDATA[
# generate json file
microload
-operation=json
-tpl=${build.microloader.json.tpl.standalone}
-out=${build.out.json.path}
and
# generate microloader file
microload
-operation=microloader
-microloaderPath=${app.microloader.path}
-tpl=${build.microloader.code.tpl}
-out=${build.microloader.path}
and
microload
-operation=json
-append
-tpl=${build.microloader.json.tpl.external}
-out=${build.microloader.path}
]]>
</x-compile>
</else>
</if>
<if>
<x-is-true value="${build.enable.embedded.microloader}"/>
<then>
<x-sencha-command dir="${app.dir}" inheritall="true">
<![CDATA[
fs
minify
${build.embedded.microloader.compressor}
-from=${build.microloader.path}
-to=${build.microloader.path}
]]>
</x-sencha-command>
<x-compile refid="${compiler.ref.id}">
<![CDATA[
markup
-contentFile=${build.microloader.path}
-tpl=${build.embedded.microloader.tpl}
-out=${build.out.page.path}
]]>
</x-compile>
<!--once the generated microloader file is embedded, delete it-->
<delete file="${build.microloader.path}"/>
</then>
<else>
<x-compile refid="${compiler.ref.id}">
<![CDATA[
markup
-markup=${build.external.microloader.markup}
-out=${build.out.page.path}
]]>
</x-compile>
</else>
</if>
</target>
<!-- generates a separate json manifest for use with native packager -->
<target name="-build-standalone-json-manifest">
<x-run-if-true value="${enable.standalone.manifest}">
<x-compile refid="${compiler.ref.id}">
<![CDATA[
# generate json file
microload
-operation=json
-tpl=${build.microloader.json.tpl.standalone}
-out=${build.out.json.path}
]]>
</x-compile>
</x-run-if-true>
</target>
<target name="-build-output-markup-page">
<condition property="internal.app.css.rel" value="${app.out.css.rel}">
<x-is-true value="${enable.ext42.themes}"/>
</condition>
<property name="internal.app.css.rel" value=""/>
<x-compile refid="${compiler.ref.id}">
<![CDATA[
markup
-out=${build.out.page.path}
]]>
</x-compile>
</target>
<!-- '-detect-app-build-properties' is defined in js-impl.xml -->
<target name="-build-output-page"
depends="-detect-app-build-properties,-build-standalone-json-manifest">
<if>
<x-is-true value="${build.output.markuponly}"/>
<then>
<x-ant-call target="-build-output-markup-page"/>
</then>
<else>
<x-ant-call target="-build-output-microload-page"/>
</else>
</if>
</target>
<target name="-copy-app-resources" depends="-init-compiler">
<if>
<x-is-false value="${build.output.markuponly}"/>
<then>
<x-compile refid="${compiler.ref.id}">
<![CDATA[
app-resources
-compress=${enable.resource.compression}
-out=${build.dir}
]]>
</x-compile>
</then>
</if>
</target>
<target name="-generate-deltas" depends="-init-compiler">
<if>
<and>
<x-is-true value="${enable.deltas}"/>
<x-is-false value="${build.output.markuponly}"/>
</and>
<then>
<x-compile refid="${compiler.ref.id}">
<![CDATA[
deltas
-archivePath=${build.out.archive.path}
-deltaPath=${build.out.delta.path}
-resourcePath=${build.dir}
]]>
</x-compile>
</then>
</if>
</target>
<target name="-generate-cache-manifest" depends="-init-compiler">
<if>
<and>
<x-is-true value="${enable.cache.manifest}"/>
<x-is-false value="${build.output.markuponly}"/>
</and>
<then>
<x-compile refid="${compiler.ref.id}">
<![CDATA[
cache-manifest
-cacheManifestPath=${build.manifest.path}
]]>
</x-compile>
<replace file="${build.out.page.path}"
token="&lt;html manifest=&quot;&quot;"
value="&lt;html manifest=&quot;${build.manifest.name}&quot;"/>
</then>
</if>
</target>
<target name="-before-page"/>
<target name="-page"
depends="-copy-app-resources,
-generate-deltas,
-build-output-page,
-generate-cache-manifest"/>
<target name="-after-page"/>
</project>

View File

@ -0,0 +1,32 @@
<project basedir=".">
<!--
This file can be freely edited, so long as the <import file="plugin-impl.xml"/>
statement is not removed.
One of the purposes of this file is to hook various Sencha Command operations and do
processing before or after the command is processed. To do this, simply provide the
logic in a <target> using one of these names:
-before-generate-app Called before an application is generated
-after-generate-app Called after an application is generated
-before-generate-controller Called before a controller is generated
-after-generate-controller Called after a controller is generated
-before-generate-model Called before a model is generated
-after-generate-model Called after a model is generated
-before-generate-profile Called before a profile is generated
-after-generate-profile Called after a profile is generated
-->
<import file="${workspace.config.dir}/plugin.xml"/>
<!--
<target name="-after-generate-model">
... use ${args.path}, ${args.name} and ${args.fields} as needed ...
</target>
Other targets are similar. There are properties prefixed with "args." and the name of
the command line option that hold the parameters for the command.
-->
</project>

View File

@ -0,0 +1,31 @@
# =============================================================================
# This file defines default property values that apply to the "production" build
# environment.
#
# Please use production.properties to customize these properties unless you want
# your customizations to be for all environments. In that case, you can instead
# override these properties in build.properties.
#
# The properties defined in this file take priority over defaults.properties
# but are lower priority than build.properties which in turn is lower priority
# than production.properties.
#
# IMPORTANT - This file should not be modified by an app as it is overwritten
# during each app upgrade.
# =============================================================================
build.options.logger=no
build.options.debug=false
enable.deltas=true
enable.cache.manifest=true
enable.resource.compression=true
build.enable.embedded.manifest=false
app.microloader.name=production.js
build.embedded.microloader.compressor=-closure

View File

@ -0,0 +1,8 @@
# =============================================================================
# This file provides an override point for default variables defined in
# production.defaults.properties. These properties are only imported when building
# for the "production" environment.
#
# Properties defined in this file take priority over build.properties but are
# only loaded for "production" builds.
# =============================================================================

View File

@ -0,0 +1,152 @@
<project name="refresh-impl">
<!--
This macrodef regenerates the bootstrap.js class system metadata, which includes
relative file paths, class names, alternate class names, and class alias data
-->
<macrodef name="x-run-bootstrap">
<attribute name="file"/>
<attribute name="basedir"/>
<attribute name="appendMicroloader" default="false"/>
<sequential>
<local name="tag.filter"/>
<local name="ux.include"/>
<local name="load.script.tpl"/>
<condition property="tag.filter" value="package-sencha-core,core">
<x-is-true value="${enable.sencha-core.filter}"/>
</condition>
<property name="tag.filter" value="core"/>
<if>
<equals arg1="${framework.name}" arg2="ext"/>
<then>
<property name="ux.include">
include
-namespace=Ext.ux
and
</property>
<property name="load.script.tpl" value="Ext.Loader.loadScript(&quot;{0}&quot;);"/>
</then>
<else>
<property name="ux.include" value=""/>
<property name="load.script.tpl" value="Ext.Loader.loadScriptFile(&quot;{0}&quot;, Ext.emptyFn);"/>
</else>
</if>
<echo file="@{file}">
/**
* This file is generated by Sencha Cmd and should NOT be edited. It is
* provided to support globbing requires, custom xtypes, and other
* metadata-driven class system features
*/
</echo>
<x-compile refid="${compiler.ref.id}">
<![CDATA[
union
-not
-tag=${tag.filter}
and
metadata
+append
-base-path=@{basedir}
+loader-paths
-jsonp=Ext.Loader.addClassPathMappings
-out=@{file}
and
exclude
-tag=${tag.filter}
and
${ux.include}
metadata
+append
-base-path=@{basedir}
+alternates
-out=@{file}
and
metadata
+append
-base-path=@{basedir}
+alias
-out=@{file}
and
meta
+append
+packages
-out=@{file}
and
union
-tag=overrides
and
metadata
-base-path=@{basedir}
+append
+filenames
-tpl=${load.script.tpl};
-out=@{file}
]]>
</x-compile>
</sequential>
</macrodef>
<!--
Refreshes the application's bootstrap javascript and microloader manifest
'-detect-app-build-properties' is defined in js-impl.xml
-->
<target name="-refresh-app" depends="-detect-app-build-properties">
<!--regenerate class system metadata-->
<x-run-bootstrap file="${app.bootstrap.js}"
basedir="${app.bootstrap.base.path}"/>
<!--regenerate json manifest bootstrap data-->
<if>
<equals arg1="${app.page.mode}" arg2="xcompile"/>
<then>
<!--
append the microloader and manifest to the end
of bootstrap.js
-->
<x-compile refid="${compiler.ref.id}">
<![CDATA[
microload
-operation=microloader
-microloaderPath=${app.microloader.bootstrap}
-append
-out=${app.bootstrap.js}
]]>
</x-compile>
</then>
</if>
<!--
create / overwrite bootstrap.json, which will be used
by the default development.js microloader
-->
<echo file="${build.json.bootstrap.path}">
/**
* This file is generated by Sencha Cmd and should NOT be edited. It is a
* combination of content from app.json, and all required package's package.json
* files. Customizations should be placed in app.json.
*/
</echo>
<x-compile refid="${compiler.ref.id}">
<![CDATA[
microload
-operation=json
-bootstrap
-append
-tpl={0}
-out=${build.json.bootstrap.path}
]]>
</x-compile>
</target>
<!--
Refresh app
-->
<target name="-before-refresh"/>
<target name="-refresh" depends="-refresh-app"/>
<target name="-after-refresh"/>
</project>

View File

@ -0,0 +1,83 @@
<project name="resolve-impl">
<target name="-before-web-start"/>
<target name="-web-start">
<property name="enable.background.server" value="false"/>
<x-sencha-command>
<![CDATA[
fs
web
-port=${build.web.port}
-background=${enable.background.server}
start
-map=${build.web.root}
]]>
</x-sencha-command>
</target>
<target name="-after-web-start"/>
<target name="web-start"
depends="-init,-before-web-start,-web-start,-after-web-start"/>
<target name="-before-web-stop"/>
<target name="-web-stop">
<!--
This needs to be in it's own process due to threading issues when called from a
target.
-->
<x-shell dir="${app.dir}">
${cmd.dir}/sencha fs web -port ${build.web.port} stop
</x-shell>
</target>
<target name="-after-web-stop"/>
<target name="web-stop"
depends="-init,-before-web-stop,-web-stop,-after-web-stop"/>
<target name="-resolve-impl" depends="-refresh">
<x-ant-call target="web-start" unless="skip.web.start">
<param name="enable.background.server" value="true"/>
</x-ant-call>
<local name="app.relative.url"/>
<local name="build.resolve.relative.url"/>
<!--calculate the relative path from the web root to the index page-->
<x-get-relative-path from="${build.web.root}"
to="${app.page.file}"
property="app.relative.url"/>
<property name="build.resolve.relative.url"
value="${build.resolve.url}/${app.relative.url}"/>
<x-sencha-command dir="${app.dir}" inheritall="true">
<![CDATA[
app
resolve
-mode=${build.resolve.mode}
-uri=${build.resolve.relative.url}
-tpl=${build.resolve.tpl}
-out=${build.resolve.file}
]]>
</x-sencha-command>
<x-ant-call target="web-stop" unless="skip.web.start"/>
<x-compile refid="${compiler.ref.id}">
<![CDATA[
restore
page
and
load-refs
-file=${build.resolve.file}
-defaultSrcName=@${build.tag.name}
-allowUnmatched=${build.resolve.allow.unmatched}
and
save
page
]]>
</x-compile>
</target>
<target name="-before-resolve"/>
<target name="-resolve">
<x-ant-call target="-resolve-impl"/>
</target>
<target name="-after-resolve"/>
</project>

View File

@ -0,0 +1,25 @@
<project name="resources-impl">
<target name="-before-resources"/>
<target name="-after-resources"/>
<!--'-init-compiler' defined in init-impl.xml-->
<target name="-resources" depends="-init-compiler">
<x-compile refid="${compiler.ref.id}">
<![CDATA[
resources
-excludes=-all*.css
-out=${build.resources.dir}
and
resources
-model=true
-out=${build.dir}
]]>
</x-compile>
</target>
<!-- Legacy targets (implement -before-resources or -after-resources instead): -->
<target name="-after-copy-resources"/>
<target name="-after-inherit-resources"/>
<target name="-before-copy-resources"/>
<target name="-before-inherit-resources"/>
</project>

View File

@ -0,0 +1,225 @@
<project name="sass-impl">
<!--
Uses the compiler to generate the top-level scss file for the app
by using the current set of js files to determine the Components
used by the app, then including the corresponding scss files into the
app's style
-->
<target name="-compile-sass" depends="-init-compiler">
<x-normalize-path
path="${build.dir}/resources"
property="image.search.path"/>
<x-compile refid="${compiler.ref.id}">
<![CDATA[
restore
page
and
#only set variables for used classes eg. $include-class-name
sass
+class-name-vars
-variable=$image-search-path:'${image.search.path}'
-variable=$theme-name: '${app.theme}' !default
-output=${app.out.scss}
and
include
-all
and
# include etc and vars from all classes
sass
+etc
+vars
+append
-output=${app.out.scss}
and
restore
page
and
#only include rules from used classes
sass
+rules
+append
-output=${app.out.scss}
and
sass
+ruby
-output=${app.out.ruby}
]]>
</x-compile>
<!--
app.out.css.path is relative to the app output index.html file
-->
<x-get-relative-path
from="${app.dir}"
to="${app.out.css}"
property="app.out.css.path"
/>
<!--update the application's bootstrap.css file to point to the build output-->
<echo file="${app.bootstrap.css}">
<![CDATA[
/*
* This file is generated by Sencha Cmd and should NOT be edited. It redirects
* to the most recently built CSS file for the application to allow index.html
* in the development directory to load properly (i.e., "dev mode").
*/
@import '${app.out.css.path}';
]]>
</echo>
</target>
<!--
This macrodef is used for post-processing Ext JS 4.2+ style theme css files
and will split based on selector thresholds, as well as run the css preprocessor
and compressor
-->
<macrodef name="x-compress-css-files">
<attribute name="dir"/>
<attribute name="prefix"/>
<attribute name="outprefix"/>
<attribute name="compress"/>
<attribute name="preprocess"/>
<sequential>
<x-split-css file="@{dir}/@{prefix}.css"
outdir="${build.resources.dir}"
limit="${build.css.selector.limit}"/>
<for param="cssfile">
<fileset dir="@{dir}" includes="@{prefix}*.css"/>
<sequential>
<local name="css.output.name"/>
<local name="pattern"/>
<property name="pattern" value="(.*?)(@{prefix})(_\d{1,2})*\.css"/>
<propertyregex property="css.output.name"
input="@{cssfile}"
regexp="${pattern}"
select="\1@{outprefix}\3.css"
override="true"/>
<if>
<equals arg1="@{preprocess}" arg2="true"/>
<then>
<echo>Preprocessing @{cssfile} to ${css.output.name}</echo>
<x-css-preprocess
file="@{cssfile}"
tofile="${css.output.name}"
options="${build.css.preprocessor.opts}"/>
</then>
</if>
<if>
<equals arg1="@{compress}" arg2="true"/>
<then>
<echo>Compressing @{cssfile} to ${css.output.name}</echo>
<x-compress-css srcfile="@{cssfile}"
outfile="${css.output.name}"/>
</then>
</if>
</sequential>
</for>
</sequential>
</macrodef>
<!--
This target builds Ext JS 4.2+ style themes, first generating the top-level
scss file, then running compass with the css, sass, and config options set
-->
<target name="-compass-compile-theme-package">
<x-run-if-true value="${enable.ext42.themes}">
<x-ant-call target="-compile-sass"/>
<x-compass-compile
rubyPath="${build.ruby.path}"
dir="${compass.working.dir}"
trace="${compass.compile.trace}"
boring="${compass.compile.boring}"
force="${compass.compile.force}"
sassdir="${compass.sass.dir}"
cssdir="${compass.css.dir}"
config="${compass.config.file}"/>
<x-compress-css-files dir="${build.dir}/resources"
prefix="${app.out.base.debug}"
outprefix="${app.out.base}"
preprocess="${build.css.preprocess}"
compress="${build.css.compress}"/>
</x-run-if-true>
</target>
<!--
This is a legacy macrodef to support building Ext JS 4.1 themes, which have been
deprecated in favor of Ext JS 4.2 theme packages
-->
<macrodef name="x-build-sass">
<attribute name="theme"/>
<sequential>
<local name="sass.name"/>
<local name="use.shell"/>
<!--
convert abspath to just the leaf path name
-->
<basename property="sass.name" file="@{theme}"/>
<local name="sass.base.name"/>
<property name="sass.base.name" value="${sass.name}"/>
<echo>Compiling sass directory : @{theme}/sass</echo>
<x-compass-compile
rubyPath="${build.ruby.path}"
boring="${compass.compile.boring}"
force="${compass.compile.force}"
trace="${compass.compile.trace}"
dir="@{theme}/sass"/>
<x-compress-css srcfile="${app.dir}/resources/${sass.base.name}/*.css"
outdir="${app.dir}/resources/${sass.base.name}"/>
</sequential>
</macrodef>
<!--
This target builds Ext JS 4.1 style themes, iterating over each directory
under the specified ${app.theme.dir} directory and compiling the sass
located there
-->
<target name="-compass-compile-theme-folders">
<x-run-if-true value="${enable.ext41.themes}">
<!-- run sass compilation over the various themes -->
<for param="sass">
<dirset dir="${app.theme.dir}" includes="*"/>
<sequential>
<x-build-sass theme="@{sass}"/>
</sequential>
</for>
</x-run-if-true>
</target>
<!--
This target builds Touch style themes, by running compass
over the directory containing the manually maintined scss files
-->
<target name="-compass-compile-sass-dir">
<x-run-if-true value="${enable.touch.themes}">
<x-compass-compile
rubyPath="${build.ruby.path}"
trace="${compass.compile.trace}"
boring="${compass.compile.boring}"
force="${compass.compile.force}"
dir="${compass.sass.dir}"/>
</x-run-if-true>
</target>
<!--
This is a summation target triggering the three different supported
sass modes (ext 41, ext 42+, and touch).
-->
<target name="-compass-compile"
depends="-compass-compile-theme-package,
-compass-compile-theme-folders,
-compass-compile-sass-dir"/>
<!--
Build SASS
-->
<target name="-before-sass"/>
<target name="-sass" depends="-compass-compile"/>
<target name="-after-sass"/>
</project>

View File

@ -0,0 +1,16 @@
app.name=Ajax
app.framework=touch
app.classpath=${app.dir}/app.js,${app.dir}/app
# this property specifies a comma separated list of paths containing
# resources to copy to the build directory
app.resource.paths=
app.build.dir=${workspace.build.dir}/${app.name}
app.framework.version=2.3.0
app.cmd.version=4.0.2.64

View File

@ -0,0 +1,236 @@
<project name="slice-impl">
<!--
Uses the compiler to generate a special theme-only scss file containing
rules for all framework / package / app components. This is then used
by the slicer example page to capture theme sprites
-->
<target name="-compile-slicer-sass" depends="-init-compiler">
<x-normalize-path
path="${build.dir}/resources"
property="image.search.path"/>
<x-compile refid="${compiler.ref.id}">
<![CDATA[
restore
page
and
include
-all
and
sass
+class-name-vars
+etc
+vars
+rules
-variable=$image-search-path:'${image.search.path}'
-variable=$theme-name: '${app.theme}' !default
-output=${app.example.scss}
and
restore
page
and
sass
+ruby
-output=${app.example.out.ruby}
]]>
</x-compile>
<x-get-relative-path from="${app.example.dir}"
to="${app.example.css}"
property="app.example.css.path"/>
<!--update the app's example to point to the build output-->
<echo file="${app.example.css.file}">
<![CDATA[
/*
* This file is generated by Sencha Cmd and should NOT be edited. It redirects
* to the most recently built CSS file for the application to allow theme.html
* to load properly for image slicing (required to support non-CSS3 browsers
* such as IE9 and below).
*/
@import '${app.example.css.path}';
]]>
</echo>
</target>
<!--
Compiles the scss file for the theme slicer page
-->
<target name="-compass-compile-slicer-css" depends="-compile-slicer-sass">
<x-compass-compile
dir="${app.example.build.dir}"
trace="${compass.compile.trace}"
boring="${compass.compile.boring}"
force="${compass.compile.force}"
sassdir="${app.example.build.dir}"
cssdir="${app.example.build.dir}"
config="${app.example.compass.config}"/>
</target>
<!--
Generates theme images for Ext JS 4.2+ apps using theme packages
'-detect-app-build-properties' is defined in js-impl.xml
-->
<target name="-slice-app-theme" depends="-detect-app-build-properties">
<x-ant-call target="-compass-compile-slicer-css"/>
<x-run-bootstrap file="${bootstrap.example.js}"
basedir="${bootstrap.base.path}"/>
<echo>Capture theme image to ${build.capture.png}</echo>
<x-sencha-command>
<![CDATA[
theme
capture
-page=${app.example.theme.html}
-image=${build.capture.png}
-manifest=${build.capture.json}
]]>
</x-sencha-command>
<echo>Slicing theme images to ${build.resources.dir}</echo>
<x-sencha-command>
<![CDATA[
fs
slice
${build.slice.options}
-image=${build.capture.png}
-manifest=${build.capture.json}
-out=${build.resources.dir}
]]>
</x-sencha-command>
</target>
<macrodef name="x-build-theme">
<attribute name="theme" description="the path of the theme folder"/>
<attribute name="buildsass" default="false"/>
<attribute name="basetheme" default="default"/>
<sequential>
<local name="theme.name"/>
<local name="framework.theme.dir"/>
<local name="tmp.theme.dir"/>
<local name="tmp.img.dir"/>
<basename property="theme.name" file="@{theme}"/>
<local name="theme.base.name"/>
<property name="theme.base.name" value="${theme.name}"/>
<property name="theme.images.dir" location="@{theme}/images"/>
<property name="theme.page.dir" location="@{theme}/${theme.page.name}"/>
<property name="tmp.res.dir" value="${app.resources.dir}"/>
<property name="tmp.theme.dir" value="${tmp.res.dir}/${theme.base.name}"/>
<property name="tmp.img.dir" value="${tmp.theme.dir}/images"/>
<property name="app.res.dir" location="${app.dir}/packages"/>
<property name="app.img.dir" location="${app.res.dir}/images"/>
<property name="framework.res.dir" location="${framework.dir}/resources"/>
<property name="framework.img.dir" location="${framework.res.dir}/themes/images"/>
<property name="framework.theme.dir" location="${framework.img.dir}/@{basetheme}"/>
<echo>Copying base framework images from ${framework.theme.dir} to ${tmp.img.dir}</echo>
<copy todir="${tmp.img.dir}">
<fileset dir="${framework.theme.dir}" includes="**/*"/>
</copy>
<if>
<equals arg1="@{buildsass}" arg2="true"/>
<then>
<echo>Building sass for theme ${theme.name}</echo>
<!--x-build-sass is defined in sass-impl.xml-->
<x-build-sass theme="@{theme}"/>
</then>
</if>
<echo>Slicing images for theme ${theme.name} to ${tmp.img.dir}</echo>
<x-sencha-command>
<![CDATA[
theme
build
-data-file=${build.capture.json}
-image-file=${build.capture.png}
-page=${theme.page.dir}
-out=${tmp.img.dir}
]]>
</x-sencha-command>
<if>
<available file="${theme.images.dir}"/>
<then>
<echo>Copying user defined images from @{theme}/images to ${tmp.img.dir}</echo>
<copy todir="${tmp.img.dir}">
<fileset dir="${theme.images.dir}" includes="**/*"/>
</copy>
</then>
</if>
</sequential>
</macrodef>
<!--
This is a legacy macrodef for copying resources in theme-directory based themes.
It is provided to support building Ext JS 4.1 app themes
-->
<macrodef name="x-copy-resources">
<sequential>
<copy todir="${build.resources.dir}" includeEmptyDirs="false">
<fileset dir="${app.resources.dir}"
includes="**/*"/>
</copy>
<x-get-relative-path from="${app.dir}"
to="${framework.dir}"
property="framework.rel.path"/>
<copy toDir="${build.dir}/${framework.rel.path}">
<fileset dir="${framework.dir}"
includes="src/ux/**/css/**/*"/>
</copy>
</sequential>
</macrodef>
<!--
Generates theme images for Ext JS 4.1 apps that use directory based
themes. These have been deprecated in favor of ExtJS 4.2 theme packages
-->
<target name="-slice-theme-directories">
<echo>Processing theme directories from ${app.theme.dir}</echo>
<for param="theme">
<dirset dir="${app.theme.dir}" includes="*"/>
<sequential>
<x-build-theme theme="@{theme}"/>
</sequential>
</for>
<x-copy-resources/>
</target>
<target name="-slice-images">
<x-run-if-true value="${enable.ext42.themes}">
<x-ant-call target="-slice-app-theme"/>
</x-run-if-true>
<x-run-if-true value="${enable.ext41.themes}">
<x-ant-call target="-slice-theme-directories"/>
</x-run-if-true>
</target>
<target name="-before-slice"/>
<target name="-slice" depends="-slice-images"/>
<target name="-after-slice"/>
<!--
Refresh Individual Theme
-->
<target name="-before-refresh-theme"/>
<target name="-refresh-theme">
<if>
<x-is-true value="${enable.ext41.themes}"/>
<then>
<local name="theme.dir"/>
<property name="theme.dir" location="${app.theme.dir}/${args.themeName}"/>
<x-build-theme theme="${theme.dir}" buildsass="true"/>
<x-copy-resources/>
</then>
</if>
</target>
<target name="-after-refresh-theme"/>
</project>

View File

@ -0,0 +1,21 @@
# =============================================================================
# This file defines default property values that apply to the "testing" build
# environment.
#
# Please use testing.properties to customize these properties unless you want
# your customizations to be for all environments. In that case, you can instead
# override these properties in build.properties.
#
# The properties defined in this file take priority over defaults.properties
# but are lower priority than build.properties which in turn is lower priority
# than testing.properties.
#
# IMPORTANT - This file should not be modified by an app as it is overwritten
# during each app upgrade.
# =============================================================================
build.options.logger=yes
build.options.debug=true
app.microloader.name=testing.js

View File

@ -0,0 +1,8 @@
# =============================================================================
# This file provides an override point for default variables defined in
# testing.defaults.properties. These properties are only imported when building
# for the "testing" environment.
#
# Properties defined in this file take priority over build.properties but are
# only loaded for "testing" builds.
# =============================================================================

View File

@ -0,0 +1,35 @@
# =============================================================================
# This file defines default property values that apply to all builds based on
# Sencha Touch 2.3.x frameworks.
#
# Please use build.properties to customize these properties.
#
# To override a property based on build.environment instead add properties to
# one of these higher priority files:
#
# - production.properties
# - testing.properties
# - native.properties
# - package.properties
#
# The properties defined in this file take priority over defaults.properties
# and *.defaults.properties.
#
# IMPORTANT - This file should not be modified by an app as it is overwritten
# during each app upgrade.
# =============================================================================
enable.touch.themes=true
build.output.markuponly=false
build.watcher.targets=-watch-sass-dir,-watch-compiler
build.trigger.targets=-refresh
# override the default sass directory
compass.sass.dir=${app.sass.dir}
build.options.product=touch
build.options.minVersion=2.3

View File

@ -0,0 +1,53 @@
<project name="watch-impl">
<target name="-watch-impl">
<x-ant-call target="${build.trigger.targets}"/>
</target>
<target name="-watch-compiler">
<x-watch compilerRef="${compiler.ref.id}" targets="-watch-impl"/>
</target>
<target name="-watch-theme-package-css">
<x-compass-watch
rubyPath="${build.ruby.path}"
dir="${compass.working.dir}"
trace="${compass.compile.trace}"
boring="${compass.compile.boring}"
force="${compass.compile.force}"
sassdir="${compass.sass.dir}"
cssdir="${compass.css.dir}"
config="${compass.config.file}"
fork="true"/>
</target>
<macrodef name="x-run-compass-watch">
<attribute name="directory"/>
<sequential>
<x-compass-watch
rubyPath="${build.ruby.path}"
dir="@{directory}"
trace="${compass.compile.trace}"
boring="${compass.compile.boring}"
force="${compass.compile.force}"
fork="true"/>
</sequential>
</macrodef>
<target name="-watch-sass-dir">
<x-run-compass-watch directory="${app.sass.dir}"/>
</target>
<target name="-watch-theme-dir">
<local name="watch.sass.dir"/>
<property name="watch.sass.dir"
value="${app.theme.dir}/${watch.theme.name}/sass"/>
<x-run-compass-watch directory="${watch.sass.dir}"/>
</target>
<target name="-before-watch" depends="init"/>
<target name="-watch" depends="app-build-impl.build">
<x-ant-call target="${build.watcher.targets}"/>
</target>
<target name="-after-watch" depends="init"/>
</project>

View File

@ -0,0 +1 @@
../..

277
src/examples/ajax/app.js Normal file
View File

@ -0,0 +1,277 @@
//<debug>
Ext.Loader.setPath({
'Ext': '../../src'
});
//</debug>
/**
* This application demonstrates the simple AJAX abilities of Sencha Touch.
*
* We setup a simple container which has a 2 buttons which will trigger a function to either make
* a AJAX request using Ext.Ajax.request or a JSONP request using Ext.data.JsonP.
*/
//the first thing we do is define out application
Ext.application({
startupImage: {
'320x460': 'resources/startup/Default.jpg', // Non-retina iPhone, iPod touch, and all Android devices
'640x920': 'resources/startup/640x920.png', // Retina iPhone and iPod touch
'640x1096': 'resources/startup/640x1096.png', // iPhone 5 and iPod touch (fifth generation)
'768x1004': 'resources/startup/768x1004.png', // Non-retina iPad (first and second generation) in portrait orientation
'748x1024': 'resources/startup/748x1024.png', // Non-retina iPad (first and second generation) in landscape orientation
'1536x2008': 'resources/startup/1536x2008.png', // : Retina iPad (third generation) in portrait orientation
'1496x2048': 'resources/startup/1496x2048.png' // : Retina iPad (third generation) in landscape orientation
},
isIconPrecomposed: false,
icon: {
57: 'resources/icons/icon.png',
72: 'resources/icons/icon@72.png',
114: 'resources/icons/icon@2x.png',
144: 'resources/icons/icon@144.png'
},
//requires defines the Components/Classes that our application requires.
requires: [
'Ext.Container',
'Ext.Button',
'Ext.Toolbar',
'Ext.TitleBar',
'Ext.data.JsonP',
'Ext.Ajax',
'Ext.MessageBox',
'Ext.XTemplate'
],
/**
* The launch method is called when the browser is ready, and the application can launch.
*
* Within this function we create two a new container which will show the content which
* is returned when we make an AJAX request. We also have a toolbar docked to the top which
* has buttons to trigger the AJAX requests. And finally we have a toolbar docked to the bottom
* which shows the status of the current request.
*/
launch: function() {
Ext.Viewport.add({
//define each of the items inside this container
layout: 'fit',
items: [
{
//we give it an id so we can refrence it below
id: 'contentView',
//the content can be scrolled, so set the scrollable config to true
scrollable: true,
//we give it a cls so we can custom style it using CSS
cls: 'x-content',
//we set the default html to something we the user knows what is happening
html: 'This example can use either JSONP or AJAX to retrieve data.'
},
//this is the top toolbar which will show the two buttons to make a request
{
//we give it an xtype of titlebar. titlebar allows you to use 'align' in
//it's children so we can align them to the left/right. see directly below
xtype: 'titlebar',
//we want the bar to be docked at the top
docked: 'top',
//and now we define the items we want inside the toolbar
items: [
{
//the text displayed on the button
text: 'JSONP',
//next we give this button it's handler, which is a link to the function
//we want to call when this button is tapped. we also give it a scope so
//it knows to call this function within the scope of our application
handler: this.makeJSONPRequest,
scope: this,
//align the button to the left
align: 'left'
},
{
//the text of the button
text: 'XMLHTTP',
//once again we give it a link to the function we want to call when we tap
//the button. this time it calls the Ajax method
handler: this.makeAjaxRequest,
scope: this,
//and then align to the right
align: 'right'
}
]
},
//now we define the bottom toolbar.
{
//this time we just use toolbar, as we dont need to align buttons within it
xtype: 'toolbar',
//give it an id so we can reference it later
id: 'statusView',
//do it to the bottom
docked: 'bottom',
//give it it's default title
title: 'Tap a button above.',
//and we give it a ui of 'light' (the default is dark) so it looks a little difference
ui: 'light'
}
]
});
//we set application variables so we don't have to keep finding a reference to both the contentView
//and statusView each time we need to update them (below).
//we use Ext.getCmp which allows us to find a component from an id (which we specified above)
this.contentView = Ext.getCmp('contentView');
this.statusView = Ext.getCmp('statusView');
},
/**
* This makes an AJAX request using Ext.Ajax.request. When it completes, it updates the contentView's
* html configuration with the responseText (data from the loaded file).
*/
makeAjaxRequest: function() {
//firstly we set local variables of the contentView and statusView. we generallt do this
//only if we are going to use it more than once in our function
var contentView = this.contentView,
statusView = this.statusView;
//next we call the setter of the masked configuration in our contentview. we give it an option
//which tells it to use a Ext.LoadMask which display a loading indicator, and will also display
//the provided message
contentView.setMasked({
xtype: 'loadmask',
message: 'Loading...'
});
//now we create the Ajax request
Ext.Ajax.request({
//first we give it the URL of the request. take not that this can only be local to the web server
//you are on
url: 'test.json',
//then we define a success method, which is called once the ajax request is successful
success: function(response) {
//the first argument returned is the reponse object, and that object has a property called
//responseText which is the text of the file we just loaded. so we call setHtml which
//will update the contentView with the text of the response
contentView.setHtml(response.responseText);
//now we set the title of the statusView component to say we loaded the json file
statusView.setTitle('Static test.json file loaded');
//and finally we unmask the contentView so the content is viewable
contentView.unmask();
},
failure: function() {
contentView.unmask();
}
});
},
/**
* This method makes a JSONP request using Ext.data.JsonP. JSONP is used when you need to make cross-domain
* requests. otherwise you can use AJAX (above).
*
* When the request completes, it will display weather information for the specified location in the
* contentView.
*/
makeJSONPRequest: function() {
//once again we set local variables of the contentView and statusView because we need to reference them
//more than once. we also get the XTemplate instance which we will used to display weather information.
var tpl = this.getWeatherTemplate(),
contentView = this.contentView,
statusView = this.statusView;
//first we set the mask of the contentView to show a loading message
contentView.setMasked({
xtype: 'loadmask',
message: 'Loading...'
});
//next we use Ext.data.JsonP to make a request
Ext.data.JsonP.request({
//we give it the url to the free worldweatheronline.com api
url: 'http://api.worldweatheronline.com/free/v1/weather.ashx',
//the callbackKey is used for JSONP requests
callbackKey: 'callback',
//now we define the params to be sent to the server
params: {
//first it is the API key so we can use the site
key: 'qfj4gk3t4u5u3bqc8atf69fn',
//nexgt is the `q` param which is a valid US zipcode (palo alto in this case)
q: '94301',
//next we define the format, json
format: 'json',
//and finally the number of days we want
num_of_days: 5
},
//now we define a callback method which is called when the JSONP response is successful.
success: function(result) {
//the result is a json object which is returned by the API we just requested.
//in this case all we want is the data.weather property, which is an array
var weather = result.data.weather;
//now we check if the weather is actually defined
if (weather) {
//if it is defined, we use the setHtml method on contentView to update the html
//using the tpl.apply method.
//Ext.XTemplate.apply will bind the data you pass into the xtemplate provided
//and return a string
contentView.setHtml(tpl.apply(weather));
//now we set the title of the status bar
statusView.setTitle('Weather: Palo Alto, CA');
} else {
//if it wasn't defined, we throw an error using Ext.Msg.alert()
Ext.Msg.alert('Error', 'There was an error retrieving the weather.');
}
//and finally unmask the content view
contentView.unmask();
},
failure: function() {
Ext.Msg.alert('Error', 'There was an error retrieving the weather.');
contentView.unmask();
}
});
},
/**
* Returns a Ext.XTemplate instance which will be used to display each weather result when makeJSONPRequest
* is called.
* @return {Ext.XTemplate} The returned template
*/
getWeatherTemplate: function() {
return new Ext.XTemplate([
'<tpl for=".">',
'<div class="day">',
'<div class="date">{date:date("M d, Y")}</div>',
'<div class="icon">',
'<tpl for="weatherIconUrl">',
'<img src="{value}" />',
'</tpl>',
'</div>',
'<div class="temp">{tempMaxF}&deg;<span class="temp_low">{tempMinF}&deg;</span></div>',
'</div>',
'</tpl>'
].join(''));
}
});

160
src/examples/ajax/app.json Normal file
View File

@ -0,0 +1,160 @@
{
/**
* The application's namespace, used by Sencha Command to generate classes
*/
"name": "Ajax",
/**
* The file path to this application's front HTML document, relative to this app.json file
*/
"indexHtmlPath": "index.html",
/**
* The absolute URL to this application in development environment, i.e: the URL to run this application
* on your web browser during development, e.g: "http://localhost/myapp/index.html".
*
* This value is needed when build to resolve your application's dependencies if it requires server-side resources
* that are not accessible via file system protocol.
*/
"url": null,
/**
* List of all JavaScript assets in the right execution order.
* Each item is an object with the following format:
* {
* "path": "path/to/script.js" // Path to file, if local file it must be relative to this app.json file
* "remote": true // (Optional)
* // - Defaults to undefined (falsey) to signal a local file which will be copied
* // - Specify true if this file is a remote file which will not to be copied
* "update": "delta" // (Optional)
* // - If not specified, this file will only be loaded once, and
* // cached inside localStorage until this value is changed.
* // - "delta" to enable over-the-air delta update for this file
* // - "full" means full update will be made when this file changes
* "x-bootstrap": true // (Optional)
* // Indicates a development mode only dependency.
* // These files will not be copied into the build directory or referenced
* // in the generate app.json manifest for the micro loader.
*
* }
*/
"js": [
{
"path": "../../sencha-touch-all-debug.js",
"x-bootstrap": true
},
{
"path": "bootstrap.js",
"x-bootstrap": true
},
{
"path": "app.js",
"bundle": true, /* Indicates that all class dependencies are concatenated into this file when build */
"update": "delta"
}
],
/**
* List of all CSS assets in the right inclusion order.
* Each item is an object with the following format:
* {
* "path": "path/to/item.css" // Path to file, if local file it must be relative to this app.json file
* "remote": true // (Optional)
* // - Defaults to undefined (falsey) to signal a local file which will be copied
* // - Specify true if this file is a remote file which will not to be copied
* "update": "delta" // (Optional)
* // - If not specified, this file will only be loaded once, and
* // cached inside localStorage until this value is changed to either one below
* // - "delta" to enable over-the-air delta update for this file
* // - "full" means full update will be made when this file changes
*
* }
*/
"css": [
{
"path": "../../resources/css/sencha-touch.css",
"platform": ["chrome", "safari", "ios", "android", "blackberry", "firefox"],
"update": "delta"
},
{
"path": "../../resources/css/wp.css",
"platform": ["ie10"],
"theme": "Windows",
"update": "delta"
},
{
"path": "resources/css/ajax-sencha-touch.css",
"platform": ["chrome", "safari", "ios", "android", "blackberry", "firefox"],
"update": "delta"
},
{
"path": "resources/css/ajax-wp.css",
"platform": ["ie10"],
"theme": "Windows",
"update": "delta"
}
],
/**
* Used to automatically generate cache.manifest (HTML 5 application cache manifest) file when you build
*/
"appCache": {
/**
* List of items in the CACHE MANIFEST section
*/
"cache": [
"index.html"
],
/**
* List of items in the NETWORK section
*/
"network": [
"*"
],
/**
* List of items in the FALLBACK section
*/
"fallback": []
},
/**
* Extra resources to be copied along when build
*/
"extras": [
"resources/icons",
"resources/loading",
"test.json"
],
/**
* File / directory name matchers to ignore when copying to the builds, must be valid regular expressions
*/
"ignore": [
"\.svn$"
],
/**
* Directory path to store all previous production builds. Note that the content generated inside this directory
* must be kept intact for proper generation of deltas between updates
*/
"archivePath": "archive",
/**
* List of package names to require for the cmd build process
*/
"requires": [
],
"buildOptions": {
"product": "touch",
"minVersion": 3,
"debug": false,
"logger": "no"
},
/**
* Uniquely generated id for this application, used as prefix for localStorage keys.
* Normally you should never change this value.
*/
"id": "3a867610-670a-11e1-a90e-4318029d18bb"
}

View File

1688
src/examples/ajax/bootstrap.js vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
/**
* This file is generated by Sencha Cmd and should NOT be edited. It is a
* combination of content from app.json, and all required package's package.json
* files. Customizations should be placed in app.json.
*/
{"id":"3a867610-670a-11e1-a90e-4318029d18bb","js":[{"path":"../../sencha-touch-all-debug.js"},{"path":"bootstrap.js"},{"path":"app.js","update":"delta"}],"css":[{"path":"../../resources/css/sencha-touch.css","update":"delta","platform":["chrome","safari","ios","android","blackberry","firefox"]},{"path":"../../resources/css/wp.css","update":"delta","theme":"Windows","platform":["ie10"]},{"path":"resources/css/ajax-sencha-touch.css","update":"delta","platform":["chrome","safari","ios","android","blackberry","firefox"]},{"path":"resources/css/ajax-wp.css","update":"delta","theme":"Windows","platform":["ie10"]}]}

View File

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<project name="ajax" default=".help">
<import file="${basedir}/.sencha/app/build-impl.xml"/>
<!--
The following targets can be provided to inject logic before and/or after key steps
of the build process:
The "init-local" target is used to initialize properties that may be personalized
for the local machine.
<target name="-before-init-local"/>
<target name="-after-init-local"/>
The "clean" target is used to clean build output from the build.dir.
<target name="-before-clean"/>
<target name="-after-clean"/>
The general "init" target is used to initialize all other properties, including
those provided by Sencha Cmd.
<target name="-before-init"/>
<target name="-after-init"/>
The "build" target performs the call to Sencha Cmd to build the application.
<target name="-before-build"/>
<target name="-after-build"/>
-->
</project>

View File

@ -0,0 +1,10 @@
<!DOCTYPE HTML>
<html manifest="" lang="en-US">
<head>
<meta charset="UTF-8">
<title>Ajax</title>
<script id="microloader" type="text/javascript" src=".sencha/app/microloader/development.js"></script>
</head>
<body>
</body>
</html>

View File

@ -0,0 +1,174 @@
{
/**
* @cfg applicationName
* @required
* This is the name of your application, which is displayed on the device when the app is installed. On IOS, this should match
* the name of your application in the Apple Provisioning Portal.
*/
"applicationName":"Ajax",
/**
* @cfg applicationId
* This is the name namespace for your application. On IOS, this should match the name of your application in the Apple Provisioning Portal.
*/
"applicationId":"Ajax",
/**
* @cfg bundleSeedId
* A ten character string which stands before aplication ID in Apple Provisioning Portal
*/
"bundleSeedId":"KPXFEPZ6EF",
/**
* @cfg versionString
* @required
* This is the version of your application.
*/
"versionString":"1.0",
/**
* @cfg versionCode
* @required
* This is the integer version code of your application, or you can refer to it as a build number. Used only for Android builds.
*/
"versionCode":"1",
/**
* @cfg icon
* For iOS, please refer to their documentation about icon sizes:
* https://developer.apple.com/library/ios/#documentation/userexperience/conceptual/mobilehig/IconsImages/IconsImages.html
*
* For Android, please refer to the Google Launcher icons guide:
* http://developer.android.com/guide/practices/ui_guidelines/icon_design_launcher.html
* iOS uses 57, 72, 114 and 144; Android uses 36, 48 and 72; if you package for Android you can ignore iOS icons and vice verca
*/
"icon": {
"36":"resources/icons/Icon_Android36.png",
"48":"resources/icons/Icon_Android48.png",
"57":"resources/icons/Icon.png",
"72":"resources/icons/Icon~ipad.png",
"114":"resources/icons/Icon@2x.png",
"144":"resources/icons/Icon~ipad@2x.png"
},
/**
* @cfg inputPath
* @required
* This is location of your Sencha Touch 2 application, relative to this configuration file.
*/
"inputPath":"./",
/**
* @cfg outputPath
* @required
* This is where the built application file with be saved. Make sure that output path is not in your input path, you may get into endless recursive copying
*/
"outputPath":"../build/",
/**
* @cfg configuration
* @required
* This is configuration for your application. `Debug` should always be used unless you are submitting your app to an online
* store - in which case `Release` should be specified.
*/
"configuration":"Debug",
/**
* @cfg platform
* @required
* This is the platform where you will be running your application. Available options are:
* - iOSSimulator
* - iOS
* - Android
* - AndroidEmulator
*/
"platform":"iOSSimulator",
/**
* @cfg deviceType
* @required
* This is device type that your application will be running on.
*
* If you are developing for Android, this is not necessary.
*
* Available options are:
* - iPhone
* - iPad
* - Universal
*/
"deviceType":"Universal",
/**
* @cfg certificatePath
* This is the location of your certificate.
* This is required when you are developing for Android or you are developing on Windows.
*/
"certificatePath":"/path/to/certificate.file",
/**
* @cfg certificateAlias
* This is the name of your certificate.
*
* IF you do not specify this on OSX, we will try and automatically find the certificate for you using the applicationId.
*
* This can be just a simple matcher. For example, if your certificate name is "iPhone Developer: Robert Dougan (ABCDEFGHIJ)", you
* can just put "iPhone Developer".
*
* When using a certificatePath on Windows, you do not need to specify this.
*/
"certificateAlias":"",
/**
* @cfg certificatePassword
* The password which was specified during certificate export
*/
"certificatePassword":"",
/**
* @cfg provisionProfile
* The path to the provision profile (APP_NAME.mobileprovision) which you can create and then download from Apple's provisioning portal
*/
"provisionProfile":"",
/**
* @cfg notificationConfiguration
* Notification configuration for push notifications, can be "debug", "release" or empty if you don't use push notifications in your project.
*/
"notificationConfiguration":"",
/**
* @cfg sdkPath
* This is the path to the Android SDK, if you are developing an Android application.
*/
"sdkPath":"/path/to/android-sdk",
/**
* @cfg androidAPILevel
* This is android API level, the version of Android SDK to use, you can read more about it here: http://developer.android.com/guide/appendix/api-levels.html.
* Be sure to install corresponding platform API in android SDK manager (android_sdk/tools/android)
*/
"androidAPILevel":"8",
/**
* @cfg {Array[String]} permissions
* Array of permissions that is used by an application (Android only)
* Full list of permissions for Android application can be found here: http://developer.android.com/reference/android/Manifest.permission.html#ACCESS_CHECKIN_PROPERTIES
*/
"permissions":[
"INTERNET",
"ACCESS_NETWORK_STATE",
"CAMERA",
"VIBRATE",
"ACCESS_FINE_LOCATION",
"ACCESS_COARSE_LOCATION",
"CALL_PHONE"
],
/**
* @cfg {Array[String]} orientations
* @required
* This is orientations that this application can run.
*/
"orientations": [
"portrait",
"landscapeLeft",
"landscapeRight",
"portraitUpsideDown"
]
}

View File

@ -0,0 +1 @@
.x-content .x-body .x-innerhtml{padding:1em;text-align:center}.x-phone .day{font-size:87%}.day{display:inline-block;width:8em;padding:1em;margin:.5em}.date{font-size:.8em}.icon img{margin:.6em;width:3.5em}.temp{margin-top:.2em;display:block;font-size:2.2em;line-height:.5em}.temp_low{display:inline;font-size:.5em}.x-content{background:#ddd}.day{text-align:center;background-color:#f9f9f9;color:rgba(0,0,0,0.6);text-shadow:#fff 0 1px 0;-webkit-border-radius:15px;-moz-border-radius:15px;-ms-border-radius:15px;-o-border-radius:15px;border-radius:15px;-webkit-box-shadow:inset 0 1px 1px #888;-moz-box-shadow:inset 0 1px 1px #888;box-shadow:inset 0 1px 1px #888}.icon img{-webkit-border-radius:10px;-moz-border-radius:10px;-ms-border-radius:10px;-o-border-radius:10px;border-radius:10px}.temp_low{color:rgba(30,30,30,0.5)}

View File

@ -0,0 +1 @@
.x-content .x-body .x-innerhtml{padding:1em;text-align:center}.x-phone .day{font-size:87%}.day{display:inline-block;width:8em;padding:1em;margin:.5em}.date{font-size:.8em}.icon img{margin:.6em;width:3.5em}.temp{margin-top:.2em;display:block;font-size:2.2em;line-height:.5em}.temp_low{display:inline;font-size:.5em}.day{background-color:#00ABDC}.icon img{-webkit-border-radius:100px;-moz-border-radius:100px;-ms-border-radius:100px;-o-border-radius:100px;border-radius:100px}.temp_low{color:rgba(255,255,255,0.5)}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

View File

@ -0,0 +1,33 @@
.x-content .x-body .x-innerhtml {
padding: 1em;
text-align: center;
}
.x-phone .day {
font-size: 87%;
}
/*weather information*/
.day {
display: inline-block;
width: 8em;
padding: 1em;
margin: .5em;
}
.date {
font-size: .8em;
}
.icon img {
margin: .6em;
width: 3.5em;
}
.temp {
margin-top: .2em;
display: block;
font-size: 2.2em;
line-height: .5em;
}
.temp_low {
display: inline;
font-size: .5em;
}

View File

@ -0,0 +1,27 @@
@import "base";
@import "compass";
/**
* Custom CSS for the AJAX example
*/
.x-content {
background: #ddd;
}
/*weather information*/
.day {
text-align: center;
background-color: #f9f9f9;
color: rgba(0, 0, 0, .6);
text-shadow: #fff 0 1px 0;
@include border-radius(15px);
@include box-shadow(inset 0 1px 1px #888);
}
.icon img {
@include border-radius(10px);
}
.temp_low {
color: rgba(30, 30, 30, .5);
}

View File

@ -0,0 +1,15 @@
@import "base";
@import "compass";
.day {
background-color: #00ABDC;
}
.icon img {
@include border-radius(100px);
}
.temp_low {
color: rgba(255, 255, 255, .5);
}

View File

@ -0,0 +1,14 @@
# Get the directory that this configuration file exists in
dir = File.dirname(__FILE__)
# Load the sencha-touch framework automatically.
load File.join(dir, '..', '..', '../..', 'resources', 'themes')
# Compass configurations
sass_path = dir
css_path = File.join(dir, "..", "css")
# Require any additional compass plugins here.
images_dir = File.join(dir, "..", "images")
output_style = :compressed
environment = :production

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

View File

@ -0,0 +1,10 @@
{
"productName": "Sencha Touch",
"version": "2.0 Beta",
"sampleData": [
{
"foo": "bar",
"desc": "This sample content is loaded from the server."
}
]
}

View File

@ -0,0 +1,609 @@
importPackage(com.sencha.tools.compressors.yui);
importPackage(com.sencha.tools.compressors.closure);
importPackage(com.sencha.tools.external);
importPackage(com.sencha.tools.compiler.jsb.statements);
var _logger = SenchaLogManager.getLogger("app-build");
function runAppBuild(proj) {
var basedir = proj.getProperty("framework.config.dir"),
appPath = proj.getProperty("args.path"),
envArg = proj.getProperty("args.environment"),
ignores = proj.getProperty("framework.ignores"),
options = proj.getProperty("build.options"),
cssCompression = proj.getProperty("build.compress.css"),
config = readConfig(resolvePath(appPath, "app.json")),
environment = (envArg == "native") ? 'package' : envArg,
destination =
(proj.getProperty("args.destination") + '') ||
(proj.getProperty("build.dir") + '') ||
(proj.getProperty("app.build.dir") + ''),
operations = toJS(proj.getProperty("build.operations")),
v2deps = !!(proj.getProperty("v2deps") == "true"),
src = appPath,
sdk = proj.getProperty("framework.dir"),
archive =
(proj.getProperty("args.archive") + '') ||
(config.archivePath) ||
"archive",
nativePackaging = !!(envArg == 'native'),
indexHtmlPath = config.indexHtmlPath || 'index.html',
appUrl = config.url || resolvePath(src, indexHtmlPath),
jsAssets = config.js || [],
cssAssets = config.css || [],
appCache = config.appCache,
ignore = config.ignore,
remoteAssets = [],
extras = config.extras || config.resources,
appJs, sdkJs, sdkIsAll, assets, processIndex;
destination = joinPath(destination, environment);
if(!PathUtil.isAbsolute(archive)) {
archive = resolvePath(appPath, archive);
}
if (operations) {
operations = operations.split('\n');
} else {
operations = [];
}
if (appUrl.indexOf("file:") != 0 && appUrl.indexOf("http:") != 0) {
appUrl = 'file:///' + StringUtil.replace(resolvePath(appUrl), '\\', '/');
}
// check for build dir being immediate child of application dir
// native packager can get in to infinite looping when scanning files
// under this scenario
var canonicalAppPath = new File(appPath).getCanonicalPath(),
canonicalDestPath = new File(destination).getCanonicalPath(),
parent = new File(canonicalDestPath).getParentFile();
if(parent && parent.getCanonicalPath() == canonicalAppPath) {
_logger.error("Application : {}", canonicalAppPath);
_logger.error("Destination : {}", canonicalDestPath);
_logger.error("Destination path cannot reside one level under the Application directory")
throw "Destination path cannot reside one level under the Application directory";
}
_logger.info("Deploying your application to " + destination);
PathUtil.ensurePathExists(resolvePath(destination));
jsAssets = each(
map(jsAssets, function (asset) {
if (typeof asset == 'string') {
asset = { path:asset };
}
asset.type = 'js';
return asset;
}),
function (jsAsset) {
if (jsAsset.bundle) {
appJs = jsAsset.path;
}
});
if (!appJs) {
appJs = 'app.js';
}
appJs = resolvePath(destination, appJs);
cssAssets = map(cssAssets, function (asset) {
if (typeof asset == 'string') {
asset = { path:asset };
}
asset.type = 'css';
return asset;
});
assets = filter(concat(jsAssets, cssAssets), function (asset) {
return !asset.shared || (environment != 'production');
});
_logger.debug("copying all assets");
each(assets, function (asset) {
if (asset.remote) {
asset.bundle = false;
asset.update = false;
remoteAssets.push(asset);
} else {
file = asset.path;
// if not in testing mode, and using the new compiler, and this is
// one of the sencha-touch files, don't copy to output directory
if( asset.type === 'js' &&
!v2deps &&
file.indexOf("sencha-touch") != -1) {
asset['x-bootstrap'] = true;
// only skip the sdk code in the bundle if the bundle flag
// on the sdk asset is explicitly set to false
if(('bundle' in asset) && asset.bundle === false) {
sdkJs = asset.path;
sdkIsAll = sdkJs.indexOf("-all.js") >= 0;
asset.isSdk = true;
}
}
if (asset['x-bootstrap'] && !asset.isSdk) {
return;
}
_logger.debug("copying file {}", resolvePath(src, file));
var srcPath = resolvePath(src, file),
dstPath = resolvePath(destination, stripSpecialDirNames(file));
if(srcPath != dstPath) {
PathUtil.ensurePathExists(dstPath);
copy(srcPath, dstPath);
_logger.info("Copied {} to {}", srcPath, dstPath);
}
}
});
var ignoreFilter = Filter.getFileNameFilter(
new RegexFilter(ignore).setInclusive(false));
_logger.debug("copying all extras");
each(extras, function (extra) {
var from = resolvePath(src, extra),
to = resolvePath(destination, extra);
_logger.debug("Copying from {} to {}", from, to);
if (new File(from).exists()) {
PathUtil.ensurePathExists(to);
copy(from, to, ignoreFilter);
_logger.info("Copied {}", from);
} else {
_logger.warn("File or folder {} not found", from);
}
});
// build the app
processIndex = function () {
_logger.debug("processing page : index.html");
jsAssets = filter(jsAssets, function(asset){
return !(asset['x-bootstrap'] && !asset.isSdk);
});
var appJson = jsonEncode({
id:config.id,
js:jsAssets,
css:cssAssets
}),
indexHtml, content, compressor, remotes, microloader;
writeFileContent(new File(destination, 'app.json'), appJson);
_logger.info("Generated app.json");
indexHtml = readFileContent(new File(src, indexHtmlPath));
if (environment == 'production' && appCache) {
indexHtml = StringUtil.replace(
indexHtml,
'<html manifest=""',
'<html manifest="cache.appcache"');
}
compressor = new ClosureCompressor();
microloader = (environment == 'production'
? 'production'
: 'testing') +
'.js';
_logger.debug("using microloader : {}", microloader);
content = readFileContent(joinPath(sdk, "microloader", microloader));
content = compressor.compress(content);
remotes = [
'<script type="text/javascript">' +
content + ';Ext.blink(' +
(environment == 'production' ? jsonEncode({
id:config.id
}) : appJson) + ')' +
'</script>'
];
each(remoteAssets, function (asset) {
var uri = asset.path;
if (asset.type === 'js') {
remotes.push(
'<script type="text/javascript" src="' +
uri +
'"></script>');
} else if (asset.type === 'css') {
remotes.push(
'<link rel="stylesheet" type="text/css" href="' +
uri +
'" />');
}
});
indexHtml = ('' + indexHtml).replace(
/<script id="microloader"([^<]+)<\/script>/,
remotes.join(''));
_logger.debug("generating new built index.html");
writeFileContent(resolvePath(destination, indexHtmlPath), indexHtml);
_logger.info("Embedded microloader into " + indexHtmlPath);
};
_logger.info("Resolving your application dependencies (" + appUrl + ")");
var preprocessor = new Parser(),
jsCompressor = new YuiJavascriptCompressor(),
cssCompressor = new YuiCssCompressor(),
phantomRunner = new PhantomJsRunner(),
processedAssetCount = 0,
assetsCount, dependencies, files, file,
destinationFile, compressor,
cleanFile, cleanDestinationFile;
if(v2deps) {
// if v2deps, use the sencha command 2 sytle dependency resolution mechanism
// by running the phantomjs dependencies.js script
var phantomOut = phantomRunner.run([
resolvePath(basedir, "dependencies.js"),
appUrl
]),
exitCode = phantomOut.getExitCode(),
stdout = phantomOut.getOutput(),
buffer = new StringBuilder();
if (exitCode > 0) {
_logger.error("dependencies.js exited with non-zero code : " + exitCode);
_logger.error(stdout);
throw new ExBuild("failed gathering dependencies").raise();
}
dependencies = jsonDecode(stdout);
_logger.info("Found " + dependencies.length + " dependencies. Concatenating all into '" + appJs + "'");
files = map(dependencies, function (dependency) {
return resolvePath(src, dependency.path);
});
files.push(appJs);
each(files, function (file) {
buffer.append(FileUtil.readUnicodeFile(resolvePath(file))).append('\n');
});
writeFileContent(appJs, buffer.toString());
// clear the buffer to free memory
buffer.setLength(0);
} else {
var sdkTag = sdkIsAll ? 'framework' : 'core',
sdkFile = sdkJs,
sdkJsArgs = [
'--options=' + options,
'union',
'-tag',
sdkTag,
'and',
'concat',
'-out=' + resolvePath(destination, sdkFile)
],
appJsArgs = [
'-options=' + options,
'restore',
'app-all',
'and',
'exclude',
'-tag',
sdkTag,
'and',
'concatenate',
'-out=' + appJs,
''],
compilerId = proj.getProperty("compiler.ref.id"),
compiler = proj.getReference(compilerId);
if(sdkJs) {
_logger.info("Compiling " + sdkFile + " and dependencies");
_logger.debug("running compiler with options : '{}'", sdkJsArgs.join(' '));
compiler.dispatchArgs(sdkJsArgs);
_logger.info("Compiling app.js and dependencies");
_logger.debug("running compiler with options : '{}'", appJsArgs.join(' '));
compiler.dispatchArgs(appJsArgs);
_logger.info("Completed compilation.");
} else {
appJsArgs = [
'-options=' + options,
'restore',
'app-all',
'and',
'concatenate',
'-out=' + appJs,
''];
_logger.debug("running compiler with options : '{}'", appJsArgs.join(' '));
compiler.dispatchArgs(appJsArgs);
_logger.info("Completed compilation.");
}
}
for (var name in config.buildOptions) {
if (config.buildOptions.hasOwnProperty(name)) {
preprocessor.setParam(name, config.buildOptions[name]);
}
}
assetsCount = assets.length;
each(assets, function (asset) {
if(!asset.remote) {
file = asset.path;
destinationFile = resolvePath(destination, file),
cleanFile = stripSpecialDirNames(file),
cleanDestinationFile = resolvePath(destination, cleanFile);
// adjust the asset path to use the cleaned filename
asset.path = cleanFile;
}
_logger.debug("Assets => Processed : {} Total : {}",
processedAssetCount, assetsCount);
if (asset.type == 'js') {
if (!asset.remote && !(asset['x-bootstrap'] && !asset.isSdk)) {
_logger.debug("running preprocessor for file {}", cleanDestinationFile);
writeFileContent(
cleanDestinationFile,
preprocessor.parse(readFileContent(cleanDestinationFile)));
_logger.info('Processed local file ' + asset.path);
} else {
_logger.info('Processed remote file ' + asset.path);
}
}
if (environment == 'testing') {
return;
}
if (asset.remote || (asset['x-bootstrap'] && !asset.isSdk)) {
++processedAssetCount;
} else {
_logger.debug("Minifying " + file);
if(asset.type == 'js') {
writeFileContent(
cleanDestinationFile,
jsCompressor.compress(readFileContent(cleanDestinationFile)));
_logger.info("Minified " + file);
} else if (cssCompression == "true") {
writeFileContent(
cleanDestinationFile,
cssCompressor.compress(readFileContent(cleanDestinationFile)));
_logger.info("Minified " + file);
}
if (environment == 'production') {
var content = readFileContent(cleanDestinationFile),
version = '' + FileUtil.createChecksum(content);
asset.version = version;
_logger.debug("prepending checksum on {}", cleanDestinationFile);
writeFileContent(
cleanDestinationFile,
"/*" + version + "*/" + content);
content = "";
_logger.debug("copying destination to archive");
PathUtil.ensurePathExists(resolvePath(archive, cleanFile, version));
copy(cleanDestinationFile, resolvePath(archive, cleanFile, version));
if (asset.update == 'delta') {
// generate all the deltas to the other archived versions
_logger.debug("generating file deltas");
var archivedVersions = new File(joinPath(archive, cleanFile))
.listFiles();
each(archivedVersions, function (archivedVersion) {
if(archivedVersion.isDirectory()) {
return;
}
archivedVersion = archivedVersion.name;
if (archivedVersion == version) {
return;
}
var deltaFile = joinPath(
destination,
'deltas',
cleanFile,
archivedVersion + '.json');
writeFileContent(deltaFile, '');
_logger.debug("Generating delta from {} to {}",
archivedVersion,
version);
var runner = new VcDiffRunner(),
args = [
'encode',
'-json',
'-dictionary',
joinPath(archive, cleanFile, archivedVersion),
'-target',
cleanDestinationFile,
'-delta',
resolvePath(deltaFile),
'--stats'
],
runnerOut = runner.run(args),
exitCode = runnerOut.getExitCode(),
stdout = runnerOut.getOutput();
if (exitCode > 0) {
_logger.error("failed generating diff from {} to {}",
archivedVersion,
version);
_logger.error(stdout);
throw new ExBuild("failed generating diff from {0} to {1}",
archivedVersion,
version).raise();
}
// fixup malformed vcdiff content
var deltaFilePath = resolvePath(deltaFile),
content = FileUtil.readFile(deltaFilePath);
if(content.endsWith(",]")) {
_logger.debug("Correcting trailing comma issue in vcdiff output");
FileUtil.writeFile(deltaFilePath, content.substring(0, content.length() - 2) + "]");
}
content = null;
_logger.info(
"Generated delta for: {} from hash: '{}' to hash: '{}'",
[cleanFile, archivedVersion, version]);
});
}
}
if (++processedAssetCount == assetsCount) {
_logger.debug("processed all assets, finalizing build...");
processIndex();
if (environment == 'production' && appCache) {
_logger.info("Generating appcache");
appCache.cache = map(appCache.cache, function (cache) {
var checksum = '';
if (!/^(\/|(.*):\/\/)/.test(cache)) {
_logger.info(
"Generating checksum for appCache item: {}",
cache);
checksum = FileUtil.createChecksum(
readFileData(joinPath(destination, cache)));
}
return {
uri:cache,
checksum:checksum
}
});
writeAppCache(appCache, joinPath(destination, 'cache.appcache'));
}
if (nativePackaging) {
_logger.info("Generating native package");
var packagerConfig = readConfig(
joinPath(src, 'packager.json'));
if (packagerConfig.platform.match(/iOS/)) {
copy(
resolvePath(joinPath(src, 'resources', 'icons')),
resolvePath(destination),
ignoreFilter);
copy(
resolvePath(joinPath(src, 'resources', 'loading')),
resolvePath(destination),
ignoreFilter);
}
// add '' here to coerce to javascript string instead of java string
// for json encoding later...
packagerConfig.inputPath = destination + '';
var origDestination = proj.getProperty("args.destination"),
nativePackagePath = proj.getProperty("native.build.dir") ||
joinPath(origDestination, "native");
packagerConfig.outputPath = resolvePath(nativePackagePath) + '';
PathUtil.ensurePathExists(packagerConfig.outputPath);
writeFileContent(
joinPath(src, 'packager.temp.json'),
jsonEncode(packagerConfig, true));
_logger.info(
"Packaging your application as a native app to {} ...",
packagerConfig.outputPath);
var stbuildRunner = new StBuildRunner(),
args = ['package', resolvePath(src, 'packager.temp.json')],
stbuildOut = stbuildRunner.run(args),
exitCode = stbuildOut.getExitCode(),
stdout = stbuildOut.getOutput();
if (exitCode > 0) {
_logger.error("failed running native packager");
_logger.error(stdout);
throw new ExBuild("failed running native packager")
.raise();
} else {
_logger.info("Successfully packaged native application");
_logger.info(
"Package may be run with 'sencha package run -p {}",
joinPath(src, 'packager.temp.json'))
}
} else {
_logger.debug("skipping native packaging");
}
}
}
});
if (environment == 'testing') {
processIndex();
}
_logger.info("Successfully deployed your application to " + destination);
};
function writeAppCache(appCache, outfile) {
_logger.debug("generating appcache manifest...");
// build the appCache file
var builder = new StringBuilder();
builder.append("CACHE MANIFEST\n");
each(appCache.cache, function (cache) {
builder.append("# " + cache.checksum + "\n");
builder.append(cache.uri + "\n");
});
builder.append("\n\nFALLBACK:\n");
each(appCache.fallback, function (fallback) {
builder.append(fallback + '\n');
});
builder.append("\n\nNETWORK:\n");
each(appCache.network, function (network) {
builder.append(network + '\n');
});
writeFileContent(
outfile,
builder.toString());
builder.setLength(0);
};
(function (proj) {
_logger.info("building application");
runAppBuild(proj);
})(project);

View File

@ -0,0 +1,503 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
********************************** DO NOT EDIT **********************************
This file will be replaced during upgrades so DO NOT EDIT this file. If you need to
adjust the process, reading and understanding this file is the first step.
In most cases, the adjustments can be achieved by setting properties or providing one
of the "hooks" in the form of a "-before-" or "-after-" target. Whenever possible, look
for one of these solutions.
Failing that, you can copy whole targets to your build.xml file and it will overrride
the target provided here. Doing that can create problems for upgrading to newer
versions of Cmd so it is not recommended but it will be easier to manage than editing
this file in most cases.
-->
<project name="app-build-impl">
<!--
===============================================================
helper targets for ant integrations with IDE's
(human readable target names)
===============================================================
-->
<target name="-before-build-testing"/>
<target name="-build-testing" depends="testing,build"/>
<target name="-after-build-testing"/>
<target name="build-testing"
depends="-before-build-testing,
-build-testing,
-after-build-testing"/>
<target name="Build - Testing"
description="Create a Testing build of this project"
depends="build-testing"/>
<target name="-before-build-production"/>
<target name="-build-production" depends="production,build"/>
<target name="-after-build-production"/>
<target name="build-production"
depends="-before-build-production,
-build-production,
-after-build-production"/>
<target name="Build - Production"
description="Create a Production build of this project"
depends="build-production"/>
<target name="-before-build-native"/>
<target name="-build-native" depends="native,build"/>
<target name="-after-build-native"/>
<target name="build-native"
depends="-before-build-native,
-build-native,
-after-build-native"/>
<target name="Build - Native"
description="Create a Native build of this project"
depends="build-native"/>
<target name="-before-start-local-webserver"/>
<target name="-start-local-webserver" depends="init">
<x-launch-terminal>
<![CDATA[
${cmd.dir}/sencha fs web -port=${build.web.port} start -map=${build.web.root}
]]>
</x-launch-terminal>
</target>
<target name="-after-start-local-webserver"/>
<target name="start-local-webserver"
depends="-before-start-local-webserver,
-start-local-webserver,
-after-start-local-webserver"/>
<target name="WebServer - Start Local"
description="Starts a local webserver for this project"
depends="start-local-webserver"/>
<target name="-before-compass-watch"/>
<target name="-compass-watch" depends="init">
<x-launch-terminal>
compass watch ${app.sass.dir}
</x-launch-terminal>
</target>
<target name="-after-compass-watch"/>
<target name="compass-watch"
depends="-before-compass-watch,
-compass-watch,
-after-compass-watch"/>
<target name="Compass - Watch"
description="Opens terminal and watches for SASS updates"
depends="compass-watch"/>
<!--
===============================================================
environment setters
===============================================================
-->
<target name="production"
description="Sets the build environment to production.">
<property name="build.environment" value="production"/>
</target>
<target name="testing"
description="Sets the build environment to testing.">
<property name="build.environment" value="testing"/>
</target>
<target name="native"
description="Sets the build environment to native.">
<property name="build.environment" value="native"/>
</target>
<target name="package"
description="Sets the build environment to package.">
<property name="build.environment" value="package"/>
</target>
<!--
===============================================================
Find Cmd
uses targets from find-cmd-impl.xml to detect the current
install of Sencha Cmd
===============================================================
-->
<import file="${basedir}/.sencha/app/find-cmd-impl.xml"/>
<target name="init-cmd"
depends="find-cmd-in-path,
find-cmd-in-environment,
find-cmd-in-shell">
<echo>Using Sencha Cmd from ${cmd.dir} for ${ant.file}</echo>
<!--
load the sencha.jar ant task definitions.
NOTE: the 'loaderref' attribute stores this task def's class loader
on the project by that name, so it will be sharable across sub-projects.
This fixes out-of-memory issues, as well as increases performance.
To supoprt this, it is recommended that any customizations that use
'ant' or 'antcall' tasks set 'inheritrefs=true' on those tasks, in order
to propagate the senchaloader reference to those subprojects.
The sencha 'x-ant-call' task, which extends 'antcall' and defaults
'inheritrefs' to true, may be used in place of antcall in
build process customizations.
-->
<taskdef resource="com/sencha/ant/antlib.xml"
classpath="${cmd.dir}/sencha.jar"
loaderref="senchaloader"/>
<!--
Some operations require sencha.jar in the current java classpath,
so this will extend the java.lang.Thread#contextClassLoader with the
specified java classpath entries
-->
<x-extend-classpath>
<jar path="${cmd.dir}/sencha.jar"/>
</x-extend-classpath>
</target>
<!--
===============================================================
Init
uses targets from init-impl.xml to load Sencha Cmd config
system properties and ant task definitions
===============================================================
-->
<import file="${basedir}/.sencha/app/init-impl.xml"/>
<target name="init"
depends="init-local,
init-cmd,
-before-init,
-init,
-after-init,
-before-init-defaults,
-init-defaults,
-after-init-defaults,
-init-compiler"/>
<!--
===============================================================
Build
this is the starting point for the build process. The 'depends'
attribute on the -build target controls the ordering of the
different build phases
===============================================================
-->
<target name="-before-build"/>
<target name="-build"
depends="refresh,
resolve,
js,
resources,
sass,
slice,
page,
native-package"/>
<target name="-after-build"/>
<target name="build"
depends="init,-before-build,-build,-after-build"
description="Builds the application"/>
<!--
===============================================================
Clean
removes all artifacts from the output build directories
===============================================================
-->
<target name="-before-clean"/>
<target name="-clean">
<delete dir="${build.dir}"/>
<delete dir="${build.temp.dir}"/>
</target>
<target name="-after-clean"/>
<target name="clean"
depends="init"
description="Removes all build output produced by the 'build' target">
<x-ant-call unless="skip.clean">
<target name="-before-clean"/>
<target name="-clean"/>
<target name="-after-clean"/>
</x-ant-call>
</target>
<!--
===============================================================
Watch
uses targets from watch-impl.xml to initiate the application
watch process using instrumented state from the compiler
===============================================================
-->
<import file="${basedir}/.sencha/app/watch-impl.xml"/>
<target name="watch">
<property name="build.optimize" value=""/>
<x-ant-call>
<target name="-before-watch"/>
<target name="-watch"/>
<target name="-after-watch"/>
</x-ant-call>
</target>
<!--
===============================================================
JS
uses targets from js-impl.xml to produce the output js files
containing needed application and framework js classes
===============================================================
-->
<import file="${basedir}/.sencha/app/js-impl.xml"/>
<target name="js"
depends="init"
description="Builds the output javascript file(s)">
<x-ant-call unless="skip.js">
<target name="-before-js"/>
<target name="-js"/>
<target name="-after-js"/>
</x-ant-call>
</target>
<!--
===============================================================
Sass
uses targets from sass-impl.xml to produce the output css
files for the application's styling
===============================================================
-->
<import file="${basedir}/.sencha/app/sass-impl.xml"/>
<target name="sass"
depends="init"
description="Builds the Sass files using Compass.">
<x-ant-call unless="skip.sass">
<target name="-before-sass"/>
<target name="-sass"/>
<target name="-after-sass"/>
</x-ant-call>
</target>
<!--
===============================================================
Resources
uses targets from resources-impl.xml to copy resources from
the application and required packages to the output directory
===============================================================
-->
<import file="${basedir}/.sencha/app/resources-impl.xml"/>
<target name="resources"
depends="init"
description="Copy resources to build folder.">
<x-ant-call unless="skip.resources">
<target name="-before-resources"/>
<!-- Legacy targets: -->
<target name="-before-inherit-resources"/>
<target name="-before-copy-resources"/>
<target name="-resources"/>
<!-- Legacy targets: -->
<target name="-after-copy-resources"/>
<target name="-after-inherit-resources"/>
<target name="-after-resources"/>
</x-ant-call>
</target>
<!--
===============================================================
Slice
uses targets from slice-impl.xml to extract theme images from
the application for use with older browsers that don't
support modern css features
===============================================================
-->
<import file="${basedir}/.sencha/app/slice-impl.xml"/>
<target name="slice"
depends="init"
description="Slices CSS3 theme to produce non-CSS3 images and sprites.">
<x-ant-call unless="skip.slice">
<target name="-before-slice"/>
<target name="-slice"/>
<target name="-after-slice"/>
</x-ant-call>
</target>
<!--
Theme - this is a legacy support target for extjs 4.1 apps. It redirects
to the "slice" ant target
-->
<target name="theme"
depends="init"
description="Builds the application's theme(s) images using the slicer (Ext JS 4.1 only).">
<x-ant-call unless="skip.theme">
<target name="-before-theme"/>
<target name="slice"/>
<target name="-after-theme"/>
</x-ant-call>
</target>
<!--
Refresh Theme - uses targets from refresh-impl.xml to rebuild the current
theme
-->
<target name="refresh-theme"
depends="init"
description="Rebuilds the currently enabled app theme (Ext JS 4.1 only).">
<x-ant-call unless="skip.theme">
<target name="-before-refresh-theme"/>
<target name="-refresh-theme"/>
<target name="-after-refresh-theme"/>
</x-ant-call>
</target>
<!--
===============================================================
Refresh
uses targets from refresh-impl.xml to generate bootstrapping
information for the application
===============================================================
-->
<import file="${basedir}/.sencha/app/refresh-impl.xml"/>
<target name="refresh"
depends="init"
description="Refreshes the application bootstrap data.">
<x-ant-call unless="skip.refresh">
<target name="-before-refresh"/>
<target name="-refresh"/>
<target name="-after-refresh"/>
</x-ant-call>
</target>
<!--
===============================================================
Page
uses targets from page-impl.xml to generate the output markup
file and associated microloader / app manifest
===============================================================
-->
<import file="${basedir}/.sencha/app/page-impl.xml"/>
<target name="page"
depends="init"
description="Builds the application's HTML page.">
<x-ant-call unless="skip.page">
<target name="-before-page"/>
<target name="-page"/>
<target name="-after-page"/>
</x-ant-call>
</target>
<!--
===============================================================
Resolve
uses targets from resolve-impl.xml to detect dynamic app
dependencies using phantomjs
===============================================================
-->
<import file="${basedir}/.sencha/app/resolve-impl.xml"/>
<target name="resolve"
depends="init"
description="Resolve application dependencies dynamically.">
<x-ant-call unless="skip.resolve">
<target name="-before-resolve"/>
<target name="-resolve"/>
<target name="-after-resolve"/>
</x-ant-call>
</target>
<!--
===============================================================
Native Package
uses targets from packager-impl.xml to run native packager
applications to produce stand-alone installable web apps from
this built Cmd application
===============================================================
-->
<import file="${basedir}/.sencha/app/packager-impl.xml"/>
<target name="native-package"
depends="init"
description="Builds native packages of the application">
<x-ant-call unless="skip.native-package">
<target name="-before-native-package"/>
<target name="-native-package"/>
<target name="-after-native-package"/>
</x-ant-call>
</target>
<!--
===============================================================
Help - properties
displays all current ant properties
===============================================================
-->
<target name=".props" depends="init"
description="Lists all properties defined for the build">
<echoproperties/>
</target>
<!--
===============================================================
Help - docs
displays the help message
===============================================================
-->
<target name=".help" depends="init"
description="Provides help on the build script">
<x-get-project-targets property="help.message"/>
<echo><![CDATA[${help.message}
This is the main build script for your application.
The following properties can be used to disable certain steps in the build
process.
* skip.page Do not build the HTML page.
* skip.js Do not build the output js code file(s)
* skip.resources Do not copy resources to the build directory
* skip.sass Do not build the SASS.
* skip.slice Do not build the theme image slicer.
* skip.theme Do not build the theme images.
The following properties can be used to modify the build process.
* build.compression.yui Specify yui compression for the build
* build.compression.closure Specify closure compression for the build
* build.compression.uglify Specify uglify compression for the build
* build.options Set general options for the build
(eg: enable a debug build)
To modify any of the previous build specific options, see:
${basedir}/.sencha/app/${build.environment}.properties
* build.operations Insert commands into the compile command
for the build.
* app.page.name Set the input and output page file
for the compile command.
* build.classes.name Specify the compiled js file
For details about how these options affect your build, see
${basedir}/.sencha/app/build-impl.xml
These options can be stored in a local.properties file in this folder or in the
local.properties file in the workspace.
Alternatively, these can be supplied on the command line. For example:
ant -Dskip.sass=1 build
To see all currently defined properties, do this:
ant .props
]]></echo>
</target>
</project>

View File

@ -0,0 +1,20 @@
# =============================================================================
# This file provides an override point for default variables defined in these
# lower priority files:
#
# - touch.properties
# - *.defaults.properties
# - defaults.properties
#
# To override a property based on build.environment instead add properties to
# one of these higher priority files:
#
# - production.properties
# - testing.properties
# - native.properties
# - package.properties
#
# IMPORTANT - Sencha Cmd will merge your changes with its own during upgrades.
# To avoid potential merge conflicts avoid making large, sweeping changes to
# this file.
# =============================================================================

View File

@ -0,0 +1,282 @@
{
"sources": {
"app.scss.tpl.merge": {
"3d3f6b023c31a4e49cd626dd27cff9474aff32d7": "eJx9kL1uAyEQhHs/xXRnS8nRx40lK0Xq8wusYc8QceyJH5/99gHsOh3MDLMfqxQuljGL97K5cEPeBN4FTnDLKjEjV9vwTMVnTBy0JVykaNuMhUf8zHhKAUXGtThvaslOKRACb6/MByIvcud+AwXTO8mY9jBCtoDzNEECsqyQudtXStzl/Wadtq3SJZCPTOYJF7Qvhk09vEpoXcffVCtm5/kw7k5v+iF15M/ckNX7H8Pxf1+R9zXTZp5LyrJAi2HcpG7FcuRx7N73g5bVV60il9SXV8GdrhSLe7jw1UKnN2rX90NJHIfD8Q/mSX+o"
},
"config.rb.tpl.merge": {
"e254e92dd21bc9ecb27f3b8251d67dfbc79fa1af": "eJxlkMFOwzAMhu95Cqs7bEiQB0DaCTGEtAPiBSIrddtAG5c4ASrEu+N00kDjYtl/7O+PvYEHypAHgjYk8pnTohVWKQh4jl3oS8IcOEIXRgL6DJIFQjQ6AHs4qGg1jTjRzrnD4/HeuStjNnBkbFeyUPQD3mQufoAuaeMHp1fAknlSssdxXKwZa/tKe+EQd4q8hq2123P8Oo8+YR6+q5RIuCRPUgu1mjRbve94mlEuFhAjqrlZp/XjamD8b3nh3FjbaNSGZgU+01vRAwHGBbBtQ+XhqPyTzzyWPkSBgRJZEybsSdyfA/0Dn1qUzSXPJTvJix53D7eVqGsJtYbie0gcJ4q5vsyJ2+KrsfkBl52Ucw\u003d\u003d"
},
"build.properties.merge": {
"ec0f832e80d63d776086203cffe9fed5c73b4294": "eJytUstOw0AMvPcrRuoNQT8AiQPixIGHoD/gZp3E6saOdjeJ+vc4fagSQZy6N3vs8YzXazzd8q3W2LaSUUtk9MlGCZxBChs5JQ/Qm2hBbQmBaxpiwUhJaBe9zjOiHCCK0nJmZ4s2cXImsSTlcOTNj6u1I8ADig1Vu/E5PacinM/pu82ZOy+xP5FZtl01Es7gATvKLsgUu0Fi2LCOkkw7dg+iuTAFUAi4krkmZzNlWH1ygVaa9h8T3huGqojpUm3hXESbJaBUZORlvqdqTw3/dvf69vnxtX1+33rJN2vVEl66gEliRMepYRxsSPC8Nu5hktJCSoZNijAkl4ChbxL5b25Oy6LRxH1b8VUIXVgq0zpK5Z0nvKP93BvJwXvkibmf48uc467K5WBm5tte4w874erN"
},
"index.html.tpl.merge": {
"5c2622f8945945e183e62230dbbcdc870ee41e31": "eJydVU1vGjEQvfMrJhvlEnVZogoppYAq5UONlKqVQg49eu0BHLz2yh4gKMp/z3gXkuVDRakPyGY8857fjN72T65/X43+/rmBn6Nf98NWf0qFgUJYPcZAgyQBI+xkkKBNHx+SGEehhi3g1S+QBMip8AH55uPoNr1M1iHSZHD4YkWBr/2sPtWRQCuDQKsSBwnhM2UyhHVWtbLz84/DOdw8i6LkBDcGYUFbTVoYME4obSd8VloKcr7dzLkj0AE8SlcUaBUqIAczxBJoygERoOBCBdfhbelC0Hmk5KD0bqEVctlAwhKMEVUu5KxZfDnVkQ5N0TNEcHMvkWt6hEDaGMgxEosEGXfsPGMijLUPBKQLbJTK3vdR8y+QO7WCl48LMYB6MqUeXHQ6Z9+3IpHWxLu5Val0xvkenF58u+xed95vvbbet6eiLO9rye42iu0gsQwsrbM9EHlwZk64jUeu7EF3l0Uh/ETbtAqmF93yeSeJ+5sKoydcVqIl9NvxpVY0PfS6zbu/dnZLpkvMZ5qrxgZGwmmcMWa9/8JjiWruRf3kTrsbjt3WzL7eSVaduWk7juOIR2E0T2KNY7RF0eB1rEVDnreXY22/rdY2C6VDacQqkoyYaW6cnH1W4tx5hT71TGoeuEt77a27z/LBXmjd2f3irhRS0ypqfnlQiB8b+Bmuxp57Gw71dluVztmOTLtIW8HXrVP3SPI/UuPc/h9wvetnlRmujfEkTWHEXhEbxi5i3BKKObtGjuxdJVuaJSGpspQHtGy7cMX+JmzlbvlcGwUrdqOoloki8cRBmm5cV3oda6hBUmjpXeVPPmn68JNYiPpaAsHLQdIOFUzGBbNGUqZwwexKtlZqP7F38zOqNP44ZPXXoR+tbI2s9KKCPdDEhu3Ha1wo/n7qv/W2n9WITICtdNh6Az5F4Bg\u003d"
},
"packager.json.tpl.merge": {
"79175610d9330cc0582cd66bb8103f2e24409b4a": "eJytWN1z0zgQf27/Ck144GNCfJRCmfJCSFPIUZJMEg7mGCYothLrsC2fJLfNdXp/++1K8mcTtw/XYZhEWu3ub783N4cH3rNnhwfkGXnnrzfkZq4lTza3hKZpxH2quUjGNGaWQrK/My5ZYL4tQq4I/NMhIwmQELEmW5HJ6tMuuQq5HyJZwFUa0S0LiEjMm4Bdcp8BAbPf4RnS8URpGkUs6JFJQkaTeRdu4VyFIosCElPth0Z+m1zgYu77cMTIVIpLruAYkJGpkMC/hyy8w4NOA2fntHODTG873cMHmGa0xxT4n0opwFsLeUe7FmT/P6pR8BBMqywJIjZnLHCQ+kSDX/yQSuprJokyhM6d4KEkUGTFAB06rlBwdIY67tUvV68qDbT7NP12Ppz++Xp43qLhJZPIzH69Jxwd7S4bFiaq8QMlXvR+2yF9lGi2YbIQPxDBfbnA7ZNCCR+e7M4NGxrEpwmRbA1PtCBcE6oIBYdwiIkki1dM9sgXZfIm2pp46ieBFDywNKqJCFVEPDvQTFZ/MV/fEu6LxByfAzeOgQgOo4qVagAQLkkg/CxmibbOpSuRafOWKP4PU6eGRah1qk49D9KZRSIFbREj6/ki9iK+klRuPS6U96jGzMsUk+wayDlLfOYBU5+lOqORF4sVj1jIN94ITtUophumqp97oY5NKBUQnEF2wiAfhNhAOF7QLPFDOEYAimwyHrASQR2AZWcgGDovxSyAaqW8jC/NUcQT+Ia8lgFTfJMsIyegUA8tSwCnIq9OuuTkqEtevDgmwJy8OD5+W3jRULx83SXHb8zlydFbwk24EKggvwBxzel5xIBITD6UYRHhW1NRIQ58mgcF3nVOyc3hwUHn5WuIC8kUBKLvlLeGXTrmL1/3UkiGLhIfv7mH+PhNSfzqZA9xSXJytIfkX57SoKQDG+0hfHd0XSE73kdm+OW0hwe3+0sKT9JMT6kOWzI6Eq605Rk8h3gNKVmIDArhUT2hJYvg0yWzoQevQZ0132TSslhDXBfZWggHGD2vpfBB0t2vJnRRCAYMdywKutY1UCy54jqEgk0UvcTW+pn+gs+ZeUO1kwHxpk2vToTGOm7wGj3NTdfEXky3ZMPwHkAyrONKAXA/g+IDyH2Rbl2BRpSl8giz55mS1Ya2ZrEWwA3L7uyyP8/YKtv8zBssja7oFrsWphzkXWJUR0xUojFWMdcam1XOCd0ImQZ1F5LdSFcac+45Gsd2Qh/Lzc8ZM3WnkIR2TpnP1xxsnZuipjFYwyjXYgmYljTgiu9pNzmZCwGEc8WjCHWQWZJU8ZSW6V9SHtEVxIVI8UShCWw1RHST+ZzHGTAWsnKWf3T53/g6rDxAuLlegLTKrwWwHQgX27Stw7qpUQOVDd07Q1ITvev5hstoXfjblXukWFdbiHaCMAcSBqVFQQcrOdxjuWkoXKiYb7Sw0peEY38uZ6ASLViouG3LDCY1RBSgZEUxqAbCnUpVedCrUeeGtbN3u0HyIaVBAWK+8iQQV+X40dAPUHlYNTwtvKomWI0ehrIfcaraV40mROvkc6NxIIwPbSJurV9B7cn8G2wlzIaJllvTN2mmBczfwCjCGQuQGVkV9nmJgdqB+N3CUg7ZpXijLHZoiMG/MgW1GMalGCdiM+HjOIczC7umeNh1vb6GxYIENh0bUOQsn01OyUzARKjJmcg2IONJ//3gbHj+4ePo96cdU6CNDijeyMbafYdJp1T2K0aAhUSbEVZxcrdq0QTmdiyNVcvuigLjPwgDbNgPCGmlroTMkx3qmjtwhfYKpuKippIgM9tI1WQwTMKOsTMYLaNWTdJ8WYGtBSO0ogYYwk2SBRF+Ml31SX86XY77n4c9O7UWFE+d2vm05kuGSlIbWAmY8iqJBA3IWorYLkyPVSkAwaW1lampYCsa8JIFb9aBZkMdV2539NE0U2GNA3jfhTMULdOzCAxepuN1sDywONXbfGQNRPJYY4PdwaeYKQAMLiJF0OzVtxWlCn7tLIRVl+VVbH72Kc+0ZikDaDnVrj3RSamWM7cfPIertp8JLFV/OrpAYTU13R2BSxLhbbe5t1YURyxg0G5lWYTAic3qbVcyTbD3nz5kkwGIMLTxa/jAnxvRdp+yHeJ9PhSK/HcYCBAJU3Yq4BEGZT5toObgTlpRM6YJxcX3iTtcgn3AXCJSucWeFr9P1G0Dxn2DliTur27QvpR0+92a9QekKpMxV2gn2xzMNZqscmFHAzC0mfRWWORrM8KTorvBTv2U2EUyA7QRh6LZ4FXthlUmLinWIoOsfoADzFZqtl136n2mCV8zpXulOOOMR/3BYDifLwcfh4NPo/FyOptMh7PFaDgvykGpX+f0e2E4/OuMxovhbDxcgEVr544p3HydzD4t54v+YtikGUAtm/Wbp3+M3s92EDuG56PxcHkxGfQXo8l4D81g0p/N91MN+hcXy+nHyXjYKS5+3E2tRiQI/PHA/p6gWkbGKpkNDDMLNF0J82KR9NUnsD1/x40T67GkXNv9M8JfwHyasgu2bh7N+CZ0Z/mjL6mC7DuDqg8r6Y/D28P/ACQ3720\u003d"
},
"native.properties.merge": {
"2c8c063f9588eecff09624782d7369a8a000d61c": "eJytkEsOwjAMRPecYkT3vQF3YMEFguJSi2BXjgni9rgfFQ5AdrEm743T4fTPc+hwGbli4EKYTBtnqkgCbWQWF0zK4hjUkGlIz+JoyThdS+RiwkIZLAiQJOdG/RarfeAmMmeqfUioLoJtgmQElfIGPyY1D8hrJMH1ySWz3AI3K30kHFfuESSNTeVB4v2hi8T5i/tp4vs+nu6zk9XY38tGK/+nWQx87hK0pU3RlAMzu3fv8qaG8s9f/wFV3ZB9"
},
"production.properties.merge": {
"cbdf9712e9b5d37cecb4d0530ba1fccd0ed004a3": "eJytkUEOwjAMBO+8YkXv/QF/4MAHAnGpRbArxy3i97gFQbk3t6ycmbXS4LDl2TU49VzRcSEMphNnqkgCncgsLhiUxdGpIVOXxuKYknE6l5iLhIUyWBCgeJ7Hi7NK+xmtbWQDmTPVNkRUF8knQTKCSnmC74OaB+jRk+A8csks10DOWu8J+x97D5KJTeVO4u2uianjD7lq5N+9PN1mL6uxP5fN3o5Vuwh87hO0pVHRlAMz+//cy7sa2o2/4QV6LJW9"
},
"app.js.tpl.merge": {
"bf7e5518d2efd28e0a64077e1e7666428cf994ae": "eJx1VdtuEzEQfc9XjILQblDkpCEtEFRxKTxEAlRxkxDiwV1PErdee/GlSajCtzP2ZnMhiR/2NnPOzBx7Zh8ey7Iy1l/z4o5PMS9MyRzqYsZZ8FJ1Hq96T1pA6+tMOphIhUD3KWq03KMArgWESqTnmyV8SVC4KgWDHyZAwTWgkB78Bs5d4tOIgjATY2FpggVeVUoW3Euju3ATIgIdJrCDuVQKZvwewRu4QSjRTlPARLUNCvMZaqBwFVpiLh0URmCTLlGD5+7OgQvFjBLZGPSU8pknspIAynUJqL01SqF1QDneS5y7VG0KYYPWEdWutYrZkwxTywW2WSsRjQVypZZAZj1FFzPfijA3QYlYiZKlbHQsjfNksXdbszAaE5vUYEgRC5XiBbHlTQlX2zw7DMaTXTVIfW18rVZSOVE1CcWQUdztZkaxulG+pHdljQgFbRi0awaSZEJ75NtUCPeRMPEl57idsUSLzijap5LrEMtnrSe9Vuv9wrOdDc4f6iPASxxB9kCWT/S4yrq1chZ/B0lEI/iZ3uPKIsVHdI4O6VuzyJLh1xqQNmfP+yOXet9HUvYjeNi6nD/LKHjMN1hStBcdXG9MV1bpKeWy8Xw2OOX5V1Zc/O9+djY85f96sDjwHp70TuwNJCFWTTEu2q8tUrtWxqEYgbcB11bnufWhGpek1V7JTwf9xfCivx9v7d1bG9lttZffxbC/eDE4gVkbDwS7eL446/eHx0GN9QA1jN8Hp1Br64F+508vFoN+//lx2MZ8qPuLaBiewjXmQ/EVD9RhI5jQLZ3mzo7GvR68Q0cduYwDDB7R2f5guKBZMdYiHn+aJaiwRO03mHi0J2qZZ0ecsw4TNV/eednaDTPW0kuu5B9MkUo68akR9mi/04c43hkXIo8fCovU6vm26VjEsNQvHYqwW6jR3+rJfqLW1JJuyuJckLbMN4a42m+2/Q41T7u775F+KTtjgSa8g9tAQ5CGG22Gm4Q4QG+QBm7zj0lTlMYmvZDfPU09AjL4jIqEA23mr/6Lssmc/ine6LHYraBZcgIbO1xeXkK2RJcd84xrLrUwc6ZMnTazKXi+Vm93rVrH3xqhWyt6+geQsUAZ"
},
"testing.properties.merge": {
"360e715956c81757e53736789fe20be045acb544": "eJytkMENwjAMRe+d4oveuwE7cGCBoLjUItiVY4q6PW6pKAM0t1g/732nxfnI07S4DlzRcyGMphNnqkgCncgsLhiVxdGrIVOfXsUxJeN0K5GLCQtlsCBATtVZ7t2Wq13wRjJnql1YqK6GbYJkBJUyg5+jmgflPZDg9uKSgxK8xekD4bSBTyCZ2FSeJN41bUQuO++vi/828vRYpKzGPq87fQV/1WLgS5mgrXWKphyYRb6L10c1nAf//gdqIpHi"
},
"app.json.tpl.merge": {
"a36200bbd84dffd4133a6074252425c15a5f25b1": "eJzFWMtu2zgU3ecrCGOAtoFjrWYTTAtk0hTNTJoWdYpZtF3QFGWxpUiVpOwYgf99zqUeluwkrdOiERBIscR7z33wHJI3BwxXcngY7+yQXeWS8bLUSvCgrHnimeGF9CUXcswqL1M2W7GpNCLn7NQWBTcpC5bNpZGOB8mE5t5L35hL4n1EJkbHbHRDD+vR+OA2r5nSkpU85GQv5Mpv4cicNYG9vnpzwVIrqkKaMGZOarxfyP6YyRdvTTQ3RKFMKq9fh0K/gxOCE3+Y5PjlDkh85q2uENWH9xe3oWLKsFQupLYlwWHSLBRQ1tDURB5jRDfYVWbHQOsMpla2cmwpZ2zm7NJLx9LKKTPv2x8zOZkDdx5CeZwk2gquc+tDUqxgM+mFM2kMb4KB3wXXlWR4MFKmKOQyl4bNKqVjBZ1ErEhkxDHMfCpLCdtGKOmZypgK+PpbpTCEAelCuiOvUhlNVE501Ue4PDDuJDMWd4E3Xs1Q5YXidbn9ygdZsNLZYIXVk2HBKqdRJlNpvVueC+UDsxnjWrN/+IJPhVMlnKD5gqe6UOadmueoyrUUVSyXdal0rRN2xkWOWOCfioK3sy9SBLZU1ILUkFZru6QaZNYVPBy3A+N1M/gv4i2bvqJ7EmziIya044glCXvXtDYFPqY0xvrVeUBGiwoBzeSPdXTPqZOFDTS7gkN1BxecPn1bUuRcP9sZed+FkUfspcx4pZFNIKlQ/0wZdM3TjGsvV8/oV6/mMM14P5RlrpDWpUJdEI2wpZLp/r6npRQqW9VBIVcxE3WqkBFWB73jkNoMsO72O6rKlMdsjVKpAx/9qmwB8nkW/fuIHM7HPdARnTV6Rdi05TT9rCFKBX/u7YsxgdaFCWXivIvZnwbr+FyiUkHp2nU34UHWZi7TyQOiavOEtErDafJamu+YH0dcgaToLauzStNkE/NDfGWY6iNWSG5gA8+t4babCiSupq1NauvY/G6pr49m1gYfHC+3Z8dPlfrcpESNkvqwT/6FBbhY444vVxPG9jUP3fF1Z/tNU3cdjZJHXpANcacgYYHKr8BtmBWZdHC7/4Rr+LJT8Y5zoO8qk2CmurYogRLO1i3stlUmXushh4P8jtnHg9bXzUHfc8eYN5nDymBp3VdiyXXi4wLjKNhK5H+FUoMCno+0mjmOSJ8/Z09A+09GL45w+yvB+xdEsuOh7d36d+/X4+8B6ob+asN1ZrdNzsCvuiXxMQldr81qFUUnxLXVUI1JXAWYBB8a/HX90RHPRuObinQ+t6lwE0R8+ny/5p5Op7eKrTJCV/4RxJZsT4R/JK19MKM8otI+ktD+TKp+l8z+jMpGqURbYwlvDXgaArHcP8zforu/THbvUwCakz8gAd3mIcGAhCYiDdziyf0564OvK8KrYEEroFSN9thsV6nEk07lnsbt5Z+DPV78pBPCZz1exVap5tZhwBh8SmMAcxNrB6mG1VIpsVbHoKcnp6/P2JuTy/NXZ9MrbK3EZo/Yc1BntfHwcZig3h6we/F5vBeKy7Or/96+//d+90YGUutdAIcP9vvq5OLi75PT7zgGJ+oZF9Hz5/jzerfoZ9cQ5812dEBVUC8LldkI47B43aBBaL3uVAXmf78x++8gxXe88oG7UJWju/r0FXVV0lvP0VEJui6gzC5GAAWwruk8hLIireyvBf240zVQkkoR/7zS3GH/WzraeQPb1oFItDgM9NOniV+YP+7E+bID2B7V+ECwaE0ANwtlK0/7+bSKRWygTdglyUhcyRBg5CnQmrmdhx3JRoLpktA6beP6KktaYQQu6gUp/JSg2cZKXHRkNTV6fB6WEqmqKWMrcu5EDt1vD4Kaf285BWo7tUTLEe/Hw7D6uCQegHTrYlGkzToLoOigY7ut6vOSLtm3UZVR3yrZYydkJd2Qe4+TmpM4TpnGYuE6fjTQp69y5bu11yWtqIj2iLB8biugNNi5uIbFezq2dQKj0rg6ryKy83Q9Olgf/A/eSIqN"
},
"package.properties.merge": {
"c6c1fb2fb1dda28480ad0f6e5caffc9b97d196ae": "eJytkUFygzAMRfc5hSZsOxygM11223aRCwgsQBNH8tiCTG5fGWjDAcLOsnjvS27g45XfqYHLxAUGjgQp68KBCqCALpSzHyApi8GgGQINOEeDBTNjF73PKywUgAUclLC/4kjt3lda5yXKxlRat1BZDXsFMBOoxAfwLWk2p9wnEuhmjoFldF512kRw3sFnIFk4q9xIrD013vLz5B2y2P9EhtcqZc1sj3WmTXCI5gWrYZy2xomKwTFV/hSvP5XN+fV9+Xzftjb7SDoc+jClWJmmIGi80N9SwnbVe1HlDUTdWfNvt1togpGEMkYoLP1K7tVfIHKXfeVU/S9+/V9rlbyW"
},
"sencha.cfg.tpl.merge": {
"d2e6e42720f88befc892f12df5fd7bab587f7879": "eJxtUDEOwjAM3PsKSzAi6MaUhQfwAhaTujTQNpHtClWof8cpamFgSU53F/sumNK+x47cK59TUaARNRt+Rn641wrPX9m3KJJQG7e9DGV5PGWyCjwdMrjL7g9dFBvQJggkjolYR5BEPtSBBBB87DoEoYSMShW0QRRiDXmJmNorhj70NxvCJHFgb880mpLGfGtDcB1CW4HtI6+RxznpYt7Pg9wn/mzMwZb4uZ71MdsqTYefDp+feQN/i2pK"
}
},
"targets": {
"resources/sass/config.rb": {
"source": "config.rb.tpl.merge",
"version": "e254e92dd21bc9ecb27f3b8251d67dfbc79fa1af",
"parameters": {
"viewNamespace": "Audio.view",
"frameworkName": "touch",
"frameworkPath": "../..",
"senchadir": ".sencha",
"appModels": "",
"appControllers": "",
"appViews": "",
"uniqueId": "3a867610-670a-11e1-a90e-4318029d18bb",
"appName": "Audio",
"modelNamespace": "Audio.model",
"name": "Audio",
"library": "core",
"controllerNamespace": "Audio.controller",
"appStores": ""
}
},
"index.html": {
"source": "index.html.tpl.merge",
"version": "5c2622f8945945e183e62230dbbcdc870ee41e31",
"parameters": {
"viewNamespace": "Audio.view",
"frameworkName": "touch",
"frameworkPath": "../..",
"senchadir": ".sencha",
"appModels": "",
"appControllers": "",
"appViews": "",
"uniqueId": "3a867610-670a-11e1-a90e-4318029d18bb",
"appName": "Audio",
"modelNamespace": "Audio.model",
"name": "Audio",
"library": "core",
"controllerNamespace": "Audio.controller",
"appStores": ""
}
},
"packager.json": {
"source": "packager.json.tpl.merge",
"version": "79175610d9330cc0582cd66bb8103f2e24409b4a",
"parameters": {
"viewNamespace": "Audio.view",
"frameworkName": "touch",
"frameworkPath": "../..",
"senchadir": ".sencha",
"appModels": "",
"appControllers": "",
"appViews": "",
"uniqueId": "3a867610-670a-11e1-a90e-4318029d18bb",
"appName": "Audio",
"modelNamespace": "Audio.model",
"name": "Audio",
"library": "core",
"controllerNamespace": "Audio.controller",
"appStores": ""
}
},
".sencha/app/native.properties": {
"source": "native.properties.merge",
"version": "2c8c063f9588eecff09624782d7369a8a000d61c",
"parameters": {
"viewNamespace": "Audio.view",
"frameworkName": "touch",
"frameworkPath": "../..",
"senchadir": ".sencha",
"appModels": "",
"appControllers": "",
"appViews": "",
"uniqueId": "3a867610-670a-11e1-a90e-4318029d18bb",
"appName": "Audio",
"modelNamespace": "Audio.model",
"name": "Audio",
"library": "core",
"controllerNamespace": "Audio.controller",
"appStores": ""
}
},
".sencha/app/production.properties": {
"source": "production.properties.merge",
"version": "cbdf9712e9b5d37cecb4d0530ba1fccd0ed004a3",
"parameters": {
"viewNamespace": "Audio.view",
"frameworkName": "touch",
"frameworkPath": "../..",
"senchadir": ".sencha",
"appModels": "",
"appControllers": "",
"appViews": "",
"uniqueId": "3a867610-670a-11e1-a90e-4318029d18bb",
"appName": "Audio",
"modelNamespace": "Audio.model",
"name": "Audio",
"library": "core",
"controllerNamespace": "Audio.controller",
"appStores": ""
}
},
".sencha/app/package.properties": {
"source": "package.properties.merge",
"version": "c6c1fb2fb1dda28480ad0f6e5caffc9b97d196ae",
"parameters": {
"viewNamespace": "Audio.view",
"frameworkName": "touch",
"frameworkPath": "../..",
"senchadir": ".sencha",
"appModels": "",
"appControllers": "",
"appViews": "",
"uniqueId": "3a867610-670a-11e1-a90e-4318029d18bb",
"appName": "Audio",
"modelNamespace": "Audio.model",
"name": "Audio",
"library": "core",
"controllerNamespace": "Audio.controller",
"appStores": ""
}
},
".sencha/app/build.properties": {
"source": "build.properties.merge",
"version": "ec0f832e80d63d776086203cffe9fed5c73b4294",
"parameters": {
"viewNamespace": "Audio.view",
"frameworkName": "touch",
"frameworkPath": "../..",
"senchadir": ".sencha",
"appModels": "",
"appControllers": "",
"appViews": "",
"uniqueId": "3a867610-670a-11e1-a90e-4318029d18bb",
"appName": "Audio",
"modelNamespace": "Audio.model",
"name": "Audio",
"library": "core",
"controllerNamespace": "Audio.controller",
"appStores": ""
}
},
"app.json": {
"source": "app.json.tpl.merge",
"version": "a36200bbd84dffd4133a6074252425c15a5f25b1",
"parameters": {
"viewNamespace": "Audio.view",
"frameworkName": "touch",
"frameworkPath": "../..",
"senchadir": ".sencha",
"appModels": "",
"appControllers": "",
"appViews": "",
"uniqueId": "3a867610-670a-11e1-a90e-4318029d18bb",
"appName": "Audio",
"modelNamespace": "Audio.model",
"name": "Audio",
"library": "core",
"controllerNamespace": "Audio.controller",
"appStores": ""
}
},
"app.js": {
"source": "app.js.tpl.merge",
"version": "bf7e5518d2efd28e0a64077e1e7666428cf994ae",
"parameters": {
"viewNamespace": "Audio.view",
"frameworkName": "touch",
"frameworkPath": "../..",
"senchadir": ".sencha",
"appModels": "",
"appControllers": "",
"appViews": "",
"uniqueId": "3a867610-670a-11e1-a90e-4318029d18bb",
"appName": "Audio",
"modelNamespace": "Audio.model",
"name": "Audio",
"library": "core",
"controllerNamespace": "Audio.controller",
"appStores": ""
}
},
".sencha/app/testing.properties": {
"source": "testing.properties.merge",
"version": "360e715956c81757e53736789fe20be045acb544",
"parameters": {
"viewNamespace": "Audio.view",
"frameworkName": "touch",
"frameworkPath": "../..",
"senchadir": ".sencha",
"appModels": "",
"appControllers": "",
"appViews": "",
"uniqueId": "3a867610-670a-11e1-a90e-4318029d18bb",
"appName": "Audio",
"modelNamespace": "Audio.model",
"name": "Audio",
"library": "core",
"controllerNamespace": "Audio.controller",
"appStores": ""
}
},
".sencha/app/sencha.cfg": {
"source": "sencha.cfg.tpl.merge",
"version": "d2e6e42720f88befc892f12df5fd7bab587f7879",
"parameters": {
"viewNamespace": "Audio.view",
"frameworkName": "touch",
"frameworkPath": "../..",
"senchadir": ".sencha",
"appModels": "",
"appControllers": "",
"appViews": "",
"uniqueId": "3a867610-670a-11e1-a90e-4318029d18bb",
"appName": "Audio",
"modelNamespace": "Audio.model",
"name": "Audio",
"library": "core",
"controllerNamespace": "Audio.controller",
"appStores": ""
}
},
"resources/sass/app.scss": {
"source": "app.scss.tpl.merge",
"version": "3d3f6b023c31a4e49cd626dd27cff9474aff32d7",
"parameters": {
"viewNamespace": "Audio.view",
"frameworkName": "touch",
"frameworkPath": "../..",
"senchadir": ".sencha",
"appModels": "",
"appControllers": "",
"appViews": "",
"uniqueId": "3a867610-670a-11e1-a90e-4318029d18bb",
"appName": "Audio",
"modelNamespace": "Audio.model",
"name": "Audio",
"library": "core",
"controllerNamespace": "Audio.controller",
"appStores": ""
}
}
}
}

View File

@ -0,0 +1,592 @@
# =============================================================================
# This file defines properties used by build-impl.xml and the associated
# *-impl.xml files (sass-impl.xml, js-impl.xml, etc.), which are the core of
# the applications build process.
#
# This file represents the lowest priority file for defining these properties
# as well as the place to look for documentation and learning what properties
# exist.
#
# The full set of these files is as follows (in priority order):
#
# - One of these (based on build.environment):
# - production.properties
# - testing.properties
# - native.properties
# - package.properties
#
# - build.properties
#
# - One of these (based on app.framework):
# - ext.properties
# - touch.properties
#
# - One of these (based on build.environment):
# - production.defaults.properties
# - testing.defaults.properties
# - native.defaults.properties
# - package.defaults.properties
#
# - defaults.properties
#
# Properties are controlled by the first file in the above list to define the
# value. Values from all levels, however, can reference each other via the
# property expansion.
#
# IMPORTANT - This file should not be modified by an app as it is overwritten
# during each app upgrade.
# =============================================================================
# *****************************************************************************
# Global Build Properties
# these are cross-concern properties used by many build phases
# *****************************************************************************
# the default build enviornment type (production, testing, native, package)
# NOTE: this is only a default and will typically be set before this file is
# loaded, typically by the 'sencha app build" command.
# See "sencha help app build" for details.
#
# The corresponding properies files:
# (production.properties, testing.properties, etc.) provide examples of
# overriding sets of properties depending on the selected environment
# NOTE: this replaces the deprecated args.environment
build.environment=production
# the directory to place built application files
build.dir=${workspace.build.dir}/${build.environment}/${app.name}
# a temporary output directory used for staging intermediate build artifacts
build.temp.dir=${workspace.build.dir}/temp/${build.environment}/${app.name}
# the directory under the output folder for placing resources
build.resources.dir=${build.dir}/resources
# *****************************************************************************
# JS
# these properties control various aspects of output js code construction
# *****************************************************************************
# the output js file that contains all needed js code
build.classes.name=app.js
build.classes.file=${build.dir}/${build.classes.name}
# the output js file for framework code, if the framework
# classes are not included in the default all-classes.js file
build.framework.name=framework.js
build.framework.file=${build.dir}/${build.framework.name}
# Don't use these - they are deprecated
build.options.debug.enable=debug:true
build.options.debug.disable=debug:false
build.options.logger.enable=logger:yes
build.options.logger.disable=logger:no
# This property enables/disables <feature logger> blocks in js output, see build.options
build.options.logger=no
# This property enables/disables <debug> blocks in js output, see build.options
build.options.debug=false
# This property can be used to pass custom build options in addition to any of the other
# build.options flags. When overlapping, these options take priority, see build.options
build.options.custom=
# This value is specified by the framework
build.options.default=
# This property contains the framework ("product") used for filtering of JavaScript using
# the preprocessor. This is set by either ext.properties or touch.properties.
#
#build.options.product=touch
# This property contains the desired API level used for preprocessor filtering of JavaScript.
# This is set by either ext.properties or touch.properties.
#
#build.options.minVersion=2.1
# This property holds the set of js preprocessor options in the form:
#
# name1:value1,name2:value2,...
#
# (used by -init-compiler in init-impl.xml)
#
# This property is not likely to be set directly. Rather, you should set one of the
# contributing properties that are combined to form this one:
#
# build.options.debug
# build.options.logger
# build.options.custom
#
# The other properties that contribute to this are typically not needing to be set:
#
# build.options.product
# build.options.minVersion
#
build.options=logger:${build.options.logger},debug:${build.options.debug},product:${build.options.product},minVersion:${build.options.minVersion},${build.options.default},${build.options.custom}
# This property can be modified to change general build options
# such as excluding files from the set. The format expects newlines
# for each argument, for example:
#
# build.operations=\
# exclude\n \
# -namespace=Ext\n
#
# NOTE: modifications to build.operations are intended to be
# placed in an override of the "-after-init" target, where it
# can be calculated based on other
# ant properties
#
# build.operations=
# enables / disables the full class optimizer during js builds
# (used by the -compile-* targets in js-impl.xml)
build.optimize.enable=\
optimize\n \
-define-rewrite\n
build.optimize.disable=
build.optimize=${build.optimize.disable}
# enables / disables yui compression
build.compression.yui=0
# enables / disables closure compression
build.compression.closure=0
# enables / disables uglify compression
build.compression.ugilfy=0
build.compile.temp.dir=${build.temp.dir}/sencha-compiler
# controles whether to keep the temp compile dir after the build
build.compile.temp.dir.keep=true
# ------------------------------------------
# DOC ONLY - Do Not Set
# this variable will be set to the appropriate compressor
# option, and is calculated in init-impl.xml, but may be overridded in
# app.properties, <environment>.properties, or via command line
#
# build.compression=
# ------------------------------------------
# *****************************************************************************
# Page
# these variables control aspects of building the output markup page
# *****************************************************************************
# controls whether the output will be microloader-enabled, or markup only
build.output.markuponly=false
# controls whether the microloader content will be embedded in the output
# markup, or left as a separate resource
build.enable.embedded.microloader=true
# whether to include the page's manifest.json code with the
# microloader content. Production.properties files should set this to
# false to have app.json exist as a server resource.
build.enable.embedded.manifest=true
# enables / disables delta patch generation
enable.deltas=false
# enables / disables generation of cache manifest
enable.cache.manifest=false
# enables / disables compression of resources referenced in app.json / package.json
# js and css entries
enable.resource.compression=false
# defaults to index.html, but may be overridden in app.json
app.indexHtmlPath=index.html
# the input page file for the application
app.page.name=${app.indexHtmlPath}
app.page.file=${app.dir}/${app.page.name}
# the output page file
build.page.name=${app.page.name}
build.page.file=${build.dir}/${build.page.name}
# the directory where the microloader files may be found
app.microloader.dir=${app.config.dir}/microloader
# the file names of the individual microloaders
app.microloader.development=development.js
app.microloader.testing=testing.js
app.microloader.production=production.js
# the target microloader to use for builds
app.microloader.name=${app.microloader.development}
app.microloader.path=${app.microloader.dir}/${app.microloader.name}
# specifies how to embed the microloader code into the output markup
# {0} is replaced with the content of the microloader file specified
# by app.microloader.path
build.microloader.code.tpl={0}
# the template to use when generating a stand-alone json manifest file
build.microloader.json.tpl.standalone={0}
# the template to use when embedding the manifest json directly next to the
# microloader in the output microloader content
build.microloader.json.tpl.embedded=Ext.blink({0});
# the template to use in the output microloader content when supplying
# the manifest json as a separate server-side resource ('production' builds)
build.microloader.json.tpl.external=Ext.blink('{'id:''${app.id}'''}');
# the template string to use when embedding the microloader content
# into the output markup
build.embedded.microloader.tpl=<script type="text/javascript">{0}</script>
# the compressor to use when embedding the microloader into a page
# can be -closure or -yui, or leave empty to disable compression
build.embedded.microloader.compressor=
# the name of the output microloader file
build.microloader.name=microloader.js
# the path to the microloader content file, if external to the outpout markup
build.microloader.path=${build.dir}/${build.microloader.name}
# the inner markup to embed into the output markup when not including
# the microloader content directly into the output markup
build.embedded.microloader.src=${build.microloader.name}
build.external.microloader.markup=<script src="${build.embedded.microloader.src}"></script>
# a flag indicating which mode the microloader should run in (production, testing, etc.)
# currently unused : is a placeholder for future microloader interactions
build.microloader.mode=${build.environment}
# the tag name to use when generating the compiler save set for
# the page's js code
build.tag.name=full-page
# the name of the archive folder containing source versions for
# delta patch generation
build.archive.name=archive
build.out.archive.path=${workspace.build.dir}/${build.archive.name}/${app.name}
# the name of the output folder for calculated delta patches
build.deltas.name=deltas
build.out.delta.path=${build.dir}/${build.deltas.name}
# the output cache manifest file
build.manifest.name=cache.appcache
build.manifest.path=${build.dir}/${build.manifest.name}
# the path to the output markup page
build.out.page.path=${build.dir}/${app.page.name}
# the name of the manifest json file
build.json.name=app.json
# the full path to the manifest json file
build.out.json.path=${build.dir}/${build.json.name}
# Defines the file that will contain Ext.setVersion calls for each used package.
build.out.package.versions=${build.compile.temp.dir}/cmd-packages.js
# a temp directory for managing extracted resources during the page build
build.app.temp.dir=${build.compile.temp.dir}/app
# controls the format of checksum headers injected into microloaded content
# either comment style, or code style for js and css files
delta.comment.checksums=false
# *****************************************************************************
# Refresh
# these properties are used for generating bootstrap js and css
# files to support dev-time interaction with the app
# *****************************************************************************
# the base path to use for generating / calculating bootstrap info
app.bootstrap.base.path=${app.dir}
# these control the name of the bootstrap js file
# note: there will be corresponding entries in either the index page
# or app.json that reference these names
app.bootstrap.js.name=bootstrap.js
app.bootstrap.js=${app.bootstrap.base.path}/${app.bootstrap.js.name}
# these control the name of the bootstrap css file (for ext 4.2+ apps)
# note: there will be corresponding entries in either the index page
# or app.json that reference these names
app.bootstrap.css.name=bootstrap.css
app.bootstrap.css=${app.bootstrap.base.path}/${app.bootstrap.css.name}
# the microloader to use for bootstrapping operations
app.microloader.bootstrap=${app.microloader.dir}/${app.microloader.development}
# the name of the bootstrap microloader manifest
build.json.bootstrap.name=bootstrap.json
# the full path to the bootstrap microloader manifest
build.json.bootstrap.path=${app.dir}/${build.json.bootstrap.name}
# *****************************************************************************
# Sass / Css
# properties for controling features of sass generation and compilation
# *****************************************************************************
# controls the ruby command that is used to execute compasss
# a full path to ruby may be specified rather than allowing the system
# shell to resolve the command
build.ruby.path=ruby
# --------------------
# these control properties select the mode used to build the app's styling
# see sass-impl.xml for how then are used
# enables theme builds for apps using ext 41 style themes
enable.ext41.themes=false
# enables theme builds for apps using ext 42 style themes
enable.ext42.themes=false
# enables theme builds for apps using touch style themes
enable.touch.themes=false
# --------------------
# selector count threshold to use when
# splitting a single css file into multiple
# css files (IE selector limit workaround)
#
# NOTE: applies only to ext js 4.2+ style theme management, currently
# see the above theme control variables for details
build.css.selector.limit=4095
# enables / disable css preprocessor (enable.ext42.themes only)
build.css.preprocess=true
# sets the css preprocessor options, in the form:
# name1:value1,name2:value2,...
build.css.preprocessor.opts=
# enables / disable css compressor (enable.ext42.themes only)
build.css.compress=true
# controls the directory used to generate the output app scss file
# for apps that use theme packages
build.sass.dir=${build.temp.dir}/sass
# Specify the name for the individual resource dirs in the app
# (enable.touch.themes only)
app.sass.name=sass
# Specify the sass path in the app
# (enable.touch.themes only)
app.sass.dir=${app.dir}/resources/${app.sass.name}
# name prefix to use for output css / sass files
app.out.base=${app.name}-all
app.out.base.debug=${app.out.base}
# the output sass file to generate (used with enable.ext42.themes)
app.out.scss=${build.sass.dir}/${app.out.base.debug}.scss
# the output ruby compass config file to generate (used with enable.ext42.themes)
app.out.ruby=${build.sass.dir}/config.rb
# output css file prefix
app.out.css.prefix=${app.out.base.debug}
# output css file name
app.out.css.name=${app.out.css.prefix}.css
# output css file path (relative to build directory root
app.out.css.rel=resources/${app.out.css.name}
# output css file path (full path)
app.out.css=${build.dir}/${app.out.css.rel}
# separate file name to use for generating a compressed copy
# of the output css file (this default will compress the file in-place)
app.out.css.compressed=${build.dir}/resources/${app.out.base}.css
# the directory containing sass files for compass to compile
compass.sass.dir=${build.sass.dir}
# the output directory where compass should place built css files
compass.css.dir=${build.dir}/resources
# the directory containing the ruby config file for compass
compass.config.file=${app.out.ruby}
# enables / disables console highlighting for compass
compass.compile.boring=false
# enables / disables forced rebuilds for compass
compass.compile.force=true
# enables / disables stack traces in compass failure output
compass.compile.trace=true
# the directory that will be the current working directory of the compass
# process (controls the location of .sass-cache folder creation)
# NOTE: this directory will also typically need to contain the config.rb file
# used for compass invocation, so it is ideal to set build.sass.dir instead of this
# variable, as that will control both the config.rb location as well as the
# .sass-cache location
compass.working.dir=${build.sass.dir}
# ---------------------------------------------------
# Legacy properties for ext41 theme directories
# Specify the resources path in the app
app.packages.dir=${app.dir}/packages
# Specify the theme path in the app (this directory contains the themes)
app.theme.dir=${app.packages.dir}
# the currently selected ext 41 theme name
theme.name=default
# ---------------------------------------------------
# *****************************************************************************
# Slice
# these properties control features of the theme slice build phase
# *****************************************************************************
# the resources directory of the application
# note: this property is currently only used for building ext 4.1 style themes
# (used by x-build-theme and x-copy-resources in slice-impl.xml)
app.resources.dir=${app.dir}/resources
# the directory containing the slicer widget example page
app.example.dir=${app.dir}/sass/example
# properties to control the recirect css file that is
# generated for the slicer example page
app.example.css.name=example.css
app.example.css.file=${app.example.dir}/${app.example.css.name}
# the base path for generating the bootstrap code for the
# slicer page
bootstrap.base.path=${app.example.dir}
# the full file name of the slicer page's bootstrap js file
bootstrap.example.js=${app.example.dir}/bootstrap.js
# this is the directory used for intermediate build artifacts used
# by the slicer for generating theme images
app.example.build.dir=${build.temp.dir}/slicer-temp
# the name of the intermediate screenshot file used for image slicing
build.capture.png=${app.example.build.dir}/theme-capture.png
# the name of the intermediate widget manifest file used for image slicing
build.capture.json=${app.example.build.dir}/theme-capture.json
# the location of the slicer widget page
app.example.theme.html.name=theme.html
app.example.theme.html=${app.example.dir}/${app.example.theme.html.name}
# a name prefix used for slicer page temporary artifacts
app.example.base=${app.name}-example
# the special slicer page scss file name to generate
app.example.scss=${app.example.build.dir}/${app.example.base}.scss
# the relative path from the slicer css file to the slicer html file
app.example.css.rel=${app.example.base}.css
# the path to the css file that will be built for the slicer page
app.example.css=${app.example.build.dir}/${app.example.css.rel}
# the ruby compass config file to generate for slicer page scss
app.example.out.ruby=${app.example.build.dir}/config.rb
app.example.compass.config=${app.example.out.ruby}
# legacy ext 41 theme property indicating the name of the
# slicer example page contained in the theme directory
theme.page.name=theme.html
# Options to pass to the "sencha fs slice" command.
build.slice.options=
# *****************************************************************************
# Packager
# these properties control features of the native packaging phase of the
# build process
# *****************************************************************************
# enables packaging the built application with the Sencha Desktop Packager
# NOTE: currently unsupported
enable.desktop.packager=false
# skips packaging the built application with sencha mobile packager (stbuild) or cordova/phonegap
skip.native-package=true
# a property that controls whether a standalone manifest.json file will be
# generated for the native packaged application
enable.standalone.manifest=false
# these set the name of the mobile native packager's config file
build.mobile.packager.name=packager.json
build.mobile.packager.file=${app.dir}/${build.mobile.packager.name}
# the default mobile packager config to use when specifying the autorun argument
# with "sencha app build -run native"
build.mobile.packager.default.name=packager.json
build.mobile.packager.default.file=${app.dir}/${build.mobile.packager.default.name}
# these set the name of the mobile native packager's temporary config file
# that will have the input and output path properties updated
build.mobile.packager.temp.name=packager.temp.json
build.mobile.packager.temp.file=${app.dir}/${build.mobile.packager.temp.name}
# the input directory for the mobile native packager that contains the
# built Sencha Cmd application
build.mobile.packager.in.dir=${build.dir}
# the output location of the mobile native packaged application
build.mobile.packager.out.dir.name=native-package-mobile
build.mobile.packager.out.dir=${workspace.build.dir}/${build.mobile.packager.out.dir.name}/${app.name}
# *****************************************************************************
# Resolve
# these properties control aspects of the dynamic dependency resolver, which
# uses phantomjs to load the applicaiton and extract Ext.Loader class load
# history.
# *****************************************************************************
# enables / disables dynamic dependency resolution
skip.resolve=true
# enables the local web server. this may be disabled to load the application's
# page from an existing web server.
skip.web-start=false
# the port number to start the local web server on
build.web.port=54321
# the directory representing the root web folder
build.web.root=${workspace.dir}
# the base url to access the local web server
build.resolve.url=http://localhost:${build.web.port}
# a template string used to format the detected dynamic dependencies
build.resolve.tpl={0}
# the mode to use when formatting the detected dynamic dependencies
build.resolve.mode=references
# the output file for the detected dynamic dependencies
build.resolve.file=${build.temp.dir}/resolve.json
# controls whether unmatched external references in the specified file will
# generate build warnings or build failures
build.resolve.allow.unmatched=true
# *****************************************************************************
# Watch
# these properties adjust the behavior of the app watch process.
# *****************************************************************************
# the default set of actions to run when triggering a rebuild
build.trigger.targets=-refresh,-resources,-compass-compile
# the watcher targets to run that monitor for code changes
build.watcher.targets=-watch-compiler

View File

@ -0,0 +1,58 @@
<project name="find-cmd-impl">
<!--
Run "sencha which" to find the Sencha Cmd basedir and get "cmd.dir" setup. We
need to execute the command with curdir set properly for Cmd to pick up that we
are running for an application.
-->
<target name="find-cmd-in-path" unless="cmd.dir">
<exec executable="sencha"
dir="${basedir}"
failifexecutionfails="false"
outputproperty="exec.error">
<arg value="which"/>
<arg value="-p=cmd.dir"/>
<arg value="-o=$cmddir$"/>
</exec>
<!-- Now read the generated properties file and delete it -->
<property file="$cmddir$"/>
<delete file="$cmddir$"/>
</target>
<!--
Run "sencha which" again, similar to the above target, but explicitly check
for the 'SENCHA_CMD' environment variable to have been set, in case sencha
cmd isn't on the current path settings for the user
-->
<target name="find-cmd-in-environment" unless="cmd.dir">
<exec executable="${env.SENCHA_CMD}/sencha"
dir="${basedir}"
failifexecutionfails="false">
<arg value="which"/>
<arg value="-p=cmd.dir"/>
<arg value="-o=$cmddir$"/>
</exec>
<property file="$cmddir$"/>
<delete file="$cmddir$"/>
</target>
<!--
== Mac OSX launchd fix ==
create a child shell process that will source in ~/.bash_profile
and then attempt to call 'sencha which' with the current user's
shell profile settings. sencha which will create a properties file
that can then be loaded into this (the parent) process.
This allows ant integrations in IDE's like netbeans or eclipse to properly
locate Sencha Cmd, even if the IDE was launched via launchd (Finder)
-->
<target name="find-cmd-in-shell" unless="cmd.dir">
<delete quiet="true" file="$cmddir$"/>
<echo file="tmp.sh"> source ~/.bash_profile; sencha which -p cmd.dir -o '$cmddir$'</echo>
<exec executable="/bin/sh"><arg value="tmp.sh"/></exec>
<property file="$cmddir$"/>
<delete file="tmp.sh"/>
<delete file="$cmddir$"/>
</target>
</project>

View File

@ -0,0 +1,214 @@
<project name="init-impl">
<!--
Init-Local
-->
<target name="-before-init-local"/>
<target name="-init-local">
<!--
${basedir} is actually the basedir of build.xml, in the app root
so this imports ${app.dir}/local.properties, if present
-->
<property file="${basedir}/local.properties"/>
<!--
This will traverse upwards in the file system, starting at the
app root directory, looking for the workspace. Once found,
${workspace.dir}/local.properties will be imported into this
project
-->
<script language="javascript">
<![CDATA[
var f = new java.io.File(project.getProperty("basedir"));
var sub = ".sencha/workspace/sencha.cfg";
for (var p = f; p; p = p.getParentFile()) {
var t = new java.io.File(p, sub);
if (t.exists()) {
// we found the workspace folder!
t = new java.io.File(p, "local.properties");
if (t.exists()) {
var loader = project.createTask("property");
loader.setFile(new java.io.File(t.getCanonicalPath()));
loader.execute();
}
break;
}
}
]]>
</script>
</target>
<target name="-after-init-local"/>
<target name="init-local"
depends="-before-init-local,-init-local,-after-init-local"/>
<target name="-before-init"/>
<target name="-init" unless="internal.x-sencha-initialized">
<!--
Now, apply various project updates, such as ant class loader path
updates, as well as loading Sencha Cmd config system properties
into ant property space
-->
<x-sencha-init prefix=""/>
<!--
default the build environment to production if it is unset by this point
-->
<property name="build.environment" value="production"/>
<property name="CR" value="&#10;"/>
<x-load-properties>
<!-- Load user-defined properties for environment then general: -->
<file path="${app.config.dir}/${build.environment}.properties" required="false"/>
<file path="${app.config.dir}/build.properties" required="false"/>
<!-- Pick up the defaults by framework/environment followed by general: -->
<file path="${app.config.dir}/${framework.name}.properties" required="true"/>
<file path="${app.config.dir}/${build.environment}.defaults.properties" required="true"/>
<file path="${app.config.dir}/defaults.properties" required="true"/>
</x-load-properties>
<!--
calculate the appropriate build.compression value
-->
<condition property="build.compression" value="-yui">
<x-is-true value="${build.compression.yui}"/>
</condition>
<condition property="build.compression" value="-closure">
<x-is-true value="${build.compression.closure}"/>
</condition>
<condition property="build.compression" value="-uglify">
<x-is-true value="${build.compression.uglify}"/>
</condition>
<property name="build.compression" value=""/>
<x-verify-app-cmd-ver/>
<!--
this id string is used to share a common compiler instance
for all x-compile calls in this project
-->
<property name="compiler.ref.id" value="app-compiler"/>
<!--
this property is set indicating we've reached the end of the
core init phase. it's presence will indicate that we've already
executed this target, and will bypass firing the init code
repeatedly in sub projects (antcall, x-ant-call)
See the above 'unless' attribute on the -init target
-->
<property name="internal.x-sencha-initialized" value="true"/>
</target>
<target name="-after-init"/>
<target name="-before-init-defaults"/>
<target name="-init-defaults">
<!--
This property can be modified to change general build options
such as excluding files from the set. The format expects newlines
for each argument, for example:
<property name="build.operations"/>
exclude
-namespace=Ext
</property>
-->
<property name="build.operations" value=""/>
<!--
This property can be modified to change concatenation
specific options
-strip-comments: comment suppression
-remove-text-references: transform string literal class references to objects
-beautify: unpack the source
<property name="build.concat.options"/>
-strip-comments
-remove-text-references
-beautify
</property>
-->
<property name="build.concat.options" value=""/>
<!--
This property can be modified to change page compilation options
-scripts: inject the given script path into the generated markup ahead of the all classes file
<property name="build.page.options"/>
-scripts=framework.js
</property>
-->
<property name="build.page.options" value=""/>
</target>
<target name="-after-init-defaults"/>
<!--
Initializes the compiler instances, reading in the app.json and package.json
definitions, as well as scanning and parsing all js files found on the
various classpath entries for the framework, workspace, packages, and app
-->
<target name="-init-compiler" depends="-init">
<condition property="internal.app.css.rel" value="${app.out.css.rel}">
<x-is-true value="${enable.ext42.themes}"/>
</condition>
<property name="internal.app.css.rel" value=""/>
<x-compile refid="${compiler.ref.id}"
dir="${app.dir}"
initOnly="true"
inheritAll="true">
<![CDATA[
# base build command
-tempDir=${build.compile.temp.dir}
-keepTempDir=${build.compile.temp.dir.keep}
-options=${build.options}
load-app
-frameworkFile=${build.framework.name}
-jsBundleFile=${build.classes.name}
-cssBundleFile=${internal.app.css.rel}
-tempDir=${build.app.temp.dir}
-tag=${build.tag.name}
and
restore
${build.tag.name}
and
meta
+packages
-out=${build.out.package.versions}
and
classpath
-path=${build.out.package.versions}
-name=framework
and
require
-source=@${build.tag.name}
-requires=@overrides
-allow-unmet=true
and
require
-scopeName=framework
-source=Ext.util.Observable
-requires=${build.out.package.versions}
-allow-unmet=false
and
union
-recursive
-tag=${build.tag.name}
and
save
${build.tag.name}-overrides
and
${build.operations}
and
save
page
]]>
</x-compile>
</target>
</project>

View File

@ -0,0 +1,78 @@
<project name="js-impl">
<!--
this target extracts split mode information from the compiler's app
processor to determine various pieces of information
-->
<target name="-detect-app-build-properties"
depends="-init-compiler">
<x-load-app-builder-properties
refid="${compiler.ref.id}"
splitModePropName="enable.split.mode"
pageModePropName="app.page.mode"/>
</target>
<!--
this is the standard js compile target that builds the output js file(s)
-->
<target name="-compile-js" depends="-detect-app-build-properties">
<if>
<x-is-true value="${enable.split.mode}"/>
<then>
<x-compile refid="${compiler.ref.id}">
<![CDATA[
# build a separate sdk-only js file
union
-tag=package-sencha-core,framework
and
${build.optimize}
and
concat
${build.compression}
-out=${build.framework.file}
${build.concat.options}
# now build the all-classes file, without
# the framework code included
and
restore
page
and
exclude
-tag=framework,package-sencha-core
and
${build.optimize}
and
concat
${build.compression}
-out=${build.classes.file}
${build.concat.options}
]]>
</x-compile>
</then>
<else>
<x-compile refid="${compiler.ref.id}">
<![CDATA[
# build an all-classes.js file that contains
# all code needed by the app
restore
page
and
${build.optimize}
and
concat
${build.compression}
-out=${build.classes.file}
${build.concat.options}
]]>
</x-compile>
</else>
</if>
</target>
<!--
Build javascript
-->
<target name="-before-js"/>
<target name="-js" depends="-compile-js"/>
<target name="-after-js"/>
</project>

View File

@ -0,0 +1,189 @@
/**
* Sencha Blink - Development
* @author Jacky Nguyen <jacky@sencha.com>
*/
(function() {
var head = document.head || document.getElementsByTagName('head')[0];
function write(content) {
document.write(content);
}
function addMeta(name, content) {
var meta = document.createElement('meta');
meta.setAttribute('name', name);
meta.setAttribute('content', content);
head.appendChild(meta);
}
var xhr = new XMLHttpRequest();
xhr.open('GET', 'bootstrap.json', false);
xhr.send(null);
var options = eval("(" + xhr.responseText + ")"),
scripts = options.js || [],
styleSheets = options.css || [],
i, ln, path, platform, theme, exclude;
if(options.platform && options.platforms && options.platforms[options.platform] && options.platforms[options.platform].js) {
scripts = options.platforms[options.platform].js.concat(scripts);
}
if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
var msViewportStyle = document.createElement("style");
msViewportStyle.appendChild(
document.createTextNode(
"@media screen and (orientation: portrait) {" +
"@-ms-viewport {width: 320px !important;}" +
"}" +
"@media screen and (orientation: landscape) {" +
"@-ms-viewport {width: 560px !important;}" +
"}"
)
);
document.getElementsByTagName("head")[0].appendChild(msViewportStyle);
}
addMeta('viewport', 'width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no');
addMeta('apple-mobile-web-app-capable', 'yes');
addMeta('apple-touch-fullscreen', 'yes');
if (!window.Ext) {
window.Ext = {};
}
Ext.microloaded = true;
var filterPlatform = window.Ext.filterPlatform = function(platform) {
var profileMatch = false,
ua = navigator.userAgent,
j, jln;
platform = [].concat(platform);
function isPhone(ua) {
var isMobile = /Mobile(\/|\s)/.test(ua);
// Either:
// - iOS but not iPad
// - Android 2
// - Android with "Mobile" in the UA
return /(iPhone|iPod)/.test(ua) ||
(!/(Silk)/.test(ua) && (/(Android)/.test(ua) && (/(Android 2)/.test(ua) || isMobile))) ||
(/(BlackBerry|BB)/.test(ua) && isMobile) ||
/(Windows Phone)/.test(ua);
}
function isTablet(ua) {
return !isPhone(ua) && (/iPad/.test(ua) || /Android|Silk/.test(ua) || /(RIM Tablet OS)/.test(ua) ||
(/MSIE 10/.test(ua) && /; Touch/.test(ua)));
}
// Check if the ?platform parameter is set in the URL
var paramsString = window.location.search.substr(1),
paramsArray = paramsString.split("&"),
params = {},
testPlatform, i;
for (i = 0; i < paramsArray.length; i++) {
var tmpArray = paramsArray[i].split("=");
params[tmpArray[0]] = tmpArray[1];
}
testPlatform = params.platform;
if (testPlatform) {
return platform.indexOf(testPlatform) != -1;
}
for (j = 0, jln = platform.length; j < jln; j++) {
switch (platform[j]) {
case 'phone':
profileMatch = isPhone(ua);
break;
case 'tablet':
profileMatch = isTablet(ua);
break;
case 'desktop':
profileMatch = !isPhone(ua) && !isTablet(ua);
break;
case 'ios':
profileMatch = /(iPad|iPhone|iPod)/.test(ua);
break;
case 'android':
profileMatch = /(Android|Silk)/.test(ua);
break;
case 'blackberry':
profileMatch = /(BlackBerry|BB)/.test(ua);
break;
case 'safari':
profileMatch = /Safari/.test(ua) && !(/(BlackBerry|BB)/.test(ua));
break;
case 'chrome':
profileMatch = /Chrome/.test(ua);
break;
case 'ie10':
profileMatch = /MSIE 10/.test(ua);
break;
case 'windows':
profileMatch = /MSIE 10/.test(ua) || /Trident/.test(ua);
break;
case 'tizen':
profileMatch = /Tizen/.test(ua);
break;
case 'firefox':
profileMatch = /Firefox/.test(ua);
}
if (profileMatch) {
return true;
}
}
return false;
};
for (i = 0,ln = styleSheets.length; i < ln; i++) {
path = styleSheets[i];
if (typeof path != 'string') {
platform = path.platform;
exclude = path.exclude;
theme = path.theme;
path = path.path;
}
if (platform) {
if (!filterPlatform(platform) || filterPlatform(exclude)) {
continue;
}
if(!Ext.theme) {
Ext.theme = {};
}
if(!Ext.theme.name) {
Ext.theme.name = theme || 'Default';
}
}
write('<link rel="stylesheet" href="'+path+'">');
}
for (i = 0,ln = scripts.length; i < ln; i++) {
path = scripts[i];
if (typeof path != 'string') {
platform = path.platform;
exclude = path.exclude;
path = path.path;
}
if (platform) {
if (!filterPlatform(platform) || filterPlatform(exclude)) {
continue;
}
}
write('<script src="'+path+'"></'+'script>');
}
})();

View File

@ -0,0 +1,788 @@
/**
* Sencha Blink
* @author Jacky Nguyen <jacky@sencha.com>
*/
(function(global) {
var emptyFn = function(){},
callbacks = [],
doc = global.document,
head = doc.head || doc.getElementsByTagName('head')[0],
addWindowListener = global.addEventListener,
removeWindowListener = global.removeEventListener,
jsonParse = JSON.parse,
a = doc.createElement('a'),
documentLocation = doc.location,
documentUri = documentLocation.protocol + '//' + documentLocation.hostname + documentLocation.pathname + documentLocation.search,
manifestFile = 'app.json',
isRefreshing = false,
activeManifest, appCache, storage;
try {
storage = global.localStorage;
appCache = global.applicationCache;
}
catch(e) {}
function getManifestStorageKey(id) {
return id + '-' + documentUri + manifestFile;
}
function Manifest(manifest) {
var manifestContent;
if (typeof manifest == 'string') {
manifestContent = manifest;
manifest = jsonParse(manifestContent);
}
else {
manifestContent = JSON.stringify(manifest);
}
var applicationId = manifest.id,
key = getManifestStorageKey(applicationId),
assetMap = {};
function processAsset(asset) {
var uri;
if (typeof asset == 'string') {
asset = {
path: asset
};
}
if (asset.shared) {
asset.version = asset.shared;
uri = asset.shared + asset.path;
}
else {
uri = toAbsoluteUri(asset.path);
}
asset.uri = uri;
asset.key = applicationId + '-' + uri;
assetMap[uri] = asset;
return asset;
}
function processAssets(assets, type) {
var ln = assets.length,
i, asset;
for (i = 0; i < ln; i++) {
asset = assets[i];
assets[i] = asset = processAsset(asset);
asset.type = type;
asset.index = i;
asset.collection = assets;
asset.ready = false;
asset.evaluated = false;
}
return assets;
}
this.key = key;
this.css = processAssets(manifest.css, 'css');
this.js = processAssets(manifest.js, 'js');
Ext.microloaded = true;
var filterPlatform = window.Ext.filterPlatform = function(platform) {
var profileMatch = false,
ua = navigator.userAgent,
j, jln;
platform = [].concat(platform);
function isPhone(ua) {
var isMobile = /Mobile(\/|\s)/.test(ua);
// Either:
// - iOS but not iPad
// - Android 2
// - Android with "Mobile" in the UA
return /(iPhone|iPod)/.test(ua) ||
(!/(Silk)/.test(ua) && (/(Android)/.test(ua) && (/(Android 2)/.test(ua) || isMobile))) ||
(/(BlackBerry|BB)/.test(ua) && isMobile) ||
/(Windows Phone)/.test(ua);
}
function isTablet(ua) {
return !isPhone(ua) && (/iPad/.test(ua) || /Android|Silk/.test(ua) || /(RIM Tablet OS)/.test(ua) ||
(/MSIE 10/.test(ua) && /; Touch/.test(ua)));
}
// Check if the ?platform parameter is set in the URL
var paramsString = window.location.search.substr(1),
paramsArray = paramsString.split("&"),
params = {},
testPlatform, i;
for (i = 0; i < paramsArray.length; i++) {
var tmpArray = paramsArray[i].split("=");
params[tmpArray[0]] = tmpArray[1];
}
testPlatform = params.platform;
if (testPlatform) {
return platform.indexOf(testPlatform) != -1;
}
for (j = 0, jln = platform.length; j < jln; j++) {
switch (platform[j]) {
case 'phone':
profileMatch = isPhone(ua);
break;
case 'tablet':
profileMatch = isTablet(ua);
break;
case 'desktop':
profileMatch = !isPhone(ua) && !isTablet(ua);
break;
case 'ios':
profileMatch = /(iPad|iPhone|iPod)/.test(ua);
break;
case 'android':
profileMatch = /(Android|Silk)/.test(ua);
break;
case 'blackberry':
profileMatch = /(BlackBerry|BB)/.test(ua);
break;
case 'safari':
profileMatch = /Safari/.test(ua) && !(/(BlackBerry|BB)/.test(ua));
break;
case 'chrome':
profileMatch = /Chrome/.test(ua);
break;
case 'ie10':
profileMatch = /MSIE 10/.test(ua);
break;
case 'windows':
profileMatch = /MSIE 10/.test(ua) || /Trident/.test(ua);
break;
case 'tizen':
profileMatch = /Tizen/.test(ua);
break;
case 'firefox':
profileMatch = /Firefox/.test(ua);
}
if (profileMatch) {
return true;
}
}
return false;
};
this.css = this.css.filter(function(css) {
var platform = css.platform,
exclude = css.exclude;
css.type = "css";
if (platform) {
if (filterPlatform(platform) && !filterPlatform(exclude)) {
if(!Ext.theme) {
Ext.theme = {};
}
if(!Ext.theme.name) {
Ext.theme.name = css.theme || 'Default';
}
return true;
}
css.filtered = true;
return false;
}
return true;
});
this.js = this.js.filter(function(js) {
var platform = js.platform,
exclude = js.exclude;
js.type = "js";
if (platform) {
if (filterPlatform(platform) && !filterPlatform(exclude)) {
return true;
}
else {
js.filtered = true;
return false;
}
}
return true;
});
this.assets = this.css.concat(this.js);
this.getAsset = function(uri) {
return assetMap[uri];
};
this.store = function() {
store(key, manifestContent);
};
}
if (typeof global.Ext === 'undefined') {
var Ext = global.Ext = {};
}
function toAbsoluteUri(uri) {
a.href = uri;
return a.href;
}
function addMeta(name, content) {
var meta = document.createElement('meta');
meta.setAttribute('name', name);
meta.setAttribute('content', content);
head.appendChild(meta);
}
function request(uri, isShared, onSuccess, onFailure) {
(isShared ? requestIframe : requestXhr)(uri, onSuccess, onFailure);
}
function requestXhr(uri, onSuccess, onFailure) {
var xhr = new XMLHttpRequest();
onFailure = onFailure || emptyFn;
uri = uri + ((uri.indexOf('?') == -1) ? '?' : '&') + Date.now();
try {
xhr.open('GET', uri, true);
xhr.onreadystatechange = function() {
if (xhr.readyState == 4) {
var status = xhr.status,
content = xhr.responseText;
if ((status >= 200 && status < 300) || status == 304 || (status == 0 && content.length > 0)) {
onSuccess(content);
}
else {
onFailure();
}
}
};
xhr.send(null);
} catch (e) {
onFailure();
}
}
function requestIframe(uri, onSuccess) {
var iframe = doc.createElement('iframe');
callbacks.push({
iframe: iframe,
callback: onSuccess
});
iframe.src = uri + '.html';
iframe.style.cssText = 'width:0;height:0;border:0;position:absolute;z-index:-999;visibility:hidden';
doc.body.appendChild(iframe);
}
// for remote assets, inject a script element
function addRemoteScript(uri, onSuccess, onFailure) {
var script = document.createElement('script');
script.src = uri;
script.type = "text/javascript";
script.charset = "UTF-8";
script.onerror = onFailure;
if ('addEventListener' in script ) {
script.onload = onSuccess;
} else if ('readyState' in script) {
script.onreadystatechange = function() {
if (this.readyState === 'loaded' ||
this.readyState === 'complete') {
onSuccess();
}
};
} else {
script.onload = onSuccess;
}
head.appendChild(script);
}
function addRemoteLink(uri) {
var link = document.createElement('link');
link.rel = "stylesheet";
link.href = uri;
head.appendChild(link);
}
function requestAsset(asset, onSuccess, onFailure) {
var isRemote = !!asset.remote,
isShared = !!asset.shared;
if (isRemote) {
if(asset.type === "js") {
addRemoteScript(asset.uri, function(){
onSuccess('');
}, onFailure);
} else {
addRemoteLink(asset.uri);
onSuccess('');
}
return;
}
if (!isShared && asset.version && asset.version.length) {
var onRequestSuccess = onSuccess,
version = asset.version,
versionLn = version.length,
checksumFail, checksumType;
onSuccess = function(content) {
checksumType = content.substring(0, 1);
if (checksumType == '/') {
if (content.substring(2, versionLn + 2) !== version) {
checksumFail = true;
}
}
else if (checksumType == 'f') {
if (content.substring(10, versionLn + 10) !== version) {
checksumFail = true;
}
}
else if (checksumType == '.') {
if (content.substring(1, versionLn + 1) !== version) {
checksumFail = true;
}
}
if (checksumFail === true) {
if (confirm("Requested: '" + asset.uri + " seems to have been changed. Attempt to refresh the application?")) {
refresh();
}
return;
}
onRequestSuccess(content);
};
}
request(asset.uri, isShared, onSuccess, onFailure);
}
function onMessage(e) {
var data = e.data,
sourceWindow = e.source.window,
i, ln, callback, iframe;
for (i = 0, ln = callbacks.length; i < ln; i++) {
callback = callbacks[i];
iframe = callback.iframe;
if (iframe.contentWindow === sourceWindow) {
callback.callback(data);
doc.body.removeChild(iframe);
callbacks.splice(i, 1);
return;
}
}
}
function patch(content, delta) {
var output = [],
chunk, i, ln;
if (delta.length === 0) {
return content;
}
for (i = 0,ln = delta.length; i < ln; i++) {
chunk = delta[i];
if (typeof chunk === 'number') {
output.push(content.substring(chunk, chunk + delta[++i]));
}
else {
output.push(chunk);
}
}
return output.join('');
}
function log(message) {
if (typeof console != 'undefined') {
(console.error || console.log).call(console, message);
}
}
function store(key, value) {
try {
storage.setItem(key, value);
}
catch (e) {
if (storage && e.code == e.QUOTA_EXCEEDED_ERR && activeManifest) {
log("LocalStorage Quota exceeded, cannot store " + key + " locally");
// Quota exceeded, clean up unused items
// var items = activeManifest.assets.map(function(asset) {
// return asset.key;
// }),
// i = 0,
// ln = storage.length,
// cleaned = false,
// item;
//
// items.push(activeManifest.key);
//
// while (i <= ln - 1) {
// item = storage.key(i);
//
// if (items.indexOf(item) == -1) {
// storage.removeItem(item);
// cleaned = true;
// ln--;
// }
// else {
// i++;
// }
// }
// Done cleaning up, attempt to store the value again
// If there's still not enough space, no other choice
// but to skip this item from being stored
// if (cleaned) {
// store(key, value);
// }
}
}
}
function retrieve(key) {
try {
return storage.getItem(key);
}
catch (e) {
// Private browsing mode
return null;
}
}
function retrieveAsset(asset) {
return retrieve(asset.key);
}
function storeAsset(asset, content) {
return store(asset.key, content);
}
function refresh() {
if (!isRefreshing) {
isRefreshing = true;
requestXhr(manifestFile, function(content) {
new Manifest(content).store();
global.location.reload();
});
}
}
function blink(currentManifest) {
var currentAssets = currentManifest.assets,
assetsCount = currentAssets.length,
newManifest;
activeManifest = currentManifest;
addWindowListener('message', onMessage, false);
function onAssetReady(asset, content) {
var assets = asset.collection,
index = asset.index,
ln = assets.length,
i;
asset.ready = true;
asset.content = content;
for (i = index - 1; i >= 0; i--) {
asset = assets[i];
if (!asset.filtered && (!asset.ready || !asset.evaluated)) {
return;
}
}
for (i = index; i < ln; i++) {
asset = assets[i];
if (asset.ready) {
if (!asset.evaluated) {
evaluateAsset(asset);
}
}
else {
return;
}
}
}
function evaluateAsset(asset) {
asset.evaluated = true;
if (asset.type == 'js') {
try {
eval(asset.content);
}
catch (e) {
log("Error evaluating " + asset.uri + " with message: " + e);
}
}
else {
var style = doc.createElement('style'),
base;
style.type = 'text/css';
style.textContent = asset.content;
if ('id' in asset) {
style.id = asset.id;
}
if ('disabled' in asset) {
style.disabled = asset.disabled;
}
base = document.createElement('base');
base.href = asset.path.replace(/\/[^\/]*$/, '/');
head.appendChild(base);
head.appendChild(style);
head.removeChild(base);
}
delete asset.content;
if (--assetsCount == 0) {
onReady();
}
}
function onReady() {
var updatingAssets = [],
appCacheReady = false,
onAppCacheIdle = function() {},
onAppCacheReady = function() {
appCache.swapCache();
appCacheReady = true;
onAppCacheIdle();
},
updatingCount;
removeWindowListener('message', onMessage, false);
if (appCache.status == appCache.UPDATEREADY) {
onAppCacheReady();
}
else if (appCache.status == appCache.CHECKING || appCache.status == appCache.DOWNLOADING) {
appCache.onupdateready = onAppCacheReady;
appCache.onnoupdate = appCache.onobsolete = function() {
onAppCacheIdle();
};
}
function notifyUpdateIfAppCacheReady() {
if (appCacheReady) {
notifyUpdate();
}
}
function notifyUpdate() {
var updatedCallback = Ext.onUpdated || emptyFn;
if ('onSetup' in Ext) {
Ext.onSetup(updatedCallback);
}
else {
updatedCallback();
}
}
function doUpdate() {
newManifest.store();
updatingAssets.forEach(function(asset) {
storeAsset(asset, asset.content);
});
notifyUpdate();
}
function onAssetUpdated(asset, content) {
asset.content = content;
if (--updatingCount == 0) {
if (appCache.status == appCache.IDLE) {
doUpdate();
}
else {
onAppCacheIdle = doUpdate;
}
}
}
function checkForUpdate() {
removeWindowListener('online', checkForUpdate, false);
requestXhr(manifestFile, function(manifestContent) {
activeManifest = newManifest = new Manifest(manifestContent);
var assets = newManifest.assets,
currentAsset;
assets.forEach(function(asset) {
currentAsset = currentManifest.getAsset(asset.uri);
if (!currentAsset || asset.version !== currentAsset.version) {
updatingAssets.push(asset);
}
});
updatingCount = updatingAssets.length;
if (updatingCount == 0) {
if (appCache.status == appCache.IDLE) {
notifyUpdateIfAppCacheReady();
}
else {
onAppCacheIdle = notifyUpdateIfAppCacheReady;
}
return;
}
updatingAssets.forEach(function(asset) {
var currentAsset = currentManifest.getAsset(asset.uri),
path = asset.path,
update = asset.update;
function updateFull() {
requestAsset(asset, function(content) {
onAssetUpdated(asset, content);
});
}
// New asset (never used before)
// OR Shared from CDN
// OR Missing local storage
// OR Full update
if (!currentAsset || !update || retrieveAsset(asset) === null || update != 'delta') {
updateFull();
}
else {
requestXhr('deltas/' + path + '/' + currentAsset.version + '.json',
function(content) {
try {
onAssetUpdated(asset, patch(retrieveAsset(asset), jsonParse(content)));
}
catch (e) {
log("Malformed delta content received for " + asset.uri);
}
},
updateFull
);
}
})
});
}
if (navigator.onLine !== false) {
checkForUpdate();
}
else {
addWindowListener('online', checkForUpdate, false);
}
}
if (assetsCount == 0) {
onReady();
return;
}
currentAssets.forEach(function(asset) {
var content = retrieveAsset(asset);
if (content === null) {
requestAsset(asset, function(content) {
if (!asset.remote) {
storeAsset(asset, content);
}
onAssetReady(asset, content);
}, function() {
onAssetReady(asset, '');
});
}
else {
onAssetReady(asset, content);
}
});
}
function blinkOnDomReady(manifest) {
if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
var msViewportStyle = document.createElement("style");
msViewportStyle.appendChild(
document.createTextNode(
"@media screen and (orientation: portrait) {" +
"@-ms-viewport {width: 320px !important;}" +
"}" +
"@media screen and (orientation: landscape) {" +
"@-ms-viewport {width: 560px !important;}" +
"}"
)
);
document.getElementsByTagName("head")[0].appendChild(msViewportStyle);
}
var readyStateRe = (/MSIE 10/.test(navigator.userAgent)) ? /complete|loaded/ : /interactive|complete|loaded/;
if (doc.readyState.match(readyStateRe) !== null) {
blink(manifest);
}
else {
addWindowListener('DOMContentLoaded', function() {
if (navigator.standalone) {
// When running from Home Screen, the splash screen will not disappear until all
// external resource requests finish.
// The first timeout clears the splash screen
// The second timeout allows inital HTML content to be displayed
setTimeout(function() {
setTimeout(function() {
blink(manifest);
}, 1);
}, 1);
}
else {
setTimeout(function() {
blink(manifest);
}, 1);
}
}, false);
}
}
Ext.blink = function(manifest) {
var manifestContent = retrieve(getManifestStorageKey(manifest.id));
addMeta('viewport', 'width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no');
addMeta('apple-mobile-web-app-capable', 'yes');
addMeta('apple-touch-fullscreen', 'yes');
if (manifestContent) {
manifest = new Manifest(manifestContent);
blinkOnDomReady(manifest);
}
else {
requestXhr(manifestFile, function(content) {
manifest = new Manifest(content);
manifest.store();
blinkOnDomReady(manifest);
});
}
};
})(this);

View File

@ -0,0 +1,180 @@
/**
* Sencha Blink - Testing
* @author Jacky Nguyen <jacky@sencha.com>
*/
(function(global) {
var head = global.document.head || global.document.getElementsByTagName('head')[0],
Ext = global.Ext;
if (typeof Ext == 'undefined') {
global.Ext = Ext = {};
}
function write(content) {
document.write(content);
}
function addMeta(name, content) {
var meta = document.createElement('meta');
meta.setAttribute('name', name);
meta.setAttribute('content', content);
head.appendChild(meta);
}
Ext.blink = function(options) {
var scripts = options.js || [],
styleSheets = options.css || [],
i, ln, path, platform, theme, exclude;
if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
var msViewportStyle = document.createElement("style");
msViewportStyle.appendChild(
document.createTextNode(
"@media screen and (orientation: portrait) {" +
"@-ms-viewport {width: 320px !important;}" +
"}" +
"@media screen and (orientation: landscape) {" +
"@-ms-viewport {width: 560px !important;}" +
"}"
)
);
document.getElementsByTagName("head")[0].appendChild(msViewportStyle);
}
addMeta('viewport', 'width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no');
addMeta('apple-mobile-web-app-capable', 'yes');
addMeta('apple-touch-fullscreen', 'yes');
Ext.microloaded = true;
var filterPlatform = window.Ext.filterPlatform = function(platform) {
var profileMatch = false,
ua = navigator.userAgent,
j, jln;
platform = [].concat(platform);
function isPhone(ua) {
var isMobile = /Mobile(\/|\s)/.test(ua);
// Either:
// - iOS but not iPad
// - Android 2
// - Android with "Mobile" in the UA
return /(iPhone|iPod)/.test(ua) ||
(!/(Silk)/.test(ua) && (/(Android)/.test(ua) && (/(Android 2)/.test(ua) || isMobile))) ||
(/(BlackBerry|BB)/.test(ua) && isMobile) ||
/(Windows Phone)/.test(ua);
}
function isTablet(ua) {
return !isPhone(ua) && (/iPad/.test(ua) || /Android|Silk/.test(ua) || /(RIM Tablet OS)/.test(ua) ||
(/MSIE 10/.test(ua) && /; Touch/.test(ua)));
}
// Check if the ?platform parameter is set in the URL
var paramsString = window.location.search.substr(1),
paramsArray = paramsString.split("&"),
params = {},
testPlatform, i;
for (i = 0; i < paramsArray.length; i++) {
var tmpArray = paramsArray[i].split("=");
params[tmpArray[0]] = tmpArray[1];
}
testPlatform = params.platform;
if (testPlatform) {
return platform.indexOf(testPlatform) != -1;
}
for (j = 0, jln = platform.length; j < jln; j++) {
switch (platform[j]) {
case 'phone':
profileMatch = isPhone(ua);
break;
case 'tablet':
profileMatch = isTablet(ua);
break;
case 'desktop':
profileMatch = !isPhone(ua) && !isTablet(ua);
break;
case 'ios':
profileMatch = /(iPad|iPhone|iPod)/.test(ua);
break;
case 'android':
profileMatch = /(Android|Silk)/.test(ua);
break;
case 'blackberry':
profileMatch = /(BlackBerry|BB)/.test(ua);
break;
case 'safari':
profileMatch = /Safari/.test(ua) && !(/(BlackBerry|BB)/.test(ua));
break;
case 'chrome':
profileMatch = /Chrome/.test(ua);
break;
case 'ie10':
profileMatch = /MSIE 10/.test(ua);
break;
case 'windows':
profileMatch = /MSIE 10/.test(ua) || /Trident/.test(ua);
break;
case 'tizen':
profileMatch = /Tizen/.test(ua);
break;
case 'firefox':
profileMatch = /Firefox/.test(ua);
}
if (profileMatch) {
return true;
}
}
return false;
};
for (i = 0,ln = styleSheets.length; i < ln; i++) {
path = styleSheets[i];
if (typeof path != 'string') {
platform = path.platform;
exclude = path.exclude;
theme = path.theme;
path = path.path;
}
if (platform) {
if (!filterPlatform(platform) || filterPlatform(exclude)) {
continue;
}
if(!Ext.theme) {
Ext.theme = {};
}
if(!Ext.theme.name) {
Ext.theme.name = theme || 'Default';
}
}
write('<link rel="stylesheet" href="'+path+'">');
}
for (i = 0,ln = scripts.length; i < ln; i++) {
path = scripts[i];
if (typeof path != 'string') {
platform = path.platform;
exclude = path.exclude;
path = path.path;
}
if (platform) {
if (!filterPlatform(platform) || filterPlatform(exclude)) {
continue;
}
}
write('<script src="'+path+'"></'+'script>');
}
}
})(this);

View File

@ -0,0 +1,28 @@
# =============================================================================
# This file defines default property values that apply to the "native" build
# environment.
#
# Please use native.properties to customize these properties unless you want
# your customizations to be for all environments. In that case, you can instead
# override these properties in build.properties.
#
# The properties defined in this file take priority over defaults.properties
# but are lower priority than build.properties which in turn is lower priority
# than native.properties.
#
# IMPORTANT - This file should not be modified by an app as it is overwritten
# during each app upgrade.
# =============================================================================
build.options.logger=no
build.options.debug=false
# enable yui compression
build.compression.yui=1
enable.standalone.manifest=true
app.microloader.name=testing.js
skip.native-package=false

View File

@ -0,0 +1,8 @@
# =============================================================================
# This file provides an override point for default variables defined in
# native.defaults.properties. These properties are only imported when building
# for the "native" environment.
#
# Properties defined in this file take priority over build.properties but are
# only loaded for "native" builds.
# =============================================================================

View File

@ -0,0 +1,27 @@
# =============================================================================
# This file defines default property values that apply to the "package" build
# environment.
#
# Please use package.properties to customize these properties unless you want
# your customizations to be for all environments. In that case, you can instead
# override these properties in build.properties.
#
# The properties defined in this file take priority over defaults.properties
# but are lower priority than build.properties which in turn is lower priority
# than package.properties.
#
# IMPORTANT - This file should not be modified by an app as it is overwritten
# during each app upgrade.
#
# NOTE: This use of "package" applies to native packaged application, not a
# Package in the general since of code libraries.
# =============================================================================
build.options.logger=no
build.options.debug=false
# enable yui compression
build.compression.yui=1
app.microloader.name=testing.js

View File

@ -0,0 +1,11 @@
# =============================================================================
# This file provides an override point for default variables defined in
# package.defaults.properties. These properties are only imported when building
# for the "package" environment.
#
# Properties defined in this file take priority over build.properties but are
# only loaded for "package" builds.
#
# NOTE: This use of "package" applies to native packaged application, not a
# Package in the general since of code libraries.
# =============================================================================

View File

@ -0,0 +1,127 @@
<project name="packager-impl">
<macrodef name="x-run-mobile-packager">
<attribute name="configfile"/>
<attribute name="action"/>
<sequential>
<echo>Running mobile packager action @{action} on file @{configFile}</echo>
<x-sencha-command dir="${app.dir}" inheritall="true">
<![CDATA[
app
package
@{action}
-path=@{configfile}
]]>
</x-sencha-command>
</sequential>
</macrodef>
<macrodef name="x-run-mobile-packager-config">
<attribute name="config"/>
<attribute name="run" default="${args.autorun}"/>
<sequential>
<if>
<not>
<available file="@{config}"/>
</not>
<then>
<!--
if the input packager config file for stbuild is
not available, then create it
-->
<echo><![CDATA[
Creating default mobile packager config file at :
@{config}
]]></echo>
<x-run-mobile-packager
configfile="@{config}"
action="generate"/>
</then>
</if>
<local name="local.build.mobile.out.dir"/>
<local name="local.build.mobile.config.name"/>
<!--
append the current config file name to the output directory
for mobile packages. this allows multiple config outputs to
be sandboxed by the name of the config file in the mobile
package output directory.
-->
<basename file="@{config}" property="local.build.mobile.config.name"/>
<property name="local.build.mobile.out.dir"
value="${build.mobile.packager.out.dir}/${local.build.mobile.config.name}"/>
<!--
duplicate the config file, so that we can set the
input and output properties w/o losing comment blocks
-->
<x-set-json-property file="@{config}"
tofile="${build.mobile.packager.temp.file}">
<property name="inputPath"
value="${build.mobile.packager.in.dir}"/>
<property name="outputPath"
value="${local.build.mobile.out.dir}"/>
</x-set-json-property>
<echo><![CDATA[
Processing Mobile Packager config file
config: @{config}
inputPath: ${build.mobile.packager.in.dir}
outputPath: ${local.build.mobile.out.dir}
]]></echo>
<local name="mobile.packager.platform"/>
<x-load-properties file="${build.mobile.packager.temp.file}"
prefix="mobile.packager"
required="true"/>
<if>
<contains string="${mobile.packager.platform}" substring="iOS"/>
<then>
<copy todir="${build.dir}">
<fileset dir="${app.dir}/resources/icons" includes="**/*"/>
<fileset dir="${app.dir}/resources/loading" includes="**/*"/>
</copy>
</then>
</if>
<local name="build.mobile.action"/>
<condition property="build.mobile.action" value="run">
<x-is-true value="@{run}"/>
</condition>
<property name="build.mobile.action" value="build"/>
<x-run-mobile-packager
configFile="${build.mobile.packager.temp.file}"
action="${build.mobile.action}"/>
</sequential>
</macrodef>
<target name="-native-package-mobile">
<if>
<x-is-true value="${args.autorun}"/>
<then>
<echo>Running default mobile packager config.</echo>
<x-run-mobile-packager-config config="${build.mobile.packager.default.file}"
run="true"/>
</then>
<else>
<echo>Building all specified mobile packager configs.</echo>
<for param="configfile" list="${build.mobile.packager.file}">
<sequential>
<x-run-mobile-packager-config config="@{configfile}" run="false"/>
</sequential>
</for>
</else>
</if>
</target>
<target name="-before-native-package"/>
<target name="-native-package"
depends="-native-package-mobile">
</target>
<target name="-after-native-package"/>
</project>

View File

@ -0,0 +1,191 @@
<project name="page-impl.xml">
<target name="-build-output-microload-page">
<if>
<x-is-true value="${build.enable.embedded.manifest}"/>
<then>
<x-compile refid="${compiler.ref.id}">
<![CDATA[
# generate microloader file
microload
-operation=microloader
-microloaderPath=${app.microloader.path}
-tpl=${build.microloader.code.tpl}
-out=${build.microloader.path}
and
# generate json file
microload
-operation=json
-append
-tpl=${build.microloader.json.tpl.embedded}
-out=${build.microloader.path}
]]>
</x-compile>
</then>
<else>
<x-compile refid="${compiler.ref.id}">
<![CDATA[
# generate json file
microload
-operation=json
-tpl=${build.microloader.json.tpl.standalone}
-out=${build.out.json.path}
and
# generate microloader file
microload
-operation=microloader
-microloaderPath=${app.microloader.path}
-tpl=${build.microloader.code.tpl}
-out=${build.microloader.path}
and
microload
-operation=json
-append
-tpl=${build.microloader.json.tpl.external}
-out=${build.microloader.path}
]]>
</x-compile>
</else>
</if>
<if>
<x-is-true value="${build.enable.embedded.microloader}"/>
<then>
<x-sencha-command dir="${app.dir}" inheritall="true">
<![CDATA[
fs
minify
${build.embedded.microloader.compressor}
-from=${build.microloader.path}
-to=${build.microloader.path}
]]>
</x-sencha-command>
<x-compile refid="${compiler.ref.id}">
<![CDATA[
markup
-contentFile=${build.microloader.path}
-tpl=${build.embedded.microloader.tpl}
-out=${build.out.page.path}
]]>
</x-compile>
<!--once the generated microloader file is embedded, delete it-->
<delete file="${build.microloader.path}"/>
</then>
<else>
<x-compile refid="${compiler.ref.id}">
<![CDATA[
markup
-markup=${build.external.microloader.markup}
-out=${build.out.page.path}
]]>
</x-compile>
</else>
</if>
</target>
<!-- generates a separate json manifest for use with native packager -->
<target name="-build-standalone-json-manifest">
<x-run-if-true value="${enable.standalone.manifest}">
<x-compile refid="${compiler.ref.id}">
<![CDATA[
# generate json file
microload
-operation=json
-tpl=${build.microloader.json.tpl.standalone}
-out=${build.out.json.path}
]]>
</x-compile>
</x-run-if-true>
</target>
<target name="-build-output-markup-page">
<condition property="internal.app.css.rel" value="${app.out.css.rel}">
<x-is-true value="${enable.ext42.themes}"/>
</condition>
<property name="internal.app.css.rel" value=""/>
<x-compile refid="${compiler.ref.id}">
<![CDATA[
markup
-out=${build.out.page.path}
]]>
</x-compile>
</target>
<!-- '-detect-app-build-properties' is defined in js-impl.xml -->
<target name="-build-output-page"
depends="-detect-app-build-properties,-build-standalone-json-manifest">
<if>
<x-is-true value="${build.output.markuponly}"/>
<then>
<x-ant-call target="-build-output-markup-page"/>
</then>
<else>
<x-ant-call target="-build-output-microload-page"/>
</else>
</if>
</target>
<target name="-copy-app-resources" depends="-init-compiler">
<if>
<x-is-false value="${build.output.markuponly}"/>
<then>
<x-compile refid="${compiler.ref.id}">
<![CDATA[
app-resources
-compress=${enable.resource.compression}
-out=${build.dir}
]]>
</x-compile>
</then>
</if>
</target>
<target name="-generate-deltas" depends="-init-compiler">
<if>
<and>
<x-is-true value="${enable.deltas}"/>
<x-is-false value="${build.output.markuponly}"/>
</and>
<then>
<x-compile refid="${compiler.ref.id}">
<![CDATA[
deltas
-archivePath=${build.out.archive.path}
-deltaPath=${build.out.delta.path}
-resourcePath=${build.dir}
]]>
</x-compile>
</then>
</if>
</target>
<target name="-generate-cache-manifest" depends="-init-compiler">
<if>
<and>
<x-is-true value="${enable.cache.manifest}"/>
<x-is-false value="${build.output.markuponly}"/>
</and>
<then>
<x-compile refid="${compiler.ref.id}">
<![CDATA[
cache-manifest
-cacheManifestPath=${build.manifest.path}
]]>
</x-compile>
<replace file="${build.out.page.path}"
token="&lt;html manifest=&quot;&quot;"
value="&lt;html manifest=&quot;${build.manifest.name}&quot;"/>
</then>
</if>
</target>
<target name="-before-page"/>
<target name="-page"
depends="-copy-app-resources,
-generate-deltas,
-build-output-page,
-generate-cache-manifest"/>
<target name="-after-page"/>
</project>

View File

@ -0,0 +1,32 @@
<project basedir=".">
<!--
This file can be freely edited, so long as the <import file="plugin-impl.xml"/>
statement is not removed.
One of the purposes of this file is to hook various Sencha Command operations and do
processing before or after the command is processed. To do this, simply provide the
logic in a <target> using one of these names:
-before-generate-app Called before an application is generated
-after-generate-app Called after an application is generated
-before-generate-controller Called before a controller is generated
-after-generate-controller Called after a controller is generated
-before-generate-model Called before a model is generated
-after-generate-model Called after a model is generated
-before-generate-profile Called before a profile is generated
-after-generate-profile Called after a profile is generated
-->
<import file="${workspace.config.dir}/plugin.xml"/>
<!--
<target name="-after-generate-model">
... use ${args.path}, ${args.name} and ${args.fields} as needed ...
</target>
Other targets are similar. There are properties prefixed with "args." and the name of
the command line option that hold the parameters for the command.
-->
</project>

View File

@ -0,0 +1,31 @@
# =============================================================================
# This file defines default property values that apply to the "production" build
# environment.
#
# Please use production.properties to customize these properties unless you want
# your customizations to be for all environments. In that case, you can instead
# override these properties in build.properties.
#
# The properties defined in this file take priority over defaults.properties
# but are lower priority than build.properties which in turn is lower priority
# than production.properties.
#
# IMPORTANT - This file should not be modified by an app as it is overwritten
# during each app upgrade.
# =============================================================================
build.options.logger=no
build.options.debug=false
enable.deltas=true
enable.cache.manifest=true
enable.resource.compression=true
build.enable.embedded.manifest=false
app.microloader.name=production.js
build.embedded.microloader.compressor=-closure

View File

@ -0,0 +1,8 @@
# =============================================================================
# This file provides an override point for default variables defined in
# production.defaults.properties. These properties are only imported when building
# for the "production" environment.
#
# Properties defined in this file take priority over build.properties but are
# only loaded for "production" builds.
# =============================================================================

View File

@ -0,0 +1,152 @@
<project name="refresh-impl">
<!--
This macrodef regenerates the bootstrap.js class system metadata, which includes
relative file paths, class names, alternate class names, and class alias data
-->
<macrodef name="x-run-bootstrap">
<attribute name="file"/>
<attribute name="basedir"/>
<attribute name="appendMicroloader" default="false"/>
<sequential>
<local name="tag.filter"/>
<local name="ux.include"/>
<local name="load.script.tpl"/>
<condition property="tag.filter" value="package-sencha-core,core">
<x-is-true value="${enable.sencha-core.filter}"/>
</condition>
<property name="tag.filter" value="core"/>
<if>
<equals arg1="${framework.name}" arg2="ext"/>
<then>
<property name="ux.include">
include
-namespace=Ext.ux
and
</property>
<property name="load.script.tpl" value="Ext.Loader.loadScript(&quot;{0}&quot;);"/>
</then>
<else>
<property name="ux.include" value=""/>
<property name="load.script.tpl" value="Ext.Loader.loadScriptFile(&quot;{0}&quot;, Ext.emptyFn);"/>
</else>
</if>
<echo file="@{file}">
/**
* This file is generated by Sencha Cmd and should NOT be edited. It is
* provided to support globbing requires, custom xtypes, and other
* metadata-driven class system features
*/
</echo>
<x-compile refid="${compiler.ref.id}">
<![CDATA[
union
-not
-tag=${tag.filter}
and
metadata
+append
-base-path=@{basedir}
+loader-paths
-jsonp=Ext.Loader.addClassPathMappings
-out=@{file}
and
exclude
-tag=${tag.filter}
and
${ux.include}
metadata
+append
-base-path=@{basedir}
+alternates
-out=@{file}
and
metadata
+append
-base-path=@{basedir}
+alias
-out=@{file}
and
meta
+append
+packages
-out=@{file}
and
union
-tag=overrides
and
metadata
-base-path=@{basedir}
+append
+filenames
-tpl=${load.script.tpl};
-out=@{file}
]]>
</x-compile>
</sequential>
</macrodef>
<!--
Refreshes the application's bootstrap javascript and microloader manifest
'-detect-app-build-properties' is defined in js-impl.xml
-->
<target name="-refresh-app" depends="-detect-app-build-properties">
<!--regenerate class system metadata-->
<x-run-bootstrap file="${app.bootstrap.js}"
basedir="${app.bootstrap.base.path}"/>
<!--regenerate json manifest bootstrap data-->
<if>
<equals arg1="${app.page.mode}" arg2="xcompile"/>
<then>
<!--
append the microloader and manifest to the end
of bootstrap.js
-->
<x-compile refid="${compiler.ref.id}">
<![CDATA[
microload
-operation=microloader
-microloaderPath=${app.microloader.bootstrap}
-append
-out=${app.bootstrap.js}
]]>
</x-compile>
</then>
</if>
<!--
create / overwrite bootstrap.json, which will be used
by the default development.js microloader
-->
<echo file="${build.json.bootstrap.path}">
/**
* This file is generated by Sencha Cmd and should NOT be edited. It is a
* combination of content from app.json, and all required package's package.json
* files. Customizations should be placed in app.json.
*/
</echo>
<x-compile refid="${compiler.ref.id}">
<![CDATA[
microload
-operation=json
-bootstrap
-append
-tpl={0}
-out=${build.json.bootstrap.path}
]]>
</x-compile>
</target>
<!--
Refresh app
-->
<target name="-before-refresh"/>
<target name="-refresh" depends="-refresh-app"/>
<target name="-after-refresh"/>
</project>

View File

@ -0,0 +1,83 @@
<project name="resolve-impl">
<target name="-before-web-start"/>
<target name="-web-start">
<property name="enable.background.server" value="false"/>
<x-sencha-command>
<![CDATA[
fs
web
-port=${build.web.port}
-background=${enable.background.server}
start
-map=${build.web.root}
]]>
</x-sencha-command>
</target>
<target name="-after-web-start"/>
<target name="web-start"
depends="-init,-before-web-start,-web-start,-after-web-start"/>
<target name="-before-web-stop"/>
<target name="-web-stop">
<!--
This needs to be in it's own process due to threading issues when called from a
target.
-->
<x-shell dir="${app.dir}">
${cmd.dir}/sencha fs web -port ${build.web.port} stop
</x-shell>
</target>
<target name="-after-web-stop"/>
<target name="web-stop"
depends="-init,-before-web-stop,-web-stop,-after-web-stop"/>
<target name="-resolve-impl" depends="-refresh">
<x-ant-call target="web-start" unless="skip.web.start">
<param name="enable.background.server" value="true"/>
</x-ant-call>
<local name="app.relative.url"/>
<local name="build.resolve.relative.url"/>
<!--calculate the relative path from the web root to the index page-->
<x-get-relative-path from="${build.web.root}"
to="${app.page.file}"
property="app.relative.url"/>
<property name="build.resolve.relative.url"
value="${build.resolve.url}/${app.relative.url}"/>
<x-sencha-command dir="${app.dir}" inheritall="true">
<![CDATA[
app
resolve
-mode=${build.resolve.mode}
-uri=${build.resolve.relative.url}
-tpl=${build.resolve.tpl}
-out=${build.resolve.file}
]]>
</x-sencha-command>
<x-ant-call target="web-stop" unless="skip.web.start"/>
<x-compile refid="${compiler.ref.id}">
<![CDATA[
restore
page
and
load-refs
-file=${build.resolve.file}
-defaultSrcName=@${build.tag.name}
-allowUnmatched=${build.resolve.allow.unmatched}
and
save
page
]]>
</x-compile>
</target>
<target name="-before-resolve"/>
<target name="-resolve">
<x-ant-call target="-resolve-impl"/>
</target>
<target name="-after-resolve"/>
</project>

View File

@ -0,0 +1,25 @@
<project name="resources-impl">
<target name="-before-resources"/>
<target name="-after-resources"/>
<!--'-init-compiler' defined in init-impl.xml-->
<target name="-resources" depends="-init-compiler">
<x-compile refid="${compiler.ref.id}">
<![CDATA[
resources
-excludes=-all*.css
-out=${build.resources.dir}
and
resources
-model=true
-out=${build.dir}
]]>
</x-compile>
</target>
<!-- Legacy targets (implement -before-resources or -after-resources instead): -->
<target name="-after-copy-resources"/>
<target name="-after-inherit-resources"/>
<target name="-before-copy-resources"/>
<target name="-before-inherit-resources"/>
</project>

View File

@ -0,0 +1,225 @@
<project name="sass-impl">
<!--
Uses the compiler to generate the top-level scss file for the app
by using the current set of js files to determine the Components
used by the app, then including the corresponding scss files into the
app's style
-->
<target name="-compile-sass" depends="-init-compiler">
<x-normalize-path
path="${build.dir}/resources"
property="image.search.path"/>
<x-compile refid="${compiler.ref.id}">
<![CDATA[
restore
page
and
#only set variables for used classes eg. $include-class-name
sass
+class-name-vars
-variable=$image-search-path:'${image.search.path}'
-variable=$theme-name: '${app.theme}' !default
-output=${app.out.scss}
and
include
-all
and
# include etc and vars from all classes
sass
+etc
+vars
+append
-output=${app.out.scss}
and
restore
page
and
#only include rules from used classes
sass
+rules
+append
-output=${app.out.scss}
and
sass
+ruby
-output=${app.out.ruby}
]]>
</x-compile>
<!--
app.out.css.path is relative to the app output index.html file
-->
<x-get-relative-path
from="${app.dir}"
to="${app.out.css}"
property="app.out.css.path"
/>
<!--update the application's bootstrap.css file to point to the build output-->
<echo file="${app.bootstrap.css}">
<![CDATA[
/*
* This file is generated by Sencha Cmd and should NOT be edited. It redirects
* to the most recently built CSS file for the application to allow index.html
* in the development directory to load properly (i.e., "dev mode").
*/
@import '${app.out.css.path}';
]]>
</echo>
</target>
<!--
This macrodef is used for post-processing Ext JS 4.2+ style theme css files
and will split based on selector thresholds, as well as run the css preprocessor
and compressor
-->
<macrodef name="x-compress-css-files">
<attribute name="dir"/>
<attribute name="prefix"/>
<attribute name="outprefix"/>
<attribute name="compress"/>
<attribute name="preprocess"/>
<sequential>
<x-split-css file="@{dir}/@{prefix}.css"
outdir="${build.resources.dir}"
limit="${build.css.selector.limit}"/>
<for param="cssfile">
<fileset dir="@{dir}" includes="@{prefix}*.css"/>
<sequential>
<local name="css.output.name"/>
<local name="pattern"/>
<property name="pattern" value="(.*?)(@{prefix})(_\d{1,2})*\.css"/>
<propertyregex property="css.output.name"
input="@{cssfile}"
regexp="${pattern}"
select="\1@{outprefix}\3.css"
override="true"/>
<if>
<equals arg1="@{preprocess}" arg2="true"/>
<then>
<echo>Preprocessing @{cssfile} to ${css.output.name}</echo>
<x-css-preprocess
file="@{cssfile}"
tofile="${css.output.name}"
options="${build.css.preprocessor.opts}"/>
</then>
</if>
<if>
<equals arg1="@{compress}" arg2="true"/>
<then>
<echo>Compressing @{cssfile} to ${css.output.name}</echo>
<x-compress-css srcfile="@{cssfile}"
outfile="${css.output.name}"/>
</then>
</if>
</sequential>
</for>
</sequential>
</macrodef>
<!--
This target builds Ext JS 4.2+ style themes, first generating the top-level
scss file, then running compass with the css, sass, and config options set
-->
<target name="-compass-compile-theme-package">
<x-run-if-true value="${enable.ext42.themes}">
<x-ant-call target="-compile-sass"/>
<x-compass-compile
rubyPath="${build.ruby.path}"
dir="${compass.working.dir}"
trace="${compass.compile.trace}"
boring="${compass.compile.boring}"
force="${compass.compile.force}"
sassdir="${compass.sass.dir}"
cssdir="${compass.css.dir}"
config="${compass.config.file}"/>
<x-compress-css-files dir="${build.dir}/resources"
prefix="${app.out.base.debug}"
outprefix="${app.out.base}"
preprocess="${build.css.preprocess}"
compress="${build.css.compress}"/>
</x-run-if-true>
</target>
<!--
This is a legacy macrodef to support building Ext JS 4.1 themes, which have been
deprecated in favor of Ext JS 4.2 theme packages
-->
<macrodef name="x-build-sass">
<attribute name="theme"/>
<sequential>
<local name="sass.name"/>
<local name="use.shell"/>
<!--
convert abspath to just the leaf path name
-->
<basename property="sass.name" file="@{theme}"/>
<local name="sass.base.name"/>
<property name="sass.base.name" value="${sass.name}"/>
<echo>Compiling sass directory : @{theme}/sass</echo>
<x-compass-compile
rubyPath="${build.ruby.path}"
boring="${compass.compile.boring}"
force="${compass.compile.force}"
trace="${compass.compile.trace}"
dir="@{theme}/sass"/>
<x-compress-css srcfile="${app.dir}/resources/${sass.base.name}/*.css"
outdir="${app.dir}/resources/${sass.base.name}"/>
</sequential>
</macrodef>
<!--
This target builds Ext JS 4.1 style themes, iterating over each directory
under the specified ${app.theme.dir} directory and compiling the sass
located there
-->
<target name="-compass-compile-theme-folders">
<x-run-if-true value="${enable.ext41.themes}">
<!-- run sass compilation over the various themes -->
<for param="sass">
<dirset dir="${app.theme.dir}" includes="*"/>
<sequential>
<x-build-sass theme="@{sass}"/>
</sequential>
</for>
</x-run-if-true>
</target>
<!--
This target builds Touch style themes, by running compass
over the directory containing the manually maintined scss files
-->
<target name="-compass-compile-sass-dir">
<x-run-if-true value="${enable.touch.themes}">
<x-compass-compile
rubyPath="${build.ruby.path}"
trace="${compass.compile.trace}"
boring="${compass.compile.boring}"
force="${compass.compile.force}"
dir="${compass.sass.dir}"/>
</x-run-if-true>
</target>
<!--
This is a summation target triggering the three different supported
sass modes (ext 41, ext 42+, and touch).
-->
<target name="-compass-compile"
depends="-compass-compile-theme-package,
-compass-compile-theme-folders,
-compass-compile-sass-dir"/>
<!--
Build SASS
-->
<target name="-before-sass"/>
<target name="-sass" depends="-compass-compile"/>
<target name="-after-sass"/>
</project>

View File

@ -0,0 +1,16 @@
app.name=Audio
app.framework=touch
app.classpath=${app.dir}/app.js,${app.dir}/app
# this property specifies a comma separated list of paths containing
# resources to copy to the build directory
app.resource.paths=
app.build.dir=${workspace.build.dir}/${app.name}
app.framework.version=2.3.0
app.cmd.version=4.0.2.64

View File

@ -0,0 +1,236 @@
<project name="slice-impl">
<!--
Uses the compiler to generate a special theme-only scss file containing
rules for all framework / package / app components. This is then used
by the slicer example page to capture theme sprites
-->
<target name="-compile-slicer-sass" depends="-init-compiler">
<x-normalize-path
path="${build.dir}/resources"
property="image.search.path"/>
<x-compile refid="${compiler.ref.id}">
<![CDATA[
restore
page
and
include
-all
and
sass
+class-name-vars
+etc
+vars
+rules
-variable=$image-search-path:'${image.search.path}'
-variable=$theme-name: '${app.theme}' !default
-output=${app.example.scss}
and
restore
page
and
sass
+ruby
-output=${app.example.out.ruby}
]]>
</x-compile>
<x-get-relative-path from="${app.example.dir}"
to="${app.example.css}"
property="app.example.css.path"/>
<!--update the app's example to point to the build output-->
<echo file="${app.example.css.file}">
<![CDATA[
/*
* This file is generated by Sencha Cmd and should NOT be edited. It redirects
* to the most recently built CSS file for the application to allow theme.html
* to load properly for image slicing (required to support non-CSS3 browsers
* such as IE9 and below).
*/
@import '${app.example.css.path}';
]]>
</echo>
</target>
<!--
Compiles the scss file for the theme slicer page
-->
<target name="-compass-compile-slicer-css" depends="-compile-slicer-sass">
<x-compass-compile
dir="${app.example.build.dir}"
trace="${compass.compile.trace}"
boring="${compass.compile.boring}"
force="${compass.compile.force}"
sassdir="${app.example.build.dir}"
cssdir="${app.example.build.dir}"
config="${app.example.compass.config}"/>
</target>
<!--
Generates theme images for Ext JS 4.2+ apps using theme packages
'-detect-app-build-properties' is defined in js-impl.xml
-->
<target name="-slice-app-theme" depends="-detect-app-build-properties">
<x-ant-call target="-compass-compile-slicer-css"/>
<x-run-bootstrap file="${bootstrap.example.js}"
basedir="${bootstrap.base.path}"/>
<echo>Capture theme image to ${build.capture.png}</echo>
<x-sencha-command>
<![CDATA[
theme
capture
-page=${app.example.theme.html}
-image=${build.capture.png}
-manifest=${build.capture.json}
]]>
</x-sencha-command>
<echo>Slicing theme images to ${build.resources.dir}</echo>
<x-sencha-command>
<![CDATA[
fs
slice
${build.slice.options}
-image=${build.capture.png}
-manifest=${build.capture.json}
-out=${build.resources.dir}
]]>
</x-sencha-command>
</target>
<macrodef name="x-build-theme">
<attribute name="theme" description="the path of the theme folder"/>
<attribute name="buildsass" default="false"/>
<attribute name="basetheme" default="default"/>
<sequential>
<local name="theme.name"/>
<local name="framework.theme.dir"/>
<local name="tmp.theme.dir"/>
<local name="tmp.img.dir"/>
<basename property="theme.name" file="@{theme}"/>
<local name="theme.base.name"/>
<property name="theme.base.name" value="${theme.name}"/>
<property name="theme.images.dir" location="@{theme}/images"/>
<property name="theme.page.dir" location="@{theme}/${theme.page.name}"/>
<property name="tmp.res.dir" value="${app.resources.dir}"/>
<property name="tmp.theme.dir" value="${tmp.res.dir}/${theme.base.name}"/>
<property name="tmp.img.dir" value="${tmp.theme.dir}/images"/>
<property name="app.res.dir" location="${app.dir}/packages"/>
<property name="app.img.dir" location="${app.res.dir}/images"/>
<property name="framework.res.dir" location="${framework.dir}/resources"/>
<property name="framework.img.dir" location="${framework.res.dir}/themes/images"/>
<property name="framework.theme.dir" location="${framework.img.dir}/@{basetheme}"/>
<echo>Copying base framework images from ${framework.theme.dir} to ${tmp.img.dir}</echo>
<copy todir="${tmp.img.dir}">
<fileset dir="${framework.theme.dir}" includes="**/*"/>
</copy>
<if>
<equals arg1="@{buildsass}" arg2="true"/>
<then>
<echo>Building sass for theme ${theme.name}</echo>
<!--x-build-sass is defined in sass-impl.xml-->
<x-build-sass theme="@{theme}"/>
</then>
</if>
<echo>Slicing images for theme ${theme.name} to ${tmp.img.dir}</echo>
<x-sencha-command>
<![CDATA[
theme
build
-data-file=${build.capture.json}
-image-file=${build.capture.png}
-page=${theme.page.dir}
-out=${tmp.img.dir}
]]>
</x-sencha-command>
<if>
<available file="${theme.images.dir}"/>
<then>
<echo>Copying user defined images from @{theme}/images to ${tmp.img.dir}</echo>
<copy todir="${tmp.img.dir}">
<fileset dir="${theme.images.dir}" includes="**/*"/>
</copy>
</then>
</if>
</sequential>
</macrodef>
<!--
This is a legacy macrodef for copying resources in theme-directory based themes.
It is provided to support building Ext JS 4.1 app themes
-->
<macrodef name="x-copy-resources">
<sequential>
<copy todir="${build.resources.dir}" includeEmptyDirs="false">
<fileset dir="${app.resources.dir}"
includes="**/*"/>
</copy>
<x-get-relative-path from="${app.dir}"
to="${framework.dir}"
property="framework.rel.path"/>
<copy toDir="${build.dir}/${framework.rel.path}">
<fileset dir="${framework.dir}"
includes="src/ux/**/css/**/*"/>
</copy>
</sequential>
</macrodef>
<!--
Generates theme images for Ext JS 4.1 apps that use directory based
themes. These have been deprecated in favor of ExtJS 4.2 theme packages
-->
<target name="-slice-theme-directories">
<echo>Processing theme directories from ${app.theme.dir}</echo>
<for param="theme">
<dirset dir="${app.theme.dir}" includes="*"/>
<sequential>
<x-build-theme theme="@{theme}"/>
</sequential>
</for>
<x-copy-resources/>
</target>
<target name="-slice-images">
<x-run-if-true value="${enable.ext42.themes}">
<x-ant-call target="-slice-app-theme"/>
</x-run-if-true>
<x-run-if-true value="${enable.ext41.themes}">
<x-ant-call target="-slice-theme-directories"/>
</x-run-if-true>
</target>
<target name="-before-slice"/>
<target name="-slice" depends="-slice-images"/>
<target name="-after-slice"/>
<!--
Refresh Individual Theme
-->
<target name="-before-refresh-theme"/>
<target name="-refresh-theme">
<if>
<x-is-true value="${enable.ext41.themes}"/>
<then>
<local name="theme.dir"/>
<property name="theme.dir" location="${app.theme.dir}/${args.themeName}"/>
<x-build-theme theme="${theme.dir}" buildsass="true"/>
<x-copy-resources/>
</then>
</if>
</target>
<target name="-after-refresh-theme"/>
</project>

View File

@ -0,0 +1,21 @@
# =============================================================================
# This file defines default property values that apply to the "testing" build
# environment.
#
# Please use testing.properties to customize these properties unless you want
# your customizations to be for all environments. In that case, you can instead
# override these properties in build.properties.
#
# The properties defined in this file take priority over defaults.properties
# but are lower priority than build.properties which in turn is lower priority
# than testing.properties.
#
# IMPORTANT - This file should not be modified by an app as it is overwritten
# during each app upgrade.
# =============================================================================
build.options.logger=yes
build.options.debug=true
app.microloader.name=testing.js

View File

@ -0,0 +1,8 @@
# =============================================================================
# This file provides an override point for default variables defined in
# testing.defaults.properties. These properties are only imported when building
# for the "testing" environment.
#
# Properties defined in this file take priority over build.properties but are
# only loaded for "testing" builds.
# =============================================================================

View File

@ -0,0 +1,35 @@
# =============================================================================
# This file defines default property values that apply to all builds based on
# Sencha Touch 2.3.x frameworks.
#
# Please use build.properties to customize these properties.
#
# To override a property based on build.environment instead add properties to
# one of these higher priority files:
#
# - production.properties
# - testing.properties
# - native.properties
# - package.properties
#
# The properties defined in this file take priority over defaults.properties
# and *.defaults.properties.
#
# IMPORTANT - This file should not be modified by an app as it is overwritten
# during each app upgrade.
# =============================================================================
enable.touch.themes=true
build.output.markuponly=false
build.watcher.targets=-watch-sass-dir,-watch-compiler
build.trigger.targets=-refresh
# override the default sass directory
compass.sass.dir=${app.sass.dir}
build.options.product=touch
build.options.minVersion=2.3

View File

@ -0,0 +1,53 @@
<project name="watch-impl">
<target name="-watch-impl">
<x-ant-call target="${build.trigger.targets}"/>
</target>
<target name="-watch-compiler">
<x-watch compilerRef="${compiler.ref.id}" targets="-watch-impl"/>
</target>
<target name="-watch-theme-package-css">
<x-compass-watch
rubyPath="${build.ruby.path}"
dir="${compass.working.dir}"
trace="${compass.compile.trace}"
boring="${compass.compile.boring}"
force="${compass.compile.force}"
sassdir="${compass.sass.dir}"
cssdir="${compass.css.dir}"
config="${compass.config.file}"
fork="true"/>
</target>
<macrodef name="x-run-compass-watch">
<attribute name="directory"/>
<sequential>
<x-compass-watch
rubyPath="${build.ruby.path}"
dir="@{directory}"
trace="${compass.compile.trace}"
boring="${compass.compile.boring}"
force="${compass.compile.force}"
fork="true"/>
</sequential>
</macrodef>
<target name="-watch-sass-dir">
<x-run-compass-watch directory="${app.sass.dir}"/>
</target>
<target name="-watch-theme-dir">
<local name="watch.sass.dir"/>
<property name="watch.sass.dir"
value="${app.theme.dir}/${watch.theme.name}/sass"/>
<x-run-compass-watch directory="${watch.sass.dir}"/>
</target>
<target name="-before-watch" depends="init"/>
<target name="-watch" depends="app-build-impl.build">
<x-ant-call target="${build.watcher.targets}"/>
</target>
<target name="-after-watch" depends="init"/>
</project>

Some files were not shown because too many files have changed in this diff Show More