-
Notifications
You must be signed in to change notification settings - Fork 0
/
compile.sh
executable file
·54 lines (48 loc) · 1.38 KB
/
compile.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/sh
#
# Author: Mike Hill <mike12489@gmail.com>
#
# Compile all package JavaScript files into a single file. In order for Sencha
# Architect to render items correctly, this must be performed after each change
# to package source files.
# Line explanations:
#
# sencha:
# Run Sencha CMD program.
#
# -d:
# Run in debug mode (verbose output).
#
# -s=../../ext/src/:
# Use given path as SDK path for ExtJS source.
#
# <category command>
# compile --classpath=src/:
# Compile the code within the given classpath.
#
# <subcategory command>
# exclude -namespace=Ext:
# Exclude the Ext namespace from the compiled code. Only required Ext classes
# will be included in the final result.
#
# and:
# Append an additional subcategory command to the category command (compile).
#
# <subcategory command>
# concat -yui -ou=architect-lib/package-all.js:
# Concatenate the compiled code into a single file and export this file as
# the given -ou path using the YUI JavaScript compiler. The Closure JavaScript
# compiler may be used instead by replacing -yui with -closure.
declare PACKAGE
declare OPTIONS
# Determine package name
PACKAGE=${PWD##*/}
OPTIONS=''
#OPTIONS+=' -d'
OPTIONS+=' -s=../../ext/src/'
OPTIONS+=' compile --classpath=src/'
OPTIONS+=' exclude -not -namespace=Ext.ux.'"${PACKAGE}"
OPTIONS+=' and'
OPTIONS+=' concat -yui -ou=architect-lib/package-all.js'
# Compile package
sencha.sh ${OPTIONS}