@techninja/staticart 0.1.8 → 0.1.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@techninja/staticart",
3
- "version": "0.1.8",
3
+ "version": "0.1.10",
4
4
  "description": "StatiCart — a full-featured e-commerce platform built 99% on static hosting",
5
5
  "repository": {
6
6
  "type": "git",
@@ -7,7 +7,7 @@
7
7
  * @module scripts/sync-vendor
8
8
  */
9
9
 
10
- import { cpSync, mkdirSync, rmSync } from 'node:fs';
10
+ import { cpSync, mkdirSync, rmSync, existsSync, readFileSync, writeFileSync } from 'node:fs';
11
11
  import { resolve, dirname } from 'node:path';
12
12
  import { fileURLToPath } from 'node:url';
13
13
 
@@ -16,6 +16,14 @@ const SRC = resolve(ROOT, 'src');
16
16
  const DEST = resolve(ROOT, 'vendor');
17
17
 
18
18
  const DIRS = ['components', 'locales', 'pages', 'router', 'store', 'styles', 'utils'];
19
+ const ROOT_FILES = ['icons.json'];
20
+
21
+ // Preserve root-level vendor files before clean
22
+ const preserved = {};
23
+ for (const f of ROOT_FILES) {
24
+ const p = resolve(DEST, f);
25
+ if (existsSync(p)) preserved[f] = readFileSync(p, 'utf-8');
26
+ }
19
27
 
20
28
  // Clean and rebuild
21
29
  rmSync(DEST, { recursive: true, force: true });
@@ -25,5 +33,9 @@ for (const dir of DIRS) {
25
33
  cpSync(resolve(SRC, dir), resolve(DEST, dir), { recursive: true });
26
34
  console.log(`✓ ${dir}/`);
27
35
  }
36
+ for (const [f, content] of Object.entries(preserved)) {
37
+ writeFileSync(resolve(DEST, f), content);
38
+ console.log(`✓ ${f} (preserved)`);
39
+ }
28
40
 
29
41
  console.log(`\nVendor synced from src/ → vendor/`);
@@ -0,0 +1,25 @@
1
+ {
2
+ "plus": "plus",
3
+ "minus": "minus",
4
+ "check": "check",
5
+ "trash-2": "trash",
6
+ "x": "x",
7
+ "chevron-right": "chevron",
8
+ "chevron-left": "chevron-left",
9
+ "search": "search",
10
+ "shopping-cart": "cart",
11
+ "package": "package",
12
+ "tag": "tag",
13
+ "heart": "heart",
14
+ "star": "star",
15
+ "filter": "filter",
16
+ "arrow-left": "arrow-left",
17
+ "arrow-right": "arrow-right",
18
+ "sun": "sun",
19
+ "moon": "moon",
20
+ "user": "user",
21
+ "circle-check": "circle-check",
22
+ "circle-x": "circle-x",
23
+ "alert-triangle": "alert-triangle",
24
+ "image": "image"
25
+ }