-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest-dist.js
More file actions
44 lines (37 loc) · 1.21 KB
/
test-dist.js
File metadata and controls
44 lines (37 loc) · 1.21 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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Test script to verify the built package works
import fs from 'fs';
import path from 'path';
import { fileURLToPath } from 'url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
console.log('Testing built package from /dist...');
// Check if dist files exist
const distFiles = [
'dist/index.js',
'dist/index.esm.js',
'dist/index.d.ts',
'dist/index.css',
'dist/index.esm.css'
];
distFiles.forEach(file => {
const filePath = path.join(__dirname, file);
if (fs.existsSync(filePath)) {
console.log(`✓ ${file} exists`);
} else {
console.log(`✗ ${file} missing`);
}
});
// Check if the built package exports the expected components
try {
const builtPackage = await import('./dist/index.esm.js');
console.log('✓ Built package loads successfully');
console.log('Available exports:', Object.keys(builtPackage));
if (builtPackage.DialecticalWheel) {
console.log('✓ DialecticalWheel component found');
} else {
console.log('✗ DialecticalWheel component not found');
}
} catch (error) {
console.log('✗ Error loading built package:', error.message);
}
console.log('Test complete!');