aztomiq 1.0.7 → 1.0.8

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": "aztomiq",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "AZtomiq - A comprehensive A-Z multi-tool framework with atomic architecture",
5
5
  "main": "scripts/build.js",
6
6
  "bin": {
@@ -67,16 +67,27 @@ async function buildAssets() {
67
67
  console.time('🎨 Assets Build');
68
68
 
69
69
  // 0. Copy all raw assets (images, fonts, vendor, etc)
70
- const assetsSrc = path.join(paths.SRC, 'assets');
71
- if (fs.existsSync(assetsSrc)) {
72
- const items = fs.readdirSync(assetsSrc);
73
- for (const item of items) {
74
- if (['css', 'js'].includes(item)) continue;
75
- const srcPath = path.join(assetsSrc, item);
76
- const destPath = path.join(paths.ASSETS_DIST, item);
77
- if (hasChanged(srcPath, 'assets-copy/', false)) {
78
- await fs.copy(srcPath, destPath);
79
- hasChanged(srcPath, 'assets-copy/', true);
70
+ const assetSubDirs = ['images', 'fonts', 'vendor', 'favicons'];
71
+ for (const sub of assetSubDirs) {
72
+ const srcDirs = [
73
+ path.join(paths.CORE_ROOT, 'src/assets', sub),
74
+ path.join(paths.SRC, 'assets', sub)
75
+ ].filter(fs.existsSync);
76
+
77
+ if (srcDirs.length === 0) continue;
78
+
79
+ const destDir = path.join(paths.ASSETS_DIST, sub);
80
+ await fs.ensureDir(destDir);
81
+
82
+ for (const dir of srcDirs) {
83
+ const items = fs.readdirSync(dir);
84
+ for (const item of items) {
85
+ const srcPath = path.join(dir, item);
86
+ const destPath = path.join(destDir, item);
87
+ if (hasChanged(srcPath, `assets-${sub}/`, false)) {
88
+ await fs.copy(srcPath, destPath);
89
+ hasChanged(srcPath, `assets-${sub}/`, true);
90
+ }
80
91
  }
81
92
  }
82
93
  }