minimaz-cli 0.2.0 → 0.2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "minimaz-cli",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Minimal project initializer and builder CLI",
5
5
  "author": "MrZeller",
6
6
  "license": "MIT",
@@ -1 +1 @@
1
- import t from"fs-extra";import s from"path";import{log as a}from"./logService.js";const f={src:"src",dist:"dist",public:"public",minify:{html:!0,css:!0,js:!0,ts:!0},replace:{"../public/":"public/"},folders:{src:"",public:"public"}};function e(r,n){const o={...r};for(const i in n)n[i]&&typeof n[i]=="object"&&!Array.isArray(n[i])?o[i]=e(r[i]||{},n[i]):n[i]!==void 0&&(o[i]=n[i]);return o}async function m(){const r=s.resolve(process.cwd(),"minimaz.config.json");let n={};if(await t.pathExists(r))try{n=await t.readJson(r),a("info","Loaded config from minimaz.config.json")}catch(i){throw new Error(`Failed to parse minimaz.config.json: ${i.message}`)}else a("info","No minimaz.config.json found. Using default config");const o=e(f,n);if(!o.src||!o.dist)throw new Error("Invalid configuration: src and dist are required");return o}export{m as loadConfig};
1
+ import t from"fs-extra";import f from"path";import{log as s}from"./logService.js";const e={src:"src",dist:"dist",public:"public",minify:{html:!0,css:!0,js:!0,ts:!0},replace:{"../public/":"public/"},folders:{src:"",public:"public"}};function a(o,n){const r={...o};for(const i of Object.keys(n))n[i]&&typeof n[i]=="object"&&!Array.isArray(n[i])?r[i]=o[i]?a(o[i],n[i]):n[i]:i in o||(r[i]=n[i]);return r}async function p(){const o=f.resolve(process.cwd(),"minimaz.config.json");let n={};if(await t.pathExists(o))try{n=await t.readJson(o),s("info","Loaded config from minimaz.config.json")}catch(i){throw new Error(`Failed to parse minimaz.config.json: ${i.message}`)}else s("info","No minimaz.config.json found. Using default config");return a(n,e)}export{p as loadConfig};