Comparing version 0.1.4 to 0.1.5
{ | ||
"name": "nuekit", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
@@ -5,0 +5,0 @@ "description": "The Nue framework for building websites and webapps", |
@@ -90,9 +90,13 @@ | ||
function hasStyle(sheet, sheets) { | ||
return sheets.find(el => el.getAttribute('href') == sheet.getAttribute('href')) | ||
} | ||
function swapStyles(orig, styles) { | ||
// disable / enable | ||
orig.forEach((el, i) => el.disabled = !styles.find(s => s.href == el.href)) | ||
orig.forEach((el, i) => el.disabled = !hasStyle(el, styles)) | ||
// add new | ||
return styles.filter(el => !orig.find(s => s.href == el.href)) | ||
return styles.filter(el => !hasStyle(el, orig)) | ||
} | ||
@@ -99,0 +103,0 @@ |
@@ -18,6 +18,12 @@ | ||
// init already done? | ||
// create outdir | ||
await fs.mkdir(outdir, { recursive: true }) | ||
// has all latest? | ||
const latest = join(outdir, '.015') | ||
try { | ||
return await fs.stat(join(outdir, 'nue.js')) | ||
} catch {} | ||
return await fs.stat(latest) | ||
} catch { | ||
await fs.writeFile(latest, '') | ||
} | ||
@@ -27,4 +33,2 @@ // chdir hack (Bun does not support absWorkingDir) | ||
// create outdir | ||
await fs.mkdir(outdir, { recursive: true }) | ||
@@ -31,0 +35,0 @@ function print(name) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
72722
1705