@magentrix-corp/magentrix-cli 1.0.0 → 1.0.1
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 +63 -3
- package/package.json +1 -9
package/README.md
CHANGED
|
@@ -96,6 +96,7 @@ This creates a `src` folder with all your files organized into:
|
|
|
96
96
|
- `Triggers/` - Your trigger code (`.trigger` files)
|
|
97
97
|
- `Pages/` - Your ASPX pages (`.aspx` files)
|
|
98
98
|
- `Templates/` - Your templates (`.aspx` files)
|
|
99
|
+
- `Contents/Assets/` - Your static assets (images, CSS, JavaScript, etc.)
|
|
99
100
|
|
|
100
101
|
---
|
|
101
102
|
|
|
@@ -132,7 +133,7 @@ magentrix status
|
|
|
132
133
|
```bash
|
|
133
134
|
magentrix publish
|
|
134
135
|
```
|
|
135
|
-
**What it does**: Sends all unpublished changes from your local machine to the Magentrix server and compiles them. Shows you exactly what will be created, updated, or deleted before doing it. Processes all changes in parallel for speed.
|
|
136
|
+
**What it does**: Sends all unpublished changes from your local machine to the Magentrix server and compiles them. Shows you exactly what will be created, updated, or deleted before doing it. Processes all changes in parallel for speed. Works with both code files and static assets.
|
|
136
137
|
**When to use**:
|
|
137
138
|
- After you've finished making changes and want to deploy them
|
|
138
139
|
- At the end of your work session
|
|
@@ -142,7 +143,7 @@ magentrix publish
|
|
|
142
143
|
```bash
|
|
143
144
|
magentrix autopublish
|
|
144
145
|
```
|
|
145
|
-
**What it does**: Watches your files for changes and automatically uploads and compiles them on the server whenever you save a file. Shows compilation status and any errors in the terminal in real-time. Can take some time to sync each file.
|
|
146
|
+
**What it does**: Watches your files for changes and automatically uploads and compiles them on the server whenever you save a file. Shows compilation status and any errors in the terminal in real-time. Works with both code files and static assets. Can take some time to sync each file.
|
|
146
147
|
**When to use**:
|
|
147
148
|
- During active development when you want immediate feedback
|
|
148
149
|
- When testing changes and want to see results right away
|
|
@@ -189,7 +190,9 @@ src/
|
|
|
189
190
|
├── Controllers/ # Controllers (*.ctrl files)
|
|
190
191
|
├── Triggers/ # Trigger code (*.trigger files)
|
|
191
192
|
├── Pages/ # ASPX pages (*.aspx files)
|
|
192
|
-
|
|
193
|
+
├── Templates/ # Templates (*.aspx files)
|
|
194
|
+
└── Contents/
|
|
195
|
+
└── Assets/ # Static assets (images, CSS, JS, etc.)
|
|
193
196
|
```
|
|
194
197
|
|
|
195
198
|
### File Extensions
|
|
@@ -207,6 +210,63 @@ src/
|
|
|
207
210
|
|
|
208
211
|
---
|
|
209
212
|
|
|
213
|
+
## Working with Static Assets
|
|
214
|
+
|
|
215
|
+
### What Are Static Assets?
|
|
216
|
+
Static assets are non-code files like images, CSS stylesheets, JavaScript files, and other resources that your Magentrix application uses.
|
|
217
|
+
|
|
218
|
+
### Asset Organization
|
|
219
|
+
All static assets are stored in the `src/Contents/Assets/` directory. You can organize them into subfolders:
|
|
220
|
+
|
|
221
|
+
```
|
|
222
|
+
src/Contents/Assets/
|
|
223
|
+
├── images/
|
|
224
|
+
│ ├── logo.png
|
|
225
|
+
│ └── banner.jpg
|
|
226
|
+
├── css/
|
|
227
|
+
│ └── custom-styles.css
|
|
228
|
+
└── js/
|
|
229
|
+
└── helpers.js
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
### Working with Assets
|
|
233
|
+
|
|
234
|
+
#### Downloading Assets
|
|
235
|
+
```bash
|
|
236
|
+
magentrix pull
|
|
237
|
+
```
|
|
238
|
+
Downloads all static assets from the server along with your code files. The folder structure is preserved.
|
|
239
|
+
|
|
240
|
+
#### Adding New Assets
|
|
241
|
+
1. Place your files in `src/Contents/Assets/` (or a subfolder)
|
|
242
|
+
2. Run `magentrix publish` to upload them
|
|
243
|
+
- Or use `magentrix autopublish` for automatic uploads
|
|
244
|
+
|
|
245
|
+
#### Updating Assets
|
|
246
|
+
1. Edit or replace the file locally in `src/Contents/Assets/`
|
|
247
|
+
2. Run `magentrix publish` to upload the updated version
|
|
248
|
+
- Or use `magentrix autopublish` for automatic uploads
|
|
249
|
+
|
|
250
|
+
#### Deleting Assets
|
|
251
|
+
1. Delete the file from `src/Contents/Assets/`
|
|
252
|
+
2. Run `magentrix publish` to remove it from the server
|
|
253
|
+
|
|
254
|
+
### Supported File Types
|
|
255
|
+
The tool supports all file types including:
|
|
256
|
+
- Images: `.png`, `.jpg`, `.jpeg`, `.gif`, `.svg`, `.ico`
|
|
257
|
+
- Stylesheets: `.css`
|
|
258
|
+
- Scripts: `.js`
|
|
259
|
+
- Documents: `.pdf`, `.txt`, `.json`
|
|
260
|
+
- Any other file type you need
|
|
261
|
+
|
|
262
|
+
### Important Notes
|
|
263
|
+
- Assets are synced alongside code files
|
|
264
|
+
- Folder structures are preserved when syncing
|
|
265
|
+
- Large files are handled efficiently using batch operations
|
|
266
|
+
- Binary files (like images) are fully supported
|
|
267
|
+
|
|
268
|
+
---
|
|
269
|
+
|
|
210
270
|
## Handling Conflicts
|
|
211
271
|
|
|
212
272
|
When files have changed both locally and on the server, you'll see conflict options:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@magentrix-corp/magentrix-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "CLI tool for synchronizing local files with Magentrix cloud platform",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -20,14 +20,6 @@
|
|
|
20
20
|
],
|
|
21
21
|
"author": "Magentrix Corporation",
|
|
22
22
|
"license": "UNLICENSED",
|
|
23
|
-
"repository": {
|
|
24
|
-
"type": "git",
|
|
25
|
-
"url": "git+https://github.com/Mangoz1x/MagentrixCLI.git"
|
|
26
|
-
},
|
|
27
|
-
"bugs": {
|
|
28
|
-
"url": "https://github.com/Mangoz1x/MagentrixCLI/issues"
|
|
29
|
-
},
|
|
30
|
-
"homepage": "https://github.com/Mangoz1x/MagentrixCLI#readme",
|
|
31
23
|
"engines": {
|
|
32
24
|
"node": ">=20.0.0"
|
|
33
25
|
},
|