# =============================================================================
# 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
