@playtagon/cli 0.2.9 → 0.3.2
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/README.md +61 -0
- package/dist/index.js +462 -74
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -88,6 +88,66 @@ playtagon spine preset > playtagon-export.json
|
|
|
88
88
|
|
|
89
89
|
Import this file into Spine Editor for optimal export settings.
|
|
90
90
|
|
|
91
|
+
## Syncing Assets (for Developers)
|
|
92
|
+
|
|
93
|
+
Download approved Spine assets to your local project with TypeScript types and Storybook stories:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
# Sync all approved assets
|
|
97
|
+
playtagon spine sync --studio my-studio --game my-game
|
|
98
|
+
|
|
99
|
+
# Sync to custom directory
|
|
100
|
+
playtagon spine sync -s my-studio -o ./src/assets/spine
|
|
101
|
+
|
|
102
|
+
# Sync specific assets only
|
|
103
|
+
playtagon spine sync --assets hero,villain,effects
|
|
104
|
+
|
|
105
|
+
# Preview what would be synced
|
|
106
|
+
playtagon spine sync --dry-run
|
|
107
|
+
|
|
108
|
+
# Force overwrite local changes
|
|
109
|
+
playtagon spine sync --force
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Generated Files
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
src/assets/spine/
|
|
116
|
+
├── hero/
|
|
117
|
+
│ ├── hero.skel # Skeleton file
|
|
118
|
+
│ ├── hero.atlas # Atlas file
|
|
119
|
+
│ ├── hero.png # Texture(s)
|
|
120
|
+
│ ├── index.ts # TypeScript types
|
|
121
|
+
│ └── hero.stories.ts # Storybook story
|
|
122
|
+
├── villain/
|
|
123
|
+
│ └── ...
|
|
124
|
+
└── manifest.ts # Re-exports all assets
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### TypeScript Types
|
|
128
|
+
|
|
129
|
+
Generated `index.ts` provides full IntelliSense:
|
|
130
|
+
|
|
131
|
+
```typescript
|
|
132
|
+
import { hero } from './assets/spine/manifest';
|
|
133
|
+
|
|
134
|
+
// Typed animation names
|
|
135
|
+
hero.animations.idle;
|
|
136
|
+
hero.animations.walk;
|
|
137
|
+
|
|
138
|
+
// Animation durations (seconds)
|
|
139
|
+
hero.durations.idle; // 1.5
|
|
140
|
+
hero.durations.walk; // 0.8
|
|
141
|
+
|
|
142
|
+
// Skins and events
|
|
143
|
+
hero.skins.default;
|
|
144
|
+
hero.events.footstep;
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Incremental Sync
|
|
148
|
+
|
|
149
|
+
The CLI tracks synced assets in `.sync-manifest.json`. Subsequent syncs only download new or updated assets. Use `--force` to re-download everything.
|
|
150
|
+
|
|
91
151
|
## Commands
|
|
92
152
|
|
|
93
153
|
| Command | Description |
|
|
@@ -100,6 +160,7 @@ Import this file into Spine Editor for optimal export settings.
|
|
|
100
160
|
| `playtagon spine upload` | Upload Spine assets |
|
|
101
161
|
| `playtagon spine validate` | Validate Spine files |
|
|
102
162
|
| `playtagon spine preset` | Output export preset JSON |
|
|
163
|
+
| `playtagon spine sync` | Sync approved assets with codegen |
|
|
103
164
|
|
|
104
165
|
## Requirements
|
|
105
166
|
|