GitLab wird am Donnerstag, den 09. Dezember, zwischen 08:00 und 10:00 Uhr wegen wichtigen Wartungsarbeiten nicht zur Verfügung stehen.

Commit 6899fcac authored by Cedric Takongmo's avatar Cedric Takongmo
Browse files

Initial commit

parents
This diff is collapsed.
// here, the extra check for window['Ext'] is needed for use with cmd-test
// code injection. we need to make that this file will sync up with page global
// scope to avoid duplicate Ext.Boot state. That check is after the initial Ext check
// to allow the sandboxing template to inject an appropriate Ext var and prevent the
// global detection.
var Ext = Ext || window['Ext'] || {};
//<editor-fold desc="Microloader">
/**
* @Class Ext.Microloader
* @singleton
*/
Ext.Microloader = Ext.Microloader || (function () {
var Boot = Ext.Boot,
_listeners = [],
_loaded = false,
Microloader = {
detectPlatformTags: function () {
if (Ext.beforeLoad) {
Ext.beforeLoad(Ext.platformTags);
}
},
initPlatformTags: function () {
Microloader.detectPlatformTags();
},
init: function () {
Microloader.initPlatformTags();
var readyHandler = Ext._beforereadyhandler;
Ext._beforereadyhandler = function () {
if (Ext.Boot !== Boot) {
Ext.apply(Ext.Boot, Boot);
Ext.Boot = Boot;
}
if(readyHandler) {
readyHandler();
}
};
},
run: function() {
Microloader.init();
var manifest = Ext.manifest;
if (typeof manifest === "string") {
var extension = ".json",
url = manifest.indexOf(extension) === manifest.length - extension.length
? manifest
: manifest + ".json";
Boot.fetch(url, function(result){
manifest = Ext.manifest = JSON.parse(result.content);
Microloader.load(manifest);
});
} else {
Microloader.load(manifest);
}
},
/**
*
* @param manifestDef
*/
load: function (manifest) {
var loadOrder = manifest.loadOrder,
loadOrderMap = (loadOrder) ? Boot.createLoadOrderMap(loadOrder) : null,
urls = [],
js = manifest.js || [],
css = manifest.css || [],
resource, i, len, include,
loadedFn = function () {
_loaded = true;
Microloader.notify();
},
loadResources = function(resources, addLoadedFn){
for (len = resources.length, i = 0; i < len; i++) {
resource = resources[i];
include = true;
if (resource.platform && !Boot.filterPlatform(resource.platform)) {
include = false;
}
if (include) {
urls.push(resource.path);
}
}
if(!addLoadedFn) {
Boot.loadSync({
url: urls,
loadOrder: loadOrder,
loadOrderMap: loadOrderMap
});
} else {
Boot.load({
url: urls,
loadOrder: loadOrder,
loadOrderMap: loadOrderMap,
sequential: true,
success: loadedFn,
failure: loadedFn
});
}
};
if (loadOrder) {
manifest.loadOrderMap = loadOrderMap;
}
loadResources(css.concat(js), true);
},
onMicroloaderReady: function (listener) {
if (_loaded) {
listener();
} else {
_listeners.push(listener);
}
},
/**
* @private
*/
notify: function () {
//<debug>
Boot.debug("notifying microloader ready listeners...");
//</debug>
var listener;
while((listener = _listeners.shift())) {
listener();
}
}
};
return Microloader;
}());
//</editor-fold>
/**
* the current application manifest
*
*
* {
* name: 'name',
* version: <checksum>,
* debug: {
* hooks: {
* "*": true
* }
* },
* localStorage: false,
* mode: production,
* js: [
* ...
* {
* path: '../boo/baz.js',
* version: <checksum>,
* update: full | delta | <falsy>,
* platform: ['phone', 'ios', 'android']
* },
* {
* path: 'http://some.domain.com/api.js',
* remote: true
* },
* ...
* ],
* css: [
* ...
* {
* path: '../boo/baz.css',
* version: <checksum>,
* update: full | delta | <falsy>,
* platform: ['phone', 'ios', 'android']
* },
* ...
* ],
* localStorage: false,
* paths: {...},
* loadOrder: [
* ...
* {
* path: '../foo/bar.js",
* idx: 158,
* requires; [1,2,3,...,145,157],
* uses: [182, 193]
* },
* ...
* ],
* classes: {
* ...
* 'Ext.panel.Panel': {
* requires: [...],
* uses: [...],
* aliases: [...],
* alternates: [...],
* mixins: [...]
* },
* 'Ext.rtl.util.Renderable': {
* requires: [...],
* uses: [...],
* aliases: [...],
* alternates: [...],
* mixins: [...]
* override: 'Ext.util.Renderable'
* },
* ...
* },
* packages: {
* ...
* "sencha-core": {
* version: '1.2.3.4',
* requires: []
* },
* "ext": {
* version: '5.0.0.0',
* requires: ["sencha-core"]
* }.
* ...
* }
* }
*
*
* @type {String/Object}
*/
Ext.manifest = Ext.manifest || "bootstrap";
Ext.Microloader.run();
\ No newline at end of file
{
/**
* The relative path to the appliaction's markup file (html, jsp, asp, etc.)
*/
"indexHtmlPath": "index.html",
/**
* List of all JavaScript assets in the right execution order.
*
* Each item is an object with the following format:
*
* {
* // Path to file. If the file is local this must be a relative path from
* // this app.json file.
* //
* "path": "path/to/script.js", // REQUIRED
*
* // Set to true on one file to indicate that it should become the container
* // for the concatenated classes.
* //
* "bundle": false, // OPTIONAL
*
* // Set to true to include this file in the concatenated classes.
* //
* "includeInBundle": false, // OPTIONAL
*
* // Specify as true if this file is remote and should not be copied into the
* // build folder. Defaults to false for a local file which will be copied.
* //
* "remote": false, // OPTIONAL
*
* // If not specified, this file will only be loaded once, and cached inside
* // localStorage until this value is changed. You can specify:
* //
* // - "delta" to enable over-the-air delta update for this file
* // - "full" means full update will be made when this file changes
* //
* "update": "", // OPTIONAL
*
* // A value of true indicates that is 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.
* //
* "bootstrap": false // OPTIONAL
* }
*/
"js": [
{
"path": "app.js",
"bundle": true
}
],
/**
* List of all CSS assets in the right inclusion order.
*
* Each item is an object with the following format:
*
* {
* // Path to file. If the file is local this must be a relative path from
* // this app.json file.
* //
* "path": "path/to/stylesheet.css", // REQUIRED
*
* // Specify as true if this file is remote and should not be copied into the
* // build folder. Defaults to false for a local file which will be copied.
* //
* "remote": false, // OPTIONAL
*
* // If not specified, this file will only be loaded once, and cached inside
* // localStorage until this value is changed. You can specify:
* //
* // - "delta" to enable over-the-air delta update for this file
* // - "full" means full update will be made when this file changes
* //
* "update": "" // OPTIONAL
* }
*/
"css": [
{
"path": "bootstrap.css",
"bootstrap": true
}
],
/**
* Additional resources used during theme slicing operations
*/
"slicer": {
"js": [
{
"path": "${app.dir}/sass/example/custom.js",
"isWidgetManifest": true
}
]
},
/**
* override objects for setting build environment specific
* settings.
*/
"production": {
},
"testing": {
},
"development": {
},
/**
* Controls the output directory for build resources. May be set with
* either a string:
*
* output: ""
*
* or an object containing values for various types of
* build artifacts:
*
* "output": {
* "base": "${workspace.build.dir}/${build.environment}/${app.name}",
* "page": {
* "path": "../index.html",
* "enable": false
* },
* "css": "${app.output.resources}/${app.name}-all.css",
* "js": {
* "path": "app.js",
* "enable": true,
* "optimize": {
* "defines": true,
* "callParent": true,
* "requires": true,
* }
* },
* "microloader": {
* "path": "microloader.js",
* "embed": true,
* "enable": true
* },
* "manifest": {
* "path": "app.json",
* "embed": false,
* "enable": "${app.output.microloader.enable}"
* },
* "resources": "resources",
* "slicer": {
* "path": "${app.output.resources}/images",
* "enable": false
* }
* }
*
*/
"output": {
"base": "${workspace.build.dir}/${build.environment}/${app.name}",
"microloader": {
"enable": true
}
},
/**
* This sets the default output folder for cordova packagers builds
*
* // Cordova Packager Config options
* "config": {
*
* // 'name' This is the name of your cordova application. This will default to your Sencha App name.
* // This is only used once during Cordova app creation and cannot be changed after.
* "name": "AppNameForCordova",
*
* // 'id' This will be your package name for Android and your Bundle Identifier for iOS
* // This is only used once during Cordova app creation and cannot be changed after
* "id": "com.domain.AppName",
*
* // 'platform' can be a platform or a space seperated list of platform (ios android)
* // platform supported on mac: ios, amazon-fireos, android, blackberry10, firefoxos
* // platform supported on win: wp7, wp8, windows8, amazon-fireos, android, blackberry10, firefoxos
* "platform": "ios"
*
* // 'verbose' This boolean will determine if all cordova commands will have verbose output or not.
* // to properly see this run sencha command with the '-info' flag like the following
* // sencha -info app run [buildname]
*
* // 'path' The path this builds cordova project should be created in.
* // This defaults to your {app.dir}/cordova
*
* // 'target' This is the target for emulator/simulator commands.
* // On Android is the name of your Android Virtual Device
* // For iOS it is one of the following:
* // "iPhone (Retina 3.5-inch)"
* // "iPhone (Retina 4-inch)"
* // "iPhone"
* // "iPad"
* // "iPad (Retina)"
*
*/
"cordova": {
"config": {
"name": "${app.name}",
"id": "com.domain.${app.name}",
"verbose": false,
"target": "",
"path": "${app.dir}/cordova"
},
"js": [
{
"path": "cordova.js",
"remote": true,
"priority": 1000
}
],
"microloader": "${app.config.dir}/microloader/testing.js",
"output": {
"base": "${app.cordova.config.path}/www",
"manifest": {
"embed": true
},
"deltas": {
"enable": false
},
"cache": {
"enable": false
}
}
},
/**
* This sets the default output folder for phonegap packagers builds
*
* // Phonegap Packager Config options
* "config": {
*
* // 'name' This is the name of your phonegap application. This will default to your Sencha App name.
* // This is only used once during Phonegap app creation and cannot be changed after.
* "name": "AppNameForCordova",
*
* // 'id' This will be your package name for Android and your Bundle Identifier for iOS
* // This is only used once during Phonegap app creation and cannot be changed after
* "id": "com.domain.AppName",
*
* // 'platform' a single platform to build, run or emulate
* // platform supported locally: android, ios, wp8, Blackberry 10
* // platform supported remotely: android, ios, wp8
* //"platform": "ios"
*
* // 'remote' This boolean will determine if the build should be run on Phonegap's remove server 'http://build.phonegap.com'
* // setting remote to true will attempt to build on the cloud.
* // To properly use this one must set the following properties in there local.properties file (if this file does not exist create it in your app root)
* // phonegap.remote.username=myname@domain.com
* // phonegap.remote.password=mys3cr3tp@ssw0rd
*
* // 'verbose' This boolean will determine if all phonegap commands will have verbose output or not.
* // to properly see this run sencha command with the '-info' flag like the following
* // sencha -info app run [buildname]
*
* // 'path' The path this builds phonegap project should be created in.
* // This is only used once during Phonegap app creation if changed this will result in a new phonegap application being generated
* // This defaults to your {app.dir}/phonegap
*
*/
"phonegap": {
"config": {
"name": "${app.name}",
"id": "com.domain.${app.name}",
"remote": false,
"verbose": false,
"path": "${app.dir}/phonegap"
},
"js": [
{
"path": "phonegap.js",
"remote": true,
"priority": 1000
}
],
"microloader": "${app.config.dir}/microloader/testing.js",
"output": {
"base": "${app.phonegap.config.path}/www",
"manifest": {
"embed": true
},
"deltas": {
"enable": false
},
"cache": {
"enable": false
}
}
},
/**
* Controls the output structure of bootstrap artifacts. May be specified by a string:
*
* "bootstrap": "${app.dir}"
*
* to adjust the base path for all bootstrap objects, or expanded into object form:
*
* "bootstrap": {
* "base": "${app.dir},
* "manifest": "bootstrap.json",
* "microloader": "bootstrap.js",
* "css": "bootstrap.css"
* }
*
*
*/
"bootstrap":{
"base": "${app.dir}"
}
}
<project name="bootstrap-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-bootstrap">
<attribute name="file"/>
<attribute name="basedir"/>
<attribute name="coreFilesFile" default="@{file}"/>
<attribute name="classMetadataFile" default="@{file}"/>
<attribute name="overridesFile" default="@{file}"/>
<attribute name="includeBoot" default="true"/>
<attribute name="includeManifest" default="false"/>
<attribute name="includeCoreFiles" default="false"/>
<attribute name="includeMetadata" default="true"/>
<attribute name="includeOverrides" default="true"/>
<attribute name="appendCoreFiles" default="true"/>
<attribute name="appendClassMetadata" default="true"/>
<attribute name="appendOverrides" default="true"/>
<attribute name="manifestTpl" default="var Ext = Ext || '{' '}'; Ext.manifest = {0};"/>
<attribute name="coreFilesJsonpTpl" default="Ext.Boot.loadSync"/>
<attribute name="loaderConfigJsonpTpl" default="Ext.Loader.addClassPathMappings"/>
<attribute name="overrideTpl" default='Ext.Loader.loadScriptsSync'/>
<attribute name="overrideTplType" default="jsonp"/>
<attribute name="overrideExcludeTags" default="package-sencha-core,package-${framework.name}"/>
<text name="launchcode" optional="true"/>
<sequential>
<local name="temp.file"/>
<tempfile property="temp.file"
deleteonexit="true"
createfile="true"/>
<echo file="${temp.file}">@{launchcode}</echo>
<x-compile refid="${compiler.ref.id}">
<![CDATA[
bootstrap
-baseDir=@{basedir}
-file=@{file}
-coreFilesFile=@{coreFilesFile}
-classMetadataFile=@{classMetadataFile}
-overridesFile=@{overridesFile}
-includeBoot=@{includeBoot}
-includeManifest=@{includeManifest}
-includeCoreFiles=@{includeCoreFiles}
-includeMetadata=@{includeMetadata}
-includeOverrides=@{includeOverrides}
-appendCoreFiles=@{appendCoreFiles}
-appendClassMetadata=@{appendClassMetadata}
-appendOverrides=@{appendOverrides}
-manifestTpl=@{manifestTpl}
-coreFilesJsonpTpl=@{coreFilesJsonpTpl}