alloy 2.0.2 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintignore +0 -1
- package/.eslintrc.js +2 -1
- package/.github/dependabot.yml +4 -0
- package/.github/workflows/build.yml +12 -9
- package/.github/workflows/cla.yaml +1 -1
- package/.github/workflows/publish.yml +44 -5
- package/Alloy/builtins/moment/lang/af.js +52 -42
- package/Alloy/builtins/moment/lang/ar-dz.js +151 -42
- package/Alloy/builtins/moment/lang/ar-kw.js +42 -34
- package/Alloy/builtins/moment/lang/ar-ly.js +142 -81
- package/Alloy/builtins/moment/lang/ar-ma.js +43 -34
- package/Alloy/builtins/moment/lang/ar-ps.js +123 -0
- package/Alloy/builtins/moment/lang/ar-sa.js +77 -64
- package/Alloy/builtins/moment/lang/ar-tn.js +17 -9
- package/Alloy/builtins/moment/lang/ar.js +161 -95
- package/Alloy/builtins/moment/lang/az.js +54 -45
- package/Alloy/builtins/moment/lang/be.js +73 -51
- package/Alloy/builtins/moment/lang/bg.js +50 -41
- package/Alloy/builtins/moment/lang/bm.js +43 -38
- package/Alloy/builtins/moment/lang/bn-bd.js +140 -0
- package/Alloy/builtins/moment/lang/bn.js +78 -66
- package/Alloy/builtins/moment/lang/bo.js +83 -66
- package/Alloy/builtins/moment/lang/br.js +119 -47
- package/Alloy/builtins/moment/lang/bs.js +64 -43
- package/Alloy/builtins/moment/lang/ca.js +80 -56
- package/Alloy/builtins/moment/lang/cs.js +89 -68
- package/Alloy/builtins/moment/lang/cv.js +47 -35
- package/Alloy/builtins/moment/lang/cy.js +44 -14
- package/Alloy/builtins/moment/lang/da.js +44 -39
- package/Alloy/builtins/moment/lang/de-at.js +57 -42
- package/Alloy/builtins/moment/lang/de-ch.js +54 -42
- package/Alloy/builtins/moment/lang/de.js +56 -42
- package/Alloy/builtins/moment/lang/dv.js +65 -62
- package/Alloy/builtins/moment/lang/el.js +67 -49
- package/Alloy/builtins/moment/lang/en-au.js +56 -43
- package/Alloy/builtins/moment/lang/en-ca.js +53 -40
- package/Alloy/builtins/moment/lang/en-gb.js +56 -43
- package/Alloy/builtins/moment/lang/en-ie.js +56 -43
- package/Alloy/builtins/moment/lang/en-il.js +53 -39
- package/Alloy/builtins/moment/lang/en-in.js +79 -0
- package/Alloy/builtins/moment/lang/en-nz.js +56 -43
- package/Alloy/builtins/moment/lang/en-sg.js +79 -0
- package/Alloy/builtins/moment/lang/eo.js +49 -40
- package/Alloy/builtins/moment/lang/es-do.js +81 -53
- package/Alloy/builtins/moment/lang/es-mx.js +121 -0
- package/Alloy/builtins/moment/lang/es-us.js +83 -53
- package/Alloy/builtins/moment/lang/es.js +88 -58
- package/Alloy/builtins/moment/lang/et.js +60 -50
- package/Alloy/builtins/moment/lang/eu.js +56 -45
- package/Alloy/builtins/moment/lang/fa.js +88 -69
- package/Alloy/builtins/moment/lang/fi.js +75 -48
- package/Alloy/builtins/moment/lang/fil.js +69 -0
- package/Alloy/builtins/moment/lang/fo.js +48 -39
- package/Alloy/builtins/moment/lang/fr-ca.js +46 -38
- package/Alloy/builtins/moment/lang/fr-ch.js +49 -41
- package/Alloy/builtins/moment/lang/fr.js +78 -41
- package/Alloy/builtins/moment/lang/fy.js +51 -39
- package/Alloy/builtins/moment/lang/ga.js +48 -18
- package/Alloy/builtins/moment/lang/gd.js +82 -51
- package/Alloy/builtins/moment/lang/gl.js +56 -46
- package/Alloy/builtins/moment/lang/gom-deva.js +137 -0
- package/Alloy/builtins/moment/lang/gom-latn.js +71 -58
- package/Alloy/builtins/moment/lang/gu.js +30 -20
- package/Alloy/builtins/moment/lang/he.js +52 -43
- package/Alloy/builtins/moment/lang/hi.js +120 -64
- package/Alloy/builtins/moment/lang/hr.js +57 -43
- package/Alloy/builtins/moment/lang/hu.js +64 -44
- package/Alloy/builtins/moment/lang/hy-am.js +47 -36
- package/Alloy/builtins/moment/lang/id.js +46 -40
- package/Alloy/builtins/moment/lang/is.js +63 -43
- package/Alloy/builtins/moment/lang/it-ch.js +42 -35
- package/Alloy/builtins/moment/lang/it.js +91 -42
- package/Alloy/builtins/moment/lang/ja.js +113 -45
- package/Alloy/builtins/moment/lang/jv.js +46 -40
- package/Alloy/builtins/moment/lang/ka.js +66 -51
- package/Alloy/builtins/moment/lang/kk.js +47 -40
- package/Alloy/builtins/moment/lang/km.js +37 -32
- package/Alloy/builtins/moment/lang/kn.js +74 -64
- package/Alloy/builtins/moment/lang/ko.js +50 -44
- package/Alloy/builtins/moment/lang/ku-kmr.js +125 -0
- package/Alloy/builtins/moment/lang/ku.js +94 -83
- package/Alloy/builtins/moment/lang/ky.js +49 -40
- package/Alloy/builtins/moment/lang/lb.js +43 -30
- package/Alloy/builtins/moment/lang/lo.js +46 -38
- package/Alloy/builtins/moment/lang/lt.js +82 -63
- package/Alloy/builtins/moment/lang/lv.js +60 -51
- package/Alloy/builtins/moment/lang/me.js +53 -36
- package/Alloy/builtins/moment/lang/mi.js +17 -9
- package/Alloy/builtins/moment/lang/mk.js +47 -39
- package/Alloy/builtins/moment/lang/ml.js +54 -41
- package/Alloy/builtins/moment/lang/mn.js +48 -40
- package/Alloy/builtins/moment/lang/mr.js +143 -88
- package/Alloy/builtins/moment/lang/ms-my.js +45 -39
- package/Alloy/builtins/moment/lang/ms.js +44 -39
- package/Alloy/builtins/moment/lang/mt.js +47 -39
- package/Alloy/builtins/moment/lang/my.js +40 -30
- package/Alloy/builtins/moment/lang/nb.js +46 -36
- package/Alloy/builtins/moment/lang/ne.js +75 -65
- package/Alloy/builtins/moment/lang/nl-be.js +73 -46
- package/Alloy/builtins/moment/lang/nl.js +75 -46
- package/Alloy/builtins/moment/lang/nn.js +45 -34
- package/Alloy/builtins/moment/lang/oc-lnc.js +96 -0
- package/Alloy/builtins/moment/lang/pa-in.js +73 -63
- package/Alloy/builtins/moment/lang/pl.js +69 -43
- package/Alloy/builtins/moment/lang/pt-br.js +43 -34
- package/Alloy/builtins/moment/lang/pt.js +48 -38
- package/Alloy/builtins/moment/lang/ro.js +52 -39
- package/Alloy/builtins/moment/lang/ru.js +104 -61
- package/Alloy/builtins/moment/lang/sd.js +57 -62
- package/Alloy/builtins/moment/lang/se.js +42 -33
- package/Alloy/builtins/moment/lang/si.js +50 -40
- package/Alloy/builtins/moment/lang/sk.js +54 -53
- package/Alloy/builtins/moment/lang/sl.js +51 -41
- package/Alloy/builtins/moment/lang/sq.js +50 -41
- package/Alloy/builtins/moment/lang/sr-cyrl.js +71 -43
- package/Alloy/builtins/moment/lang/sr.js +74 -44
- package/Alloy/builtins/moment/lang/ss.js +50 -42
- package/Alloy/builtins/moment/lang/sv.js +52 -41
- package/Alloy/builtins/moment/lang/sw.js +47 -39
- package/Alloy/builtins/moment/lang/ta.js +78 -64
- package/Alloy/builtins/moment/lang/te.js +54 -43
- package/Alloy/builtins/moment/lang/tet.js +51 -38
- package/Alloy/builtins/moment/lang/tg.js +51 -38
- package/Alloy/builtins/moment/lang/th.js +47 -37
- package/Alloy/builtins/moment/lang/tk.js +102 -0
- package/Alloy/builtins/moment/lang/tl-ph.js +41 -34
- package/Alloy/builtins/moment/lang/tlh.js +69 -55
- package/Alloy/builtins/moment/lang/tr.js +83 -59
- package/Alloy/builtins/moment/lang/tzl.js +67 -57
- package/Alloy/builtins/moment/lang/tzm-latn.js +41 -33
- package/Alloy/builtins/moment/lang/tzm.js +40 -32
- package/Alloy/builtins/moment/lang/ug-cn.js +13 -9
- package/Alloy/builtins/moment/lang/uk.js +82 -57
- package/Alloy/builtins/moment/lang/ur.js +58 -62
- package/Alloy/builtins/moment/lang/uz-latn.js +46 -38
- package/Alloy/builtins/moment/lang/uz.js +43 -38
- package/Alloy/builtins/moment/lang/vi.js +56 -43
- package/Alloy/builtins/moment/lang/x-pseudo.js +61 -44
- package/Alloy/builtins/moment/lang/yo.js +45 -40
- package/Alloy/builtins/moment/lang/zh-cn.js +68 -46
- package/Alloy/builtins/moment/lang/zh-hk.js +61 -51
- package/Alloy/builtins/moment/lang/zh-mo.js +111 -0
- package/Alloy/builtins/moment/lang/zh-tw.js +57 -49
- package/Alloy/builtins/moment.js +2587 -1501
- package/Alloy/commands/compile/ast/controller.js +6 -2
- package/Alloy/commands/compile/compilerUtils.js +6 -8
- package/Alloy/commands/compile/parsers/Alloy.Abstract.FixedSpace.js +2 -11
- package/Alloy/commands/compile/parsers/Alloy.Abstract.FlexSpace.js +2 -11
- package/Alloy/commands/compile/parsers/Alloy.Abstract.Option.js +2 -2
- package/Alloy/commands/compile/parsers/Alloy.Abstract._ItemContainer.js +9 -2
- package/Alloy/commands/compile/parsers/Ti.UI.Android.CollapseToolbar.ContentView.js +13 -0
- package/Alloy/commands/compile/parsers/Ti.UI.Android.CollapseToolbar._ProxyProperty.js +13 -0
- package/Alloy/commands/compile/parsers/Ti.UI.Android.CollapseToolbar.js +35 -0
- package/Alloy/commands/compile/parsers/Ti.UI.Android.DrawerLayout._ProxyProperty.js +0 -1
- package/Alloy/commands/compile/parsers/Ti.UI.AttributedString.js +0 -5
- package/Alloy/commands/compile/parsers/Ti.UI.Button.js +2 -11
- package/Alloy/commands/compile/parsers/Ti.UI.NavigationWindow.js +0 -15
- package/Alloy/commands/compile/parsers/Ti.UI.OptionBar.js +0 -5
- package/Alloy/commands/compile/parsers/Ti.UI.PickerColumn.js +1 -1
- package/Alloy/commands/compile/parsers/Ti.UI.TabbedBar.js +0 -9
- package/Alloy/commands/compile/parsers/Ti.UI.Toolbar.js +0 -6
- package/Alloy/commands/generate/targets/widget.js +1 -1
- package/Alloy/commands/info/index.js +2 -2
- package/Alloy/common/constants.js +5 -3
- package/Alloy/lib/alloy/backbone/1.6.0/backbone.js +2155 -0
- package/Alloy/lib/alloy/underscore.js +1722 -1372
- package/Alloy/template/README +3 -9
- package/Alloy/template/app.tss +5 -12
- package/Alloy/template/controller.js +1 -1
- package/Alloy/template/gitignore.txt +3 -0
- package/Alloy/template/lib/alloy.js +0 -17
- package/Alloy/template/style.tss +0 -3
- package/Alloy/template/view.xml +4 -3
- package/Alloy/template/widget/style.tss +1 -2
- package/Alloy/tiapp.js +1 -11
- package/Alloy/utils.js +1 -1
- package/CHANGELOG.md +16 -0
- package/README.md +16 -0
- package/package.json +23 -46
- package/samples/lib/testUtils.js +1 -1
- package/test/lib/testUtils.js +1 -1
- package/test/projects/HarnessTemplate/tiapp.xml +1 -15
- package/test/specs/compile.js +3 -2
- package/test/specs/compilefile.js +3 -3
- package/test/specs/new.js +1 -1
- package/test/specs/optimizer.js +10 -13
- package/Alloy/commands/compile/parsers/Ti.UI.iPhone.NavigationGroup.js +0 -58
- package/dangerfile.js +0 -20
- package/samples/apps/advanced/complex_styling/themes/mobileweb/styles/app.tss +0 -11
- package/samples/apps/advanced/complex_styling/themes/mobileweb/styles/requiredlabel.tss +0 -4
- package/samples/apps/advanced/complex_styling/views/mobileweb/label.xml +0 -3
- package/samples/apps/advanced/device_query/_generated/mobileweb/alloy/controllers/index.js +0 -60
- package/samples/apps/advanced/dynamic_styling/views/mobileweb/features/autoStyle.xml +0 -54
- package/samples/apps/advanced/form_factor/_generated/mobileweb/alloy/controllers/index.js +0 -121
- package/samples/apps/advanced/inheritance/_generated/mobileweb/alloy/controllers/animatedDialog.js +0 -44
- package/samples/apps/advanced/inheritance/_generated/mobileweb/alloy/controllers/baseDialog.js +0 -88
- package/samples/apps/advanced/inheritance/_generated/mobileweb/alloy/controllers/index.js +0 -59
- package/samples/apps/advanced/master_detail/_generated/mobileweb/alloy/controllers/detail.js +0 -102
- package/samples/apps/advanced/master_detail/_generated/mobileweb/alloy/controllers/index.js +0 -35
- package/samples/apps/advanced/master_detail/_generated/mobileweb/alloy/controllers/master.js +0 -53
- package/samples/apps/advanced/master_detail/_generated/mobileweb/alloy/controllers/row.js +0 -67
- package/samples/apps/advanced/native_modules/_generated/mobileweb/alloy/controllers/index.js +0 -37
- package/samples/apps/advanced/platform_folders/_generated/mobileweb/alloy/controllers/index.js +0 -60
- package/samples/apps/advanced/proxy_property_requires/_generated/mobileweb/alloy/controllers/index.js +0 -207
- package/samples/apps/advanced/proxy_property_requires/_generated/mobileweb/alloy/controllers/proxy.js +0 -51
- package/samples/apps/advanced/proxy_property_requires/_generated/mobileweb/alloy/controllers/window.js +0 -49
- package/samples/apps/advanced/proxy_property_requires/_generated/mobileweb/alloy/widgets/com.foo.widget/controllers/row.js +0 -46
- package/samples/apps/advanced/proxy_property_requires/_generated/mobileweb/alloy/widgets/com.foo.widget/controllers/row_bind.js +0 -46
- package/samples/apps/advanced/proxy_property_requires/_generated/mobileweb/alloy/widgets/com.foo.widget/controllers/section.js +0 -59
- package/samples/apps/advanced/proxy_property_requires/_generated/mobileweb/alloy/widgets/com.foo.widget/styles/row.js +0 -14
- package/samples/apps/advanced/proxy_property_requires/_generated/mobileweb/alloy/widgets/com.foo.widget/styles/row_bind.js +0 -14
- package/samples/apps/advanced/proxy_property_requires/_generated/mobileweb/alloy/widgets/com.foo.widget/styles/section.js +0 -14
- package/samples/apps/advanced/themes/_generated/mobileweb/alloy/controllers/dialog.js +0 -112
- package/samples/apps/advanced/themes/_generated/mobileweb/alloy/controllers/index.js +0 -118
- package/samples/apps/basics/builtins/_generated/mobileweb/alloy/controllers/index.js +0 -102
- package/samples/apps/basics/config_json/_generated/mobileweb/alloy/controllers/index.js +0 -49
- package/samples/apps/basics/controller_events/_generated/mobileweb/alloy/controllers/CustomView.js +0 -60
- package/samples/apps/basics/controller_events/_generated/mobileweb/alloy/controllers/index.js +0 -57
- package/samples/apps/basics/global_style/_generated/mobileweb/alloy/controllers/index.js +0 -40
- package/samples/apps/basics/global_style/_generated/mobileweb/alloy/controllers/item.js +0 -45
- package/samples/apps/basics/markup_events/_generated/mobileweb/alloy/controllers/index.js +0 -49
- package/samples/apps/basics/markup_require/_generated/mobileweb/alloy/controllers/bottom.js +0 -42
- package/samples/apps/basics/markup_require/_generated/mobileweb/alloy/controllers/index.js +0 -49
- package/samples/apps/basics/markup_require/_generated/mobileweb/alloy/controllers/middle.js +0 -45
- package/samples/apps/basics/markup_require/_generated/mobileweb/alloy/controllers/theRest.js +0 -41
- package/samples/apps/basics/simple/_generated/mobileweb/alloy/controllers/index.js +0 -49
- package/samples/apps/models/journal/views/mobileweb/index.xml +0 -19
- package/samples/apps/widgets/complex/widgets/com.appcelerator.loading/assets/mobileweb/images/00.png +0 -0
- package/samples/apps/widgets/complex/widgets/com.appcelerator.loading/assets/mobileweb/images/01.png +0 -0
- package/samples/apps/widgets/complex/widgets/com.appcelerator.loading/assets/mobileweb/images/02.png +0 -0
- package/samples/apps/widgets/complex/widgets/com.appcelerator.loading/assets/mobileweb/images/03.png +0 -0
- package/samples/apps/widgets/complex/widgets/com.appcelerator.loading/assets/mobileweb/images/04.png +0 -0
- package/samples/apps/widgets/complex/widgets/com.appcelerator.loading/assets/mobileweb/images/05.png +0 -0
- package/samples/apps/widgets/complex/widgets/com.appcelerator.loading/assets/mobileweb/images/06.png +0 -0
- package/samples/apps/widgets/complex/widgets/com.appcelerator.loading/assets/mobileweb/images/07.png +0 -0
- package/samples/apps/widgets/complex/widgets/com.appcelerator.loading/assets/mobileweb/images/08.png +0 -0
- package/samples/apps/widgets/complex/widgets/com.appcelerator.loading/assets/mobileweb/images/09.png +0 -0
- package/samples/apps/widgets/complex/widgets/com.appcelerator.loading/assets/mobileweb/images/10.png +0 -0
- package/samples/apps/widgets/complex/widgets/com.appcelerator.loading/assets/mobileweb/images/11.png +0 -0
- package/samples/apps/widgets/complex/widgets/com.appcelerator.loading/assets/mobileweb/images/spinner.png +0 -0
package/Alloy/template/README
CHANGED
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
Welcome to Alloy. Prepare to be amazed.
|
|
2
2
|
=======================================
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
Alloy for Titanium provides you, the developer, with the ability to run fast, jump high and generally code like an amazing superstar.
|
|
4
|
+
Alloy for Titanium provides you, the developer, with the ability to run fast, jump high and generally code like an amazing superstar.
|
|
7
5
|
|
|
8
6
|
Codestrong!
|
|
9
7
|
|
|
10
|
-
[1] http://en.wikipedia.org/wiki/Titanium_alloy
|
|
11
|
-
|
|
12
|
-
-------------------------
|
|
13
|
-
Now to the serious stuff.
|
|
14
8
|
-------------------------
|
|
15
9
|
|
|
16
10
|
Here's how your Alloy directory is laid out.
|
|
@@ -24,8 +18,8 @@ assets All files here will be deployed into Resources
|
|
|
24
18
|
Folders not generated by Alloy automatically, but the developer can create and use.
|
|
25
19
|
|
|
26
20
|
lib put your own libraries here and use require('name') to load it
|
|
27
|
-
migrations
|
|
28
|
-
widgets
|
|
21
|
+
migrations generated model migrations go here
|
|
22
|
+
widgets pre-built, reusable components for your Alloy apps.
|
|
29
23
|
|
|
30
24
|
In the root are the alloy.jmk file and config.json files. Alloy.jmk acts like a makefile and can be used to hook into the Alloy compiler to customize the build process. The config.json file is where you can declare runtime constants, and widget dependencies.
|
|
31
25
|
|
package/Alloy/template/app.tss
CHANGED
|
@@ -7,20 +7,13 @@ have the lowest priority of any style settings.
|
|
|
7
7
|
For more information, see the "Style Priorities" section of
|
|
8
8
|
http://docs.appcelerator.com/platform/latest/#!/guide/Alloy_Styles_and_Themes
|
|
9
9
|
|
|
10
|
-
For example, the following would apply to all labels
|
|
11
|
-
and text fields (depending on platform) in your app unless you
|
|
10
|
+
For example, the following would apply to all labels in your app unless you
|
|
12
11
|
overrode the settings with other TSS, XML, or JS settings:
|
|
13
12
|
|
|
14
|
-
'Label
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
'Window': {
|
|
19
|
-
backgroundColor: '#fff' // white background instead of default transparent or black
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
'TextField[platform=android]': {
|
|
23
|
-
height: Ti.UI.SIZE
|
|
13
|
+
'Label': {
|
|
14
|
+
height: Ti.UI.SIZE,
|
|
15
|
+
width: Ti.UI.SIZE,
|
|
16
|
+
touchEnabled: false
|
|
24
17
|
}
|
|
25
18
|
|
|
26
19
|
*/
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Arguments passed into this controller can be accessed via the `$.args` object directly or:
|
|
2
|
-
|
|
2
|
+
const args = $.args;
|
|
@@ -477,23 +477,6 @@ exports.isTablet = (function() {
|
|
|
477
477
|
var psc = Ti.Platform.Android.physicalSizeCategory;
|
|
478
478
|
return psc === Ti.Platform.Android.PHYSICAL_SIZE_CATEGORY_LARGE ||
|
|
479
479
|
psc === Ti.Platform.Android.PHYSICAL_SIZE_CATEGORY_XLARGE;
|
|
480
|
-
} else if (OS_MOBILEWEB) {
|
|
481
|
-
return Math.min(
|
|
482
|
-
Ti.Platform.displayCaps.platformHeight,
|
|
483
|
-
Ti.Platform.displayCaps.platformWidth
|
|
484
|
-
) >= 400;
|
|
485
|
-
// } else if (OS_BLACKBERRY) {
|
|
486
|
-
// // Tablets not currently supported by BB TiSDK
|
|
487
|
-
// // https://jira.appcelerator.org/browse/TIMOB-13225
|
|
488
|
-
// return false;
|
|
489
|
-
} else if (OS_WINDOWS) {
|
|
490
|
-
// per http://www.extremetech.com/computing/139768-windows-8-smartphones-and-windows-phone-8-tablets
|
|
491
|
-
// tablets should be >= 1024x768 and phones could be lower, though current phones are running at
|
|
492
|
-
// the 1280x720 range and higher
|
|
493
|
-
return Math.max(
|
|
494
|
-
Ti.Platform.displayCaps.platformHeight,
|
|
495
|
-
Ti.Platform.displayCaps.platformWidth
|
|
496
|
-
) >= 1024;
|
|
497
480
|
} else {
|
|
498
481
|
return isTabletFallback();
|
|
499
482
|
}
|
package/Alloy/template/style.tss
CHANGED
package/Alloy/template/view.xml
CHANGED
package/Alloy/tiapp.js
CHANGED
|
@@ -35,20 +35,10 @@ tiapp.getSdkVersion = function() {
|
|
|
35
35
|
} else {
|
|
36
36
|
if (process.env.sdk) {
|
|
37
37
|
return process.env.sdk;
|
|
38
|
-
} else {
|
|
39
|
-
return getSdkSelectVersion();
|
|
40
38
|
}
|
|
41
39
|
}
|
|
42
40
|
};
|
|
43
|
-
|
|
44
|
-
var homeDir = process.env[(process.platform == 'win32') ? 'USERPROFILE' : 'HOME'],
|
|
45
|
-
file = path.join(homeDir, '.titanium', 'config.json');
|
|
46
|
-
if (!fs.existsSync(file)) {
|
|
47
|
-
U.die('Titanium configuration file does not exist at "' + file + '"');
|
|
48
|
-
}
|
|
49
|
-
var ticonfig = JSON.parse(fs.readFileSync(file, {encoding: 'utf8'}));
|
|
50
|
-
return ticonfig.sdk.selected;
|
|
51
|
-
}
|
|
41
|
+
|
|
52
42
|
|
|
53
43
|
// Get the value of a property from the tiapp.xml
|
|
54
44
|
tiapp.getProperty = function(name) {
|
package/Alloy/utils.js
CHANGED
|
@@ -6,7 +6,7 @@ var path = require('path'),
|
|
|
6
6
|
colors = require('colors'),
|
|
7
7
|
crypto = require('crypto'),
|
|
8
8
|
util = require('util'),
|
|
9
|
-
jsonlint = require('jsonlint'),
|
|
9
|
+
jsonlint = require('@prantlf/jsonlint'),
|
|
10
10
|
resolve = require('resolve'),
|
|
11
11
|
paths = require('global-paths'),
|
|
12
12
|
logger = require('./logger'),
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
# [2.1.0](https://github.com/tidev/alloy/compare/2.0.2...2.1.0) (2024-01-09)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **all:** remove getter in PickerColumn parser ([f916130](https://github.com/tidev/alloy/commit/f91613060b9477ac0bc1c3f534ec367369565a02))
|
|
7
|
+
* missing includes ([819d114](https://github.com/tidev/alloy/commit/819d1142ea6a74d2c5159f2d3a1c48ac351b102a))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* **all:** update packages ([1837254](https://github.com/tidev/alloy/commit/18372540804f5f602b406265015b4c513d18aafe))
|
|
13
|
+
* **android:** add collapseToolbar support ([#1360](https://github.com/tidev/alloy/issues/1360)) ([c3f5e95](https://github.com/tidev/alloy/commit/c3f5e959a41ec2002eb79032eee54c9f3536015c))
|
|
14
|
+
* update momentjs ([#1358](https://github.com/tidev/alloy/issues/1358)) ([100ff29](https://github.com/tidev/alloy/commit/100ff29841ab01f67bb368a2bbcc7e913bfe6622))
|
|
15
|
+
* update underscore to version 1.13.6 ([36b2fc8](https://github.com/tidev/alloy/commit/36b2fc87be8a0732f3bcb3f31f62b52c86cf80ad))
|
|
16
|
+
|
|
1
17
|
## [1.17.3](https://github.com/tidev/alloy/compare/1.17.2...1.17.3) (2022-01-10)
|
|
2
18
|
|
|
3
19
|
|
package/README.md
CHANGED
|
@@ -70,6 +70,22 @@ jake app:run dir=basics/simple
|
|
|
70
70
|
* If you decide to ignore my advice and run the tests anyway on Windows, make sure that if you imported the Harness into TiStudio that you _don't_ have TiStudio running. Windows creates locks on key files in that project that are necessary for the testing process. It will make tests fail erroneously.
|
|
71
71
|
* If you're still that stubborn, are running the test suite on Windows, and you're getting those intermittent, erroneous errors, try running them one spec at a time. Instead of doing `jake test:all`, do `jake test:spec[SPEC_NAME]`, where `SPEC_NAME` is JS file in the [test specs folder](https://github.com/tidev/alloy/tree/master/test/specs).
|
|
72
72
|
|
|
73
|
+
## Update moment.js/Backbone/Underscore
|
|
74
|
+
|
|
75
|
+
### moment.js
|
|
76
|
+
|
|
77
|
+
Download the latest ZIP from https://github.com/moment/moment and then copy /moment.js (not dist/moment.js!) into `Alloy/builtins` and the locale/* files (not dist/locale/* !) to `Alloy/builtins/moment/lang`. After that do a search & replace and replace all `require('../moment')` with `require('/alloy/moment')`.
|
|
78
|
+
|
|
79
|
+
### Backbone
|
|
80
|
+
|
|
81
|
+
Download the development version from https://backbonejs.org/ and put it into `Alloy/lib/alloy/backbone` with the correct version number. Open `Alloy/common/constants.js` and add the version to `SUPPORTED_BACKBONE_VERSIONS`. Then you can use your apps config.json file to switch to that version. If you want to make it the default version you can edit `DEFAULT_BACKBONE_VERSION` and the config.json files in all `template/` projects.
|
|
82
|
+
|
|
83
|
+
Open the backbone.js file and replace `var _ = require('underscore'), $;` with `var _ = require('/alloy/underscore'), $;`. Use `console.log(Backbone.VERSION);` to check the version inside your app.
|
|
84
|
+
|
|
85
|
+
### Underscore
|
|
86
|
+
|
|
87
|
+
Download the UMD (dev) version from https://underscorejs.org/ and replace `Alloy/lib/alloy/underscore.js`. Use `console.log(_.VERSION);` to check the version inside your app.
|
|
88
|
+
|
|
73
89
|
## Contributing
|
|
74
90
|
|
|
75
91
|
Interested in contributing? There are several ways you can help contribute to this project.
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"html5",
|
|
12
12
|
"appc-client"
|
|
13
13
|
],
|
|
14
|
-
"version": "
|
|
14
|
+
"version": "3.0.0",
|
|
15
15
|
"author": "TiDev, Inc. <npm@tidev.io>",
|
|
16
16
|
"bugs": {
|
|
17
17
|
"url": "https://github.com/tidev/alloy/issues"
|
|
@@ -22,28 +22,28 @@
|
|
|
22
22
|
},
|
|
23
23
|
"preferGlobal": true,
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@babel/code-frame": "^7.
|
|
26
|
-
"@babel/core": "^7.
|
|
27
|
-
"@babel/generator": "^7.
|
|
28
|
-
"@babel/parser": "^7.
|
|
29
|
-
"@babel/template": "^7.
|
|
30
|
-
"@babel/traverse": "^7.
|
|
31
|
-
"@babel/types": "^7.
|
|
32
|
-
"@
|
|
33
|
-
"
|
|
25
|
+
"@babel/code-frame": "^7.18.6",
|
|
26
|
+
"@babel/core": "^7.19.6",
|
|
27
|
+
"@babel/generator": "^7.20.0",
|
|
28
|
+
"@babel/parser": "^7.20.0",
|
|
29
|
+
"@babel/template": "^7.18.10",
|
|
30
|
+
"@babel/traverse": "^7.18.15",
|
|
31
|
+
"@babel/types": "^7.20.0",
|
|
32
|
+
"@prantlf/jsonlint": "11.7.0",
|
|
33
|
+
"@xmldom/xmldom": "^0.8.5",
|
|
34
|
+
"async": "^3.2.4",
|
|
34
35
|
"colors": "1.4.0",
|
|
35
|
-
"commander": "^
|
|
36
|
-
"ejs": "3.1.
|
|
37
|
-
"fs-extra": "^
|
|
36
|
+
"commander": "^9.4.1",
|
|
37
|
+
"ejs": "3.1.8",
|
|
38
|
+
"fs-extra": "^10.1.0",
|
|
38
39
|
"global-paths": "^1.0.0",
|
|
39
|
-
"jsonlint": "1.6.3",
|
|
40
40
|
"lodash": "^4.17.4",
|
|
41
|
-
"moment": "2.
|
|
42
|
-
"node.extend": "2.0.
|
|
41
|
+
"moment": "2.30.1",
|
|
42
|
+
"node.extend": "2.0.3",
|
|
43
43
|
"pkginfo": "0.4.1",
|
|
44
|
-
"resolve": "^1.1
|
|
45
|
-
"source-map": "^0.7.
|
|
46
|
-
"walk-sync": "^0.
|
|
44
|
+
"resolve": "^1.22.1",
|
|
45
|
+
"source-map": "^0.7.4",
|
|
46
|
+
"walk-sync": "^3.0.0",
|
|
47
47
|
"xml2tss": "0.0.5"
|
|
48
48
|
},
|
|
49
49
|
"license": "Apache-2.0",
|
|
@@ -57,34 +57,11 @@
|
|
|
57
57
|
},
|
|
58
58
|
"main": "./Alloy/alloy",
|
|
59
59
|
"engines": {
|
|
60
|
-
"node": ">=
|
|
60
|
+
"node": ">=20.18.1"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"@semantic-release/changelog": "^6.0.0",
|
|
67
|
-
"@semantic-release/git": "^10.0.0",
|
|
68
|
-
"danger": "^10.5.0",
|
|
69
|
-
"diff": "^5.0.0",
|
|
70
|
-
"eslint": "^8.0.1",
|
|
71
|
-
"jake": "^10.8.2",
|
|
72
|
-
"semantic-release": "^18.0.0"
|
|
73
|
-
},
|
|
74
|
-
"release": {
|
|
75
|
-
"tagFormat": "${version}",
|
|
76
|
-
"plugins": [
|
|
77
|
-
"@semantic-release/commit-analyzer",
|
|
78
|
-
"@semantic-release/release-notes-generator",
|
|
79
|
-
"@semantic-release/changelog",
|
|
80
|
-
"@semantic-release/npm",
|
|
81
|
-
"@semantic-release/git",
|
|
82
|
-
[
|
|
83
|
-
"@semantic-release/github",
|
|
84
|
-
{
|
|
85
|
-
"successComment": false
|
|
86
|
-
}
|
|
87
|
-
]
|
|
88
|
-
]
|
|
63
|
+
"diff": "^5.1.0",
|
|
64
|
+
"eslint": "^8.26.0",
|
|
65
|
+
"jake": "^10.8.2"
|
|
89
66
|
}
|
|
90
67
|
}
|
package/samples/lib/testUtils.js
CHANGED
|
@@ -10,7 +10,7 @@ var exec = require('child_process').exec,
|
|
|
10
10
|
var alloyRoot = path.join(__dirname, '..', '..');
|
|
11
11
|
var IS_WIN = /^win/i.test(os.platform());
|
|
12
12
|
|
|
13
|
-
exports.TIMEOUT_DEFAULT =
|
|
13
|
+
exports.TIMEOUT_DEFAULT = 10000;
|
|
14
14
|
exports.paths = {
|
|
15
15
|
templates: path.join(alloyRoot, 'Alloy', 'template'),
|
|
16
16
|
harnessTemplate: path.join(alloyRoot, 'test', 'projects', 'HarnessTemplate'),
|
package/test/lib/testUtils.js
CHANGED
|
@@ -19,7 +19,7 @@ exports.paths = {
|
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
function createEnv () {
|
|
22
|
-
return Object.assign(process.env, { PATH: `${
|
|
22
|
+
return Object.assign(process.env, { PATH: `${path.join(process.cwd(), 'bin')}${path.delimiter}${process.env.PATH}`})
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
// Recreate the test app harness
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<ti:app xmlns:ti="http://ti.appcelerator.org">
|
|
3
3
|
<deployment-targets>
|
|
4
|
-
<target device="mobileweb">true</target>
|
|
5
4
|
<target device="iphone">true</target>
|
|
6
5
|
<target device="ipad">true</target>
|
|
7
6
|
<target device="android">true</target>
|
|
8
|
-
<target device="blackberry">true</target>
|
|
9
|
-
<target device="windows">true</target>
|
|
10
7
|
</deployment-targets>
|
|
11
8
|
<id>com.appcelerator.AlloyHarness</id>
|
|
12
9
|
<name>Harness</name>
|
|
@@ -67,21 +64,10 @@
|
|
|
67
64
|
</application>
|
|
68
65
|
</manifest>
|
|
69
66
|
</android>
|
|
70
|
-
<mobileweb>
|
|
71
|
-
<precache/>
|
|
72
|
-
<splash>
|
|
73
|
-
<enabled>true</enabled>
|
|
74
|
-
<inline-css-images>true</inline-css-images>
|
|
75
|
-
</splash>
|
|
76
|
-
<theme>default</theme>
|
|
77
|
-
</mobileweb>
|
|
78
|
-
<windows>
|
|
79
|
-
<!-- Add Windows specific nodes, such as orientation handling, here -->
|
|
80
|
-
</windows>
|
|
81
67
|
<modules>
|
|
82
68
|
<module platform="iphone">ti.paint</module>
|
|
83
69
|
<module platform="android">ti.map</module>
|
|
84
70
|
<module platform="iphone">ti.map</module>
|
|
85
|
-
<module platform="windows">ti.map</module>
|
|
86
71
|
</modules>
|
|
72
|
+
<sdk-version>12.6.1.GA</sdk-version>
|
|
87
73
|
</ti:app>
|
package/test/specs/compile.js
CHANGED
|
@@ -11,8 +11,8 @@ var fs = require('fs'),
|
|
|
11
11
|
platforms = require('../../platforms/index'),
|
|
12
12
|
sep = process.platform !== 'win32' ? '/' : '\\';
|
|
13
13
|
|
|
14
|
-
var TIMEOUT_COMPILE =
|
|
15
|
-
var TIMEOUT_PREP =
|
|
14
|
+
var TIMEOUT_COMPILE = 20000;
|
|
15
|
+
var TIMEOUT_PREP = 30000;
|
|
16
16
|
var GEN_FOLDER = '_generated';
|
|
17
17
|
var TEST_FOLDER = 'testing';
|
|
18
18
|
var EXCLUDE_FOLDERS = [
|
|
@@ -44,6 +44,7 @@ exec('ti sdk list --output json', function(error, stdout, stderr){
|
|
|
44
44
|
*/
|
|
45
45
|
|
|
46
46
|
delete platforms.mobileweb;
|
|
47
|
+
delete platforms.windows;
|
|
47
48
|
|
|
48
49
|
var alloyRoot = path.join(__dirname,'..','..'),
|
|
49
50
|
paths = {
|
|
@@ -6,9 +6,9 @@ var fs = require('fs-extra'),
|
|
|
6
6
|
platforms = require('../../platforms/index'),
|
|
7
7
|
_ = require('lodash');
|
|
8
8
|
|
|
9
|
-
var TIMEOUT_DEFAULT =
|
|
10
|
-
var TIMEOUT_COMPILE =
|
|
11
|
-
var TIMEOUT_PREP =
|
|
9
|
+
var TIMEOUT_DEFAULT = 20000;
|
|
10
|
+
var TIMEOUT_COMPILE = 20000;
|
|
11
|
+
var TIMEOUT_PREP = 30000;
|
|
12
12
|
var GEN_FOLDER = '_generated';
|
|
13
13
|
var TEST_FOLDER = 'testing';
|
|
14
14
|
|
package/test/specs/new.js
CHANGED
package/test/specs/optimizer.js
CHANGED
|
@@ -14,15 +14,15 @@ var tests = [
|
|
|
14
14
|
['var a = Ti.Platform.name', 'var a = "<%= name %>";'],
|
|
15
15
|
['var a = Titanium.Platform.name', 'var a = "<%= name %>";'],
|
|
16
16
|
['var a = Ti.Platform.name=="<%= name %>" ? 1 : 0', 'var a = "<%= name %>" == "<%= name %>" ? 1 : 0;'],
|
|
17
|
-
['var a = Ti.Platform.name=="<%= name %>",\nb', 'var a = "<%= name %>" == "<%= name %>",\
|
|
18
|
-
['var a = Ti.Platform.name=="<%= name %>",\nb,\nc = 2', 'var a = "<%= name %>" == "<%= name %>",\
|
|
17
|
+
['var a = Ti.Platform.name=="<%= name %>",\nb', 'var a = "<%= name %>" == "<%= name %>",\n b;'],
|
|
18
|
+
['var a = Ti.Platform.name=="<%= name %>",\nb,\nc = 2', 'var a = "<%= name %>" == "<%= name %>",\n b,\n c = 2;'],
|
|
19
19
|
['var a = Ti.Platform.name=="<%= name %>"', 'var a = "<%= name %>" == "<%= name %>";'],
|
|
20
|
-
['var a,\nb = Ti.Platform.name=="<%= name %>",\nc = 2;', 'var a,\
|
|
20
|
+
['var a,\nb = Ti.Platform.name=="<%= name %>",\nc = 2;', 'var a,\n b = "<%= name %>" == "<%= name %>",\n c = 2;'],
|
|
21
21
|
['var a = "<%= name %>"==Ti.Platform.name ? 1 : 0', 'var a = "<%= name %>" == "<%= name %>" ? 1 : 0;'],
|
|
22
|
-
['var a = "<%= name %>"==Ti.Platform.name,\nb', 'var a = "<%= name %>" == "<%= name %>",\
|
|
23
|
-
['var a = "<%= name %>"==Ti.Platform.name,\nb,\nc = 2', 'var a = "<%= name %>" == "<%= name %>",\
|
|
22
|
+
['var a = "<%= name %>"==Ti.Platform.name,\nb', 'var a = "<%= name %>" == "<%= name %>",\n b;'],
|
|
23
|
+
['var a = "<%= name %>"==Ti.Platform.name,\nb,\nc = 2', 'var a = "<%= name %>" == "<%= name %>",\n b,\n c = 2;'],
|
|
24
24
|
['var a = "<%= name %>"==Ti.Platform.name', 'var a = "<%= name %>" == "<%= name %>";'],
|
|
25
|
-
['var a,\nb = "<%= name %>"==Ti.Platform.name,\nc = 2;', 'var a,\
|
|
25
|
+
['var a,\nb = "<%= name %>"==Ti.Platform.name,\nc = 2;', 'var a,\n b = "<%= name %>" == "<%= name %>",\n c = 2;'],
|
|
26
26
|
['var a = "1"', 'var a = "1";'],
|
|
27
27
|
['var a = true', 'var a = true;'],
|
|
28
28
|
['var a = 1', 'var a = 1;'],
|
|
@@ -32,9 +32,7 @@ var tests = [
|
|
|
32
32
|
['var a = new Object()', 'var a = new Object();'],
|
|
33
33
|
['var a = Ti.Platform.name', 'var a = "<%= name %>";'],
|
|
34
34
|
['var a = Ti.Platform.osname', 'var a = "android";', ['android']],
|
|
35
|
-
['var a =
|
|
36
|
-
['var a = Ti.Platform.osname', 'var a = "blackberry";', ['blackberry']],
|
|
37
|
-
['var a,\nb = 1,\nc = 2;', 'var a,\nb = 1,\nc = 2;'],
|
|
35
|
+
['var a,\nb = 1,\nc = 2;', 'var a,\n b = 1,\n c = 2;'],
|
|
38
36
|
['var a = 1;', 'var a = 1;'],
|
|
39
37
|
['var a =+1;', 'var a = +1;'],
|
|
40
38
|
['var a =1+1;', 'var a = 1 + 1;'],
|
|
@@ -90,9 +88,10 @@ var tests = [
|
|
|
90
88
|
var platforms = {};
|
|
91
89
|
var platformsDir = path.join(__dirname,'..','..','platforms');
|
|
92
90
|
_.each(CONST.PLATFORMS, function(p) {
|
|
93
|
-
|
|
91
|
+
if (p != "mobileweb" && p != "windows") {
|
|
92
|
+
platforms[p] = require(path.join(platformsDir,p,'index'));
|
|
93
|
+
}
|
|
94
94
|
});
|
|
95
|
-
|
|
96
95
|
// The alloy command test suite
|
|
97
96
|
describe('optimizer.js', function() {
|
|
98
97
|
_.each(tests, function(test, index) {
|
|
@@ -102,7 +101,6 @@ describe('optimizer.js', function() {
|
|
|
102
101
|
var ast, code,
|
|
103
102
|
testContent = _.template(test[0])(platforms[platform]),
|
|
104
103
|
prefix = pad(platform);
|
|
105
|
-
|
|
106
104
|
it(prefix + testContent.blue, function() {
|
|
107
105
|
expect(true).toBe(true);
|
|
108
106
|
});
|
|
@@ -128,7 +126,6 @@ describe('optimizer.js', function() {
|
|
|
128
126
|
};
|
|
129
127
|
expect(squeezeFunction).not.toThrow();
|
|
130
128
|
});
|
|
131
|
-
|
|
132
129
|
it(prefix + 'generated code matches expected code', function() {
|
|
133
130
|
var passFor = test[2];
|
|
134
131
|
var expected = _.template(test[1])(platforms[platform]);
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
var styler = require('../styler'),
|
|
2
|
-
U = require('../../../utils'),
|
|
3
|
-
CU = require('../compilerUtils'),
|
|
4
|
-
tiapp = require('../../../tiapp'),
|
|
5
|
-
logger = require('../../../logger');
|
|
6
|
-
|
|
7
|
-
var DEPRECATED_VERSION = '3.1.3';
|
|
8
|
-
|
|
9
|
-
exports.parse = function(node, state) {
|
|
10
|
-
return require('./base').parse(node, state, parse);
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
function parse(node, state, args) {
|
|
14
|
-
if (tiapp.version.gte(tiapp.getSdkVersion(), DEPRECATED_VERSION)) {
|
|
15
|
-
logger.warn([
|
|
16
|
-
'Ti.UI.iPhone.NavigationGroup (line ' + node.lineNumber + ') is deprecated as of Titanium ' + DEPRECATED_VERSION,
|
|
17
|
-
'Use Ti.UI.NavigationWindow instead'
|
|
18
|
-
]);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
var children = U.XML.getElementsFromNodes(node.childNodes),
|
|
22
|
-
err = ['NavigationGroup must have only one child element, which must be a Window'],
|
|
23
|
-
code = '';
|
|
24
|
-
|
|
25
|
-
// NavigationGroup must have 1 window as a child
|
|
26
|
-
if (children.length !== 1) {
|
|
27
|
-
U.die(err);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
var child = children[0],
|
|
31
|
-
childArgs = CU.getParserArgs(child),
|
|
32
|
-
theNode = CU.validateNodeName(child, 'Ti.UI.Window'),
|
|
33
|
-
windowSymbol;
|
|
34
|
-
|
|
35
|
-
// generate the code for the Window first
|
|
36
|
-
if (theNode) {
|
|
37
|
-
code += CU.generateNodeExtended(child, state, {
|
|
38
|
-
parent: {},
|
|
39
|
-
post: function(node, state, args) {
|
|
40
|
-
windowSymbol = state.parent.symbol;
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
} else {
|
|
44
|
-
err.unshift('Invalid NavigationGroup child "' + childArgs.fullname + '"');
|
|
45
|
-
U.die(err);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
// create navgroup with window
|
|
49
|
-
state.extraStyle = styler.createVariableStyle('window', windowSymbol);
|
|
50
|
-
code += require('./default').parse(node, state).code;
|
|
51
|
-
|
|
52
|
-
// Update the parsing state
|
|
53
|
-
return {
|
|
54
|
-
parent: {},
|
|
55
|
-
styles: state.styles,
|
|
56
|
-
code: code
|
|
57
|
-
};
|
|
58
|
-
}
|
package/dangerfile.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/* global process, fail */
|
|
2
|
-
|
|
3
|
-
// requires
|
|
4
|
-
const eslint = require('@seadub/danger-plugin-eslint').default;
|
|
5
|
-
const junit = require('@seadub/danger-plugin-junit').default;
|
|
6
|
-
const dependencies = require('@seadub/danger-plugin-dependencies').default;
|
|
7
|
-
|
|
8
|
-
async function main() {
|
|
9
|
-
await Promise.all([
|
|
10
|
-
eslint(),
|
|
11
|
-
junit({ pathToReport: './TEST-*.xml' }),
|
|
12
|
-
dependencies({ type: 'npm' })
|
|
13
|
-
]);
|
|
14
|
-
}
|
|
15
|
-
main()
|
|
16
|
-
.then(() => process.exit(0))
|
|
17
|
-
.catch(err => {
|
|
18
|
-
fail(err.toString());
|
|
19
|
-
process.exit(1);
|
|
20
|
-
});
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
function __processArg(obj, key) {
|
|
2
|
-
var arg = null;
|
|
3
|
-
if (obj) {
|
|
4
|
-
arg = obj[key] || null;
|
|
5
|
-
delete obj[key];
|
|
6
|
-
}
|
|
7
|
-
return arg;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
function Controller() {
|
|
11
|
-
require("/alloy/controllers/BaseController").apply(this, Array.prototype.slice.call(arguments));
|
|
12
|
-
this.__controllerPath = "index";
|
|
13
|
-
this.args = arguments[0] || {};
|
|
14
|
-
if (arguments[0]) {
|
|
15
|
-
__processArg(arguments[0], "__parentSymbol");
|
|
16
|
-
__processArg(arguments[0], "$model");
|
|
17
|
-
__processArg(arguments[0], "__itemTemplate");
|
|
18
|
-
}
|
|
19
|
-
var $ = this;
|
|
20
|
-
var exports = {};
|
|
21
|
-
$.__views.win = Ti.UI.createWindow({
|
|
22
|
-
backgroundColor: "#00f",
|
|
23
|
-
id: "win"
|
|
24
|
-
});
|
|
25
|
-
$.__views.win && $.addTopLevelView($.__views.win);
|
|
26
|
-
$.__views.osLabel = Ti.UI.createLabel(function() {
|
|
27
|
-
var o = {};
|
|
28
|
-
Alloy.deepExtend(true, o, {
|
|
29
|
-
color: "#fff",
|
|
30
|
-
height: Ti.UI.SIZE,
|
|
31
|
-
width: Ti.UI.SIZE,
|
|
32
|
-
textAlign: "center",
|
|
33
|
-
font: {
|
|
34
|
-
fontSize: 48,
|
|
35
|
-
fontWeight: "bold"
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
Alloy.isTablet && Alloy.deepExtend(true, o, {
|
|
39
|
-
font: {
|
|
40
|
-
fontSize: 96,
|
|
41
|
-
fontWeight: "bold"
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
Alloy.deepExtend(true, o, {
|
|
45
|
-
text: "Mobileweb",
|
|
46
|
-
id: "osLabel"
|
|
47
|
-
});
|
|
48
|
-
return o;
|
|
49
|
-
}());
|
|
50
|
-
$.__views.win.add($.__views.osLabel);
|
|
51
|
-
exports.destroy = function() {};
|
|
52
|
-
_.extend($, $.__views);
|
|
53
|
-
$.win.open();
|
|
54
|
-
require("specs/index")($);
|
|
55
|
-
_.extend($, exports);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
var Alloy = require("/alloy"), Backbone = Alloy.Backbone, _ = Alloy._;
|
|
59
|
-
|
|
60
|
-
module.exports = Controller;
|