Skip to content

Commit

Permalink
chore: update Alloy defaults (#1366)
Browse files Browse the repository at this point in the history
* chore: update Alloy defaults

* add class to window to create a tss file
  • Loading branch information
m1ga authored Jan 3, 2024
1 parent 100ff29 commit 29a8a54
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 30 deletions.
12 changes: 3 additions & 9 deletions Alloy/template/README
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
Welcome to Alloy. Prepare to be amazed.
=======================================

Titanium Alloys are metals which contain a mixture of Titanium and other chemical elements. Such Alloys have very high tensile strength and toughness (even at extreme temperatures). They are light weight, have extraordinary corrosion resistance and the ability to withstand extreme temperatures [1].

Alloy for Titanium provides you, the developer, with the ability to run fast, jump high and generally code like an amazing superstar.
Alloy for Titanium provides you, the developer, with the ability to run fast, jump high and generally code like an amazing superstar.

Codestrong!

[1] http://en.wikipedia.org/wiki/Titanium_alloy

-------------------------
Now to the serious stuff.
-------------------------

Here's how your Alloy directory is laid out.
Expand All @@ -24,8 +18,8 @@ assets All files here will be deployed into Resources
Folders not generated by Alloy automatically, but the developer can create and use.

lib put your own libraries here and use require('name') to load it
migrations generated model migrations go here
widgets pre-built, reusable components for your Alloy apps.
migrations generated model migrations go here
widgets pre-built, reusable components for your Alloy apps.

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.

Expand Down
17 changes: 5 additions & 12 deletions Alloy/template/app.tss
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,13 @@ have the lowest priority of any style settings.
For more information, see the "Style Priorities" section of
http://docs.appcelerator.com/platform/latest/#!/guide/Alloy_Styles_and_Themes

For example, the following would apply to all labels, windows,
and text fields (depending on platform) in your app unless you
For example, the following would apply to all labels in your app unless you
overrode the settings with other TSS, XML, or JS settings:

'Label[platform=android,windows]': {
color: '#000' // all platforms except Android and Windows default to black
}

'Window': {
backgroundColor: '#fff' // white background instead of default transparent or black
}

'TextField[platform=android]': {
height: Ti.UI.SIZE
'Label': {
height: Ti.UI.SIZE,
width: Ti.UI.SIZE,
touchEnabled: false
}

*/
2 changes: 1 addition & 1 deletion Alloy/template/controller.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// Arguments passed into this controller can be accessed via the `$.args` object directly or:
var args = $.args;
const args = $.args;
3 changes: 0 additions & 3 deletions Alloy/template/style.tss
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
".container" : {

}
7 changes: 4 additions & 3 deletions Alloy/template/view.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<Alloy>
<View class="container">
</View>
</Alloy>
<Window class="mainWindow">

</Window>
</Alloy>
3 changes: 1 addition & 2 deletions Alloy/template/widget/style.tss
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
"Label": {
color: '#000',
font: {
fontSize: 18,
fontWeight: 'bold'
},
height: Ti.UI.SIZE,
width: Ti.UI.SIZE
}
}

0 comments on commit 29a8a54

Please sign in to comment.