@yannosay/sinth 0.0.17 → 0.0.18

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/sinth.ts +7 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yannosay/sinth",
3
- "version": "0.0.17",
3
+ "version": "0.0.18",
4
4
  "description": "A declarative language that compiles to pure HTML, CSS, and JavaScript.",
5
5
  "author": "Yannosay Productions",
6
6
  "license": "AGPL-3.0",
package/src/sinth.ts CHANGED
@@ -1872,7 +1872,7 @@ async function main(): Promise<void> {
1872
1872
  }
1873
1873
  }
1874
1874
 
1875
- // === v0.0.15: Copy assets/ to outDir/assets/ ===
1875
+ // === v0.0.18: Copy assets/ to outDir/assets/ ===
1876
1876
  const assetsIn = path.join(cwd, "assets");
1877
1877
  const assetsOut = path.join(outDir, "assets");
1878
1878
  if (fs.existsSync(assetsIn)) {
@@ -1884,14 +1884,15 @@ async function main(): Promise<void> {
1884
1884
  const libOut = path.join(outDir, "libraries");
1885
1885
  if (fs.existsSync(libIn)) {
1886
1886
  copyDir(libIn, libOut);
1887
+ const cleanFiles = fs.readdirSync(libOut, { recursive: true }) as string[];
1888
+ for (const f of cleanFiles) {
1889
+ if (f.endsWith(".sinth") || f.endsWith(".html")) {
1890
+ fs.unlinkSync(path.join(libOut, f));
1891
+ }
1892
+ }
1887
1893
  process.stdout.write(` \x1b[32m✓\x1b[0m libraries/ → ${path.relative(cwd, libOut)}/\n`);
1888
1894
  }
1889
1895
 
1890
- process.stdout.write(`\n\x1b[1mBuilt ${built} page(s)\x1b[0m${hadError ? " with errors" : ""}\n`);
1891
- process.exit(hadError ? 1 : 0);
1892
- break;
1893
- }
1894
-
1895
1896
  case "dev": {
1896
1897
  const fileArgs = cleanArgs.filter(a => a.endsWith(".sinth"));
1897
1898
  const files = fileArgs.length > 0