Spaces:
Sleeping
Sleeping
Download scripts/publish.js from manhteky123/mindmap: direct link, hf CLI and curl.
- Browser
- Download file 678 Bytes
-
https://huggingface.co/spaces/manhteky123/mindmap/resolve/main/scripts/publish.js
- Command line
-
hf download hf://spaces/manhteky123/mindmap/scripts/publish.js
-
curl -L -o publish.js https://huggingface.co/spaces/manhteky123/mindmap/resolve/main/scripts/publish.js
678 Bytes
| 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}`); | |
| } | |
| }); |