13 lines
436 B
JavaScript
13 lines
436 B
JavaScript
const fs = require('fs');
|
|
const path = require('path');
|
|
|
|
const content = fs
|
|
.readdirSync(path.join(__dirname, '../ts-src'))
|
|
.filter((name) => name.endsWith('.ts') && !name.includes('test.ts') && !name.startsWith('_'))
|
|
.map((name) => name.replace('.ts', ''))
|
|
.filter((name) => name !== 'index')
|
|
.map((name) => `export * from './${name}';`)
|
|
.join('\n');
|
|
|
|
fs.writeFileSync(path.join(__dirname, '../ts-src/index.ts'), content);
|