bernova 1.7.8 → 1.7.9
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/CHANGELOG.md +6 -0
- package/dist/bin/functions/scriptFx.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const o=require("path"),{getBernovaBuildArgs:e,getBaseOutDir:t}=require("./getFx"),{readConfigData:s}=require("../../src/lib"),{copyCssFiles:i,embedCssForProvider:r,rewriteCssPathInStats:n,writeStatsinBuild:a,writeToolsInBuild:c,rewriteProviderTemplate:l}=require("./writeFx"),{isIterableArray:p,buildCustomOutDirs:u}=require("./utils");async function d(){console.log("Reading configuration...");const d=process.cwd(),{themes:f,provider:v,compilerOptions:y}=await s(o.resolve(d,"bernova.config.json")),{minifyCss:g,minifyJS:m,...h}=y,{css:w,tools:S,provider:C,...b}=e(["--base-out-dir","--root-dir","--prevent-process-js","--prevent-move-js","--prevent-move-dts","--types","--css","--tools","--provider","--embed-css"]),D=(()=>{const o={};return w&&(o.css=w),S&&(o.tools=S),C&&(o.provider=C),Object.keys(o).length>0?o:void 0})(),{baseOutDir:P="",rootDir:O,preventMoveJS:j,preventMoveDTS:B,preventProcessJs:T,types:J,embedCss:q,customOutDirs:M}=u({jsonConfig:h,cliConfig:{...b,customOutDirs:D}}),F=p(J)?J:[""];async function x(){const o=M?.css;if(p(f)){for(const e of f)q?await r({dir:d,theme:e,provider:v}):o&&await n({dir:d,theme:e,css:o,provider:v});await l({dir:d,embedCss:q,provider:v})}}async function I(){const e=M?.css;if(p(f))for(const t of f){const s=e??t.stylesPath??"",r=o.join(P,s);await i({dir:d,cssPath:r,theme:t})}}async function A(){let e=M?.provider??v.path??"";O&&(e=o.relative(O,e));for(const s of F){const i=t({baseOutDir:P,type:s}),r=o.join(i,e,"stats");await a({dir:d,providerPath:v.path,outPath:r,type:s,preventMoveDTS:B,minifyJS:m})}}async function k(){let e=M?.provider??v.path??"";O&&(e=o.relative(O,e));for(const s of F){const i=t({baseOutDir:P,type:s}),r=o.join(i,e);T
|
|
1
|
+
const o=require("path"),{getBernovaBuildArgs:e,getBaseOutDir:t}=require("./getFx"),{readConfigData:s}=require("../../src/lib"),{copyCssFiles:i,embedCssForProvider:r,rewriteCssPathInStats:n,writeStatsinBuild:a,writeToolsInBuild:c,rewriteProviderTemplate:l}=require("./writeFx"),{isIterableArray:p,buildCustomOutDirs:u}=require("./utils");async function d(){console.log("Reading configuration...");const d=process.cwd(),{themes:f,provider:v,compilerOptions:y}=await s(o.resolve(d,"bernova.config.json")),{minifyCss:g,minifyJS:m,...h}=y,{css:w,tools:S,provider:C,...b}=e(["--base-out-dir","--root-dir","--prevent-process-js","--prevent-move-js","--prevent-move-dts","--types","--css","--tools","--provider","--embed-css"]),D=(()=>{const o={};return w&&(o.css=w),S&&(o.tools=S),C&&(o.provider=C),Object.keys(o).length>0?o:void 0})(),{baseOutDir:P="",rootDir:O,preventMoveJS:j,preventMoveDTS:B,preventProcessJs:T,types:J,embedCss:q,customOutDirs:M}=u({jsonConfig:h,cliConfig:{...b,customOutDirs:D}}),F=p(J)?J:[""];async function x(){const o=M?.css;if(p(f)){for(const e of f)q?await r({dir:d,theme:e,provider:v}):o&&await n({dir:d,theme:e,css:o,provider:v});await l({dir:d,embedCss:q,provider:v})}}async function I(){const e=M?.css;if(p(f))for(const t of f){const s=e??t.stylesPath??"",r=o.join(P,s);await i({dir:d,cssPath:r,theme:t})}}async function A(){let e=M?.provider??v.path??"";O&&(e=o.relative(O,e));for(const s of F){const i=t({baseOutDir:P,type:s}),r=o.join(i,e,"stats");await a({dir:d,providerPath:v.path,outPath:r,type:s,preventMoveDTS:B,minifyJS:m})}}async function k(){let e=M?.provider??v.path??"";O&&(e=o.relative(O,e));for(const s of F){const i=t({baseOutDir:P,type:s}),r=o.join(i,e);T||await x(),await c({dir:d,toolsPath:v.path,outPath:r,preventMoveDTS:B,type:s,minifyJS:m})}}return console.log("Configuration read successfully"),{preBuildStyles:x,copyCss:I,copyStats:A,copyProvider:k,fullBuild:async function(){console.log("Copying CSS files..."),await I(),console.log("CSS files copied successfully"),j||(console.log("Copying tools files..."),await async function(){if(p(f))for(const e of f){const{bvTools:s}=e,i=s?.path;if(i){let e=M?.tools??i??"";O&&(e=o.relative(O,e));for(const s of F){const r=t({baseOutDir:P,type:s}),n=o.join(r,e);await c({dir:d,toolsPath:i,outPath:n,preventMoveDTS:B,type:s,minifyJS:m})}}}}(),console.log("Tools files copied successfully"),console.log("Copying provider and stats files..."),await k(),await A(),console.log("Provider and stats files copied successfully"))}}}module.exports={bvBuildScript:d};
|