-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-build.js
More file actions
25 lines (21 loc) · 1.06 KB
/
test-build.js
File metadata and controls
25 lines (21 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Test script to verify the build output
const { getHeaderHtml, getFooterHtml } = require('./dist/Templar.js');
console.log('✅ Build test successful!');
console.log('getHeaderHtml type:', typeof getHeaderHtml);
console.log('getFooterHtml type:', typeof getFooterHtml);
console.log('Functions are available and properly exported from Templar.js');
// Check if TypeScript declarations are available
const fs = require('fs');
const hasDeclarations = fs.existsSync('./dist/Templar.d.ts');
console.log('TypeScript declarations available:', hasDeclarations ? '✅' : '❌');
// Check file sizes
const stats = fs.statSync('./dist/Templar.js');
const esm_stats = fs.existsSync('./dist/Templar.esm.js') ? fs.statSync('./dist/Templar.esm.js') : null;
console.log(`\n📊 Build Output Summary:`);
console.log(`- Templar.js: ${(stats.size / 1024).toFixed(2)} KB`);
if (esm_stats) {
console.log(`- Templar.esm.js: ${(esm_stats.size / 1024).toFixed(2)} KB`);
}
console.log(`- Minified: Yes`);
console.log(`- Source maps: Available`);
console.log(`- TypeScript declarations: Available`);