File size: 678 Bytes
60f878e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
const { execSync } = require('child_process');
const path = require('path');
const fs = require('fs');

const libraries = ['react-board', 'react-text', 'drawnix'];

libraries.forEach(lib => {
  const libPath = path.resolve(__dirname, '../dist', lib);
  
  if (fs.existsSync(libPath)) {
    console.log(`Publishing ${lib}...`);
    try {
      execSync('npm publish --access public', { 
        cwd: libPath,
        stdio: 'inherit'
      });
      console.log(`Successfully published ${lib}`);
    } catch (error) {
      console.error(`Failed to publish ${lib}:`, error);
    }
  } else {
    console.error(`Library path not found: ${libPath}`);
  }
});