mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-01-11 22:40:26 +01:00
Add descriptions to plugins
This commit is contained in:
15
scripts/publish-core-plugins.cjs
Normal file
15
scripts/publish-core-plugins.cjs
Normal file
@@ -0,0 +1,15 @@
|
||||
const { readdirSync } = require('node:fs');
|
||||
const path = require('node:path');
|
||||
const { execSync } = require('node:child_process');
|
||||
|
||||
const pluginsDir = path.join(__dirname, '..', 'plugins');
|
||||
|
||||
console.log('Publishing core Yaak plugins');
|
||||
|
||||
for (const name of readdirSync(pluginsDir)) {
|
||||
const dir = path.join(pluginsDir, name);
|
||||
if (name.startsWith('.')) continue;
|
||||
console.log('Building plugin', dir);
|
||||
execSync('npm run build', { stdio: 'inherit', cwd: dir });
|
||||
execSync('yaakcli publish', { stdio: 'inherit', cwd: dir, env: { ...process.env, ENVIRONMENT: 'development' } });
|
||||
}
|
||||
@@ -80,7 +80,7 @@ rmSync(tmpDir, { recursive: true, force: true });
|
||||
|
||||
function tryExecSync(cmd) {
|
||||
try {
|
||||
return execSync(cmd).toString('utf-8');
|
||||
return execSync(cmd, { stdio: 'inherit' }).toString('utf-8');
|
||||
} catch (_) {
|
||||
return '';
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ mkdirSync(dstDir, { recursive: true });
|
||||
|
||||
function tryExecSync(cmd) {
|
||||
try {
|
||||
return execSync(cmd).toString('utf-8');
|
||||
return execSync(cmd, { stdio: 'inherit' }).toString('utf-8');
|
||||
} catch (_) {
|
||||
return '';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user