@maccesar/titools 2.0.6 → 2.2.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/{AGENTS-TEMPLATE.md → AGENTS-VERCEL-RESEARCH.md} +16 -18
- package/README.md +250 -168
- package/agents/{ti-researcher.md → ti-pro.md} +10 -10
- package/bin/titools.js +16 -12
- package/lib/cleanup.js +95 -0
- package/lib/commands/agents.js +146 -70
- package/lib/commands/skills.js +349 -0
- package/lib/commands/uninstall.js +189 -154
- package/lib/commands/update.js +104 -21
- package/lib/config.js +26 -20
- package/lib/downloader.js +1 -1
- package/lib/installer.js +37 -97
- package/lib/platform.js +9 -5
- package/lib/prompts/checkboxCancel.js +264 -0
- package/lib/prompts/selectCancel.js +204 -0
- package/lib/symlink.js +19 -7
- package/lib/utils.js +21 -31
- package/package.json +10 -10
- package/skills/alloy-guides/SKILL.md +8 -30
- package/skills/alloy-guides/references/CLI_TASKS.md +14 -24
- package/skills/alloy-guides/references/CONCEPTS.md +5 -25
- package/skills/alloy-guides/references/CONTROLLERS.md +2 -19
- package/skills/alloy-guides/references/MODELS.md +40 -10
- package/skills/alloy-guides/references/PURGETSS.md +1 -11
- package/skills/alloy-guides/references/VIEWS_DYNAMIC.md +8 -14
- package/skills/alloy-guides/references/VIEWS_STYLES.md +14 -25
- package/skills/alloy-guides/references/VIEWS_WITHOUT_CONTROLLERS.md +2 -8
- package/skills/alloy-guides/references/VIEWS_XML.md +29 -40
- package/skills/alloy-guides/references/WIDGETS.md +1 -17
- package/skills/alloy-howtos/SKILL.md +1 -22
- package/skills/alloy-howtos/references/best_practices.md +0 -17
- package/skills/alloy-howtos/references/cli_reference.md +1 -23
- package/skills/alloy-howtos/references/config_files.md +86 -15
- package/skills/alloy-howtos/references/custom_tags.md +14 -13
- package/skills/alloy-howtos/references/debugging_troubleshooting.md +3 -22
- package/skills/alloy-howtos/references/samples.md +4 -14
- package/skills/purgetss/SKILL.md +11 -37
- package/skills/purgetss/references/EXAMPLES.md +106 -17
- package/skills/purgetss/references/animation-system.md +0 -67
- package/skills/purgetss/references/apply-directive.md +0 -18
- package/skills/purgetss/references/arbitrary-values.md +0 -25
- package/skills/purgetss/references/class-index.md +0 -46
- package/skills/purgetss/references/cli-commands.md +0 -41
- package/skills/purgetss/references/configurable-properties.md +0 -55
- package/skills/purgetss/references/custom-rules.md +0 -14
- package/skills/purgetss/references/customization-deep-dive.md +0 -49
- package/skills/purgetss/references/dynamic-component-creation.md +56 -37
- package/skills/purgetss/references/grid-layout.md +0 -32
- package/skills/purgetss/references/icon-fonts.md +0 -50
- package/skills/purgetss/references/installation-setup.md +61 -32
- package/skills/purgetss/references/migration-guide.md +127 -0
- package/skills/purgetss/references/opacity-modifier.md +0 -34
- package/skills/purgetss/references/performance-tips.md +261 -0
- package/skills/purgetss/references/platform-modifiers.md +0 -46
- package/skills/purgetss/references/smart-mappings.md +0 -12
- package/skills/purgetss/references/tikit-components.md +393 -0
- package/skills/purgetss/references/titanium-resets.md +1 -27
- package/skills/purgetss/references/ui-ux-design.md +467 -117
- package/skills/{alloy-expert → ti-expert}/SKILL.md +45 -54
- package/skills/ti-expert/references/alloy-builtins.md +387 -0
- package/skills/{alloy-expert → ti-expert}/references/alloy-structure.md +147 -40
- package/skills/ti-expert/references/anti-patterns.md +90 -0
- package/skills/ti-expert/references/cli-expert.md +109 -0
- package/skills/{alloy-expert → ti-expert}/references/code-conventions.md +182 -49
- package/skills/{alloy-expert → ti-expert}/references/controller-patterns.md +103 -93
- package/skills/{alloy-expert → ti-expert}/references/error-handling.md +12 -12
- package/skills/{alloy-expert → ti-expert}/references/examples.md +144 -85
- package/skills/{alloy-expert → ti-expert}/references/migration-patterns.md +38 -36
- package/skills/{alloy-expert → ti-expert}/references/patterns.md +8 -8
- package/skills/ti-expert/references/performance-listview.md +251 -0
- package/skills/{alloy-expert/references/performance-patterns.md → ti-expert/references/performance-optimization.md} +67 -283
- package/skills/{alloy-expert/references/security-patterns.md → ti-expert/references/security-device.md} +12 -295
- package/skills/ti-expert/references/security-fundamentals.md +284 -0
- package/skills/{alloy-expert → ti-expert}/references/state-management.md +10 -10
- package/skills/ti-expert/references/testing-e2e-ci.md +432 -0
- package/skills/ti-expert/references/testing-unit.md +433 -0
- package/skills/ti-expert/references/theming.md +394 -0
- package/skills/ti-guides/SKILL.md +1 -14
- package/skills/ti-guides/references/advanced-data-and-images.md +126 -10
- package/skills/ti-guides/references/app-distribution.md +48 -10
- package/skills/ti-guides/references/application-frameworks.md +9 -2
- package/skills/ti-guides/references/cli-reference.md +338 -82
- package/skills/ti-guides/references/coding-best-practices.md +14 -4
- package/skills/ti-guides/references/commonjs-advanced.md +103 -6
- package/skills/ti-guides/references/hello-world.md +5 -2
- package/skills/ti-guides/references/hyperloop-native-access.md +439 -46
- package/skills/ti-guides/references/javascript-primer.md +4 -3
- package/skills/ti-guides/references/resources.md +0 -1
- package/skills/ti-guides/references/style-and-conventions.md +57 -9
- package/skills/ti-guides/references/tiapp-config.md +48 -6
- package/skills/ti-howtos/SKILL.md +2 -27
- package/skills/ti-howtos/references/android-platform-deep-dives.md +41 -90
- package/skills/ti-howtos/references/automation-fastlane-appium.md +15 -14
- package/skills/ti-howtos/references/buffer-codec-streams.md +22 -22
- package/skills/ti-howtos/references/cross-platform-development.md +68 -37
- package/skills/ti-howtos/references/debugging-profiling.md +8 -53
- package/skills/ti-howtos/references/extending-titanium.md +12 -51
- package/skills/ti-howtos/references/google-maps-v2.md +30 -29
- package/skills/ti-howtos/references/ios-map-kit.md +19 -25
- package/skills/ti-howtos/references/ios-platform-deep-dives.md +95 -283
- package/skills/ti-howtos/references/local-data-sources.md +45 -37
- package/skills/ti-howtos/references/location-and-maps.md +47 -28
- package/skills/ti-howtos/references/media-apis.md +84 -27
- package/skills/ti-howtos/references/notification-services.md +40 -89
- package/skills/ti-howtos/references/remote-data-sources.md +21 -36
- package/skills/ti-howtos/references/tutorials.md +79 -39
- package/skills/ti-howtos/references/using-modules.md +4 -30
- package/skills/ti-howtos/references/web-content-integration.md +28 -45
- package/skills/ti-howtos/references/webpack-build-pipeline.md +54 -18
- package/skills/ti-ui/SKILL.md +1 -21
- package/skills/ti-ui/references/accessibility-deep-dive.md +71 -25
- package/skills/ti-ui/references/animation-and-matrices.md +0 -47
- package/skills/ti-ui/references/application-structures.md +0 -46
- package/skills/ti-ui/references/custom-fonts-styling.md +9 -57
- package/skills/ti-ui/references/event-handling.md +32 -40
- package/skills/ti-ui/references/gestures.md +0 -40
- package/skills/ti-ui/references/icons-and-splash-screens.md +21 -44
- package/skills/ti-ui/references/layouts-and-positioning.md +47 -39
- package/skills/ti-ui/references/listviews-and-performance.md +187 -73
- package/skills/ti-ui/references/orientation.md +57 -71
- package/skills/ti-ui/references/platform-ui-android.md +114 -48
- package/skills/ti-ui/references/platform-ui-ios.md +63 -38
- package/skills/ti-ui/references/scrolling-views.md +14 -23
- package/skills/ti-ui/references/tableviews.md +6 -56
- package/lib/commands/install.js +0 -188
- package/skills/alloy-expert/references/anti-patterns.md +0 -133
- package/skills/alloy-expert/references/testing.md +0 -872
- package/skills/ti-guides/references/alloy-cli-advanced.md +0 -84
- package/skills/ti-guides/references/alloy-data-mastery.md +0 -29
- package/skills/ti-guides/references/alloy-widgets-and-themes.md +0 -19
- /package/skills/{alloy-expert → ti-expert}/assets/ControllerAutoCleanup.js +0 -0
- /package/skills/{alloy-expert → ti-expert}/references/contracts.md +0 -0
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
# Alloy CLI Reference
|
|
2
|
-
|
|
3
|
-
The `alloy` command is the primary interface for managing Alloy metadata and automation.
|
|
4
|
-
|
|
5
|
-
## 1. Internationalization (i18n) Extraction
|
|
6
|
-
|
|
7
|
-
Instead of manually managing `strings.xml`, use the `extract-i18n` command to automatically scan your XML, JS, and TSS files for `L()` or `Ti.Locale.getString()` calls.
|
|
8
|
-
|
|
9
|
-
### Syntax
|
|
10
|
-
```bash
|
|
11
|
-
# Preview the strings found in the project
|
|
12
|
-
alloy extract-i18n [language]
|
|
13
|
-
|
|
14
|
-
# Create or update the strings.xml file
|
|
15
|
-
alloy extract-i18n [language] --apply
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
### Key Benefits
|
|
19
|
-
- **Accuracy**: Ensures all strings used in code are present in the translation files
|
|
20
|
-
- **Safety**: The `--apply` flag only adds new entries and never deletes or overwrites existing ones
|
|
21
|
-
- **Efficiency**: Faster than manual entry and prevents human error
|
|
22
|
-
|
|
23
|
-
## 2. Code Generation
|
|
24
|
-
|
|
25
|
-
Generate components from templates to speed up development:
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
# Create a new controller
|
|
29
|
-
alloy generate controller <name>
|
|
30
|
-
|
|
31
|
-
# Generate other component types
|
|
32
|
-
alloy generate view <name>
|
|
33
|
-
alloy generate model <name>
|
|
34
|
-
alloy generate widget <name>
|
|
35
|
-
alloy generate migration <name>
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
## 3. Installation Commands
|
|
39
|
-
|
|
40
|
-
Install specialized components or themes:
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
# Install a widget or theme
|
|
44
|
-
alloy install widget <path>
|
|
45
|
-
alloy install theme <path>
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
## 4. Project Conversion
|
|
49
|
-
|
|
50
|
-
Convert a Classic Titanium project to Alloy:
|
|
51
|
-
|
|
52
|
-
```bash
|
|
53
|
-
alloy new
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
## 5. Configuration Files
|
|
57
|
-
|
|
58
|
-
### `config.json`
|
|
59
|
-
Global app configuration file. Can store:
|
|
60
|
-
- Theme settings (`theme: "theme_name"`)
|
|
61
|
-
- Environment variables
|
|
62
|
-
- Per-platform themes
|
|
63
|
-
- App-specific metadata
|
|
64
|
-
|
|
65
|
-
### `alloy.js`
|
|
66
|
-
Global initializer executed before any controllers. Perfect for:
|
|
67
|
-
- Creating `Alloy.Collections`
|
|
68
|
-
- Setting up `Alloy.Globals`
|
|
69
|
-
- Initializing singletons
|
|
70
|
-
- Configuring global event listeners
|
|
71
|
-
|
|
72
|
-
### `alloy.jmk`
|
|
73
|
-
Build configuration file for pre-compile and post-compile hooks:
|
|
74
|
-
```javascript
|
|
75
|
-
task('pre:compile', (event, logger) => {
|
|
76
|
-
// Run before compilation
|
|
77
|
-
// Example: Auto-run PurgeTSS
|
|
78
|
-
});
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
Common use cases:
|
|
82
|
-
- Auto-running PurgeTSS
|
|
83
|
-
- Custom asset processing
|
|
84
|
-
- Environment-specific configurations
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
# Alloy Data Mastery: Sync Adapters and Binding
|
|
2
|
-
|
|
3
|
-
## 1. Sync Adapters
|
|
4
|
-
Sync adapters connect Backbone Models to persistent storage.
|
|
5
|
-
- **Ready-Made Adapters**:
|
|
6
|
-
- `sql`: SQLite (Android/iOS). Supports `query` in `fetch()` and `idAttribute`.
|
|
7
|
-
- `properties`: `Ti.App.Properties` storage.
|
|
8
|
-
- **Custom Adapters**: Created in `app/lib/alloy/sync`. Requires `sync` function implementation.
|
|
9
|
-
- **Migrations**: Incremental database changes. Named `YYYYMMDDHHmmss_model.js`.
|
|
10
|
-
- **CRITICAL**: Do not close the `db` handle or open a second instance within a migration.
|
|
11
|
-
|
|
12
|
-
## 2. Data Binding Principles
|
|
13
|
-
- **Collection Binding**: Bind a collection to a container (ListView, TableView, ScrollableView).
|
|
14
|
-
- Mandatory: `dataCollection` attribute.
|
|
15
|
-
- Optional: `dataTransform` (JSON mapping), `dataFilter` (filtering models), `dataFunction` (manual update trigger).
|
|
16
|
-
- **Model Binding**: Bind a single model to a view (e.g., `<Label text="{model.name}" />`).
|
|
17
|
-
- **Memory Management**: **CRITICAL**: You MUST call `$.destroy()` on the controller's `close` event to unbind Backbone listeners and prevent leaks.
|
|
18
|
-
|
|
19
|
-
## 3. High-Performance Transformations
|
|
20
|
-
- **Lazy Transformation**: Use `Object.defineProperty` in `extendModel` to compute transformations only when accessed.
|
|
21
|
-
```javascript
|
|
22
|
-
transform() {
|
|
23
|
-
const t = this.toJSON();
|
|
24
|
-
Object.defineProperty(t, 'friendlyDate', {
|
|
25
|
-
get: () => moment(t.date).fromNow()
|
|
26
|
-
});
|
|
27
|
-
return t;
|
|
28
|
-
}
|
|
29
|
-
```
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# Alloy Widgets and Themes
|
|
2
|
-
|
|
3
|
-
## 1. Widgets (Self-contained components)
|
|
4
|
-
- **Structure**: Mirror the `app` directory. Main controller is `widget.js`.
|
|
5
|
-
- **Public API**: Methods prefixed with `$` are public (e.g., `$.init = (args) => {}`).
|
|
6
|
-
- **Resource Access**: Use `WPATH()` for widget assets and libs (e.g., `require(WPATH('helper'))`).
|
|
7
|
-
- **Nesting**: Widgets can contain other widgets via `<Widget src="widgetName" name="subController" />`.
|
|
8
|
-
|
|
9
|
-
## 2. Styling Priorities (Low to High)
|
|
10
|
-
1. `app.tss` (Global)
|
|
11
|
-
2. `themes/<name>/styles/app.tss` (Theme Global)
|
|
12
|
-
3. `styles/<controller>.tss` (Controller Style)
|
|
13
|
-
4. `themes/<name>/styles/<controller>.tss` (Theme Controller Style)
|
|
14
|
-
5. XML attributes (Inline Style)
|
|
15
|
-
|
|
16
|
-
## 3. Themes
|
|
17
|
-
- Located in `app/themes/<theme_name>`.
|
|
18
|
-
- Merges `config.json`, `i18n`, and `styles`. Overwrites `assets` and `lib`.
|
|
19
|
-
- Configured in `config.json` via the `theme` key. Supports per-platform themes.
|
|
File without changes
|
|
File without changes
|