diff --git a/packages/plugin-dev/scripts/build-all.js b/packages/plugin-dev/scripts/build-all.js index 1e4e67d05c..ea94904b08 100755 --- a/packages/plugin-dev/scripts/build-all.js +++ b/packages/plugin-dev/scripts/build-all.js @@ -186,6 +186,33 @@ const plugins = [ return 'Built and copied to assets'; }, }, + { + name: 'automations', + path: 'automations', + needsInstall: true, + copyToAssets: true, + buildCommand: async (pluginPath) => { + await execAsync(`cd ${pluginPath} && npm run build`); + // Copy to assets directory + const targetDir = path.join( + __dirname, + '../../../src/assets/bundled-plugins/automations', + ); + if (!fs.existsSync(targetDir)) { + fs.mkdirSync(targetDir, { recursive: true }); + } + const distPath = path.join(pluginPath, 'dist'); + if (fs.existsSync(distPath)) { + const files = fs.readdirSync(distPath); + for (const file of files) { + const src = path.join(distPath, file); + const dest = path.join(targetDir, file); + copyRecursive(src, dest); + } + } + return 'Built and copied to assets'; + }, + }, ]; async function buildPlugin(plugin) {