| @@ -1,4 +1,4 @@ | |||
| import {execEachPlugin} from "./utils.mjs"; | |||
| import {execEachPlugin} from './utils.mjs'; | |||
| // Each plugin should have "prepare" that will also build the plugin | |||
| execEachPlugin('npm ci') // install dependencies | |||
| @@ -1,4 +1,4 @@ | |||
| import {execEachPlugin} from "./utils.mjs"; | |||
| import {execEachPlugin} from './utils.mjs'; | |||
| const command = process.argv.slice(2).join(' ') | |||
| if(!command) throw new Error('Command is required') | |||
| @@ -6,3 +6,4 @@ console.log(`Executing '${command}' in all plugins`) | |||
| // Each plugin should have "prepare" that will also build the plugin | |||
| execEachPlugin(`npm ${command}`) // install dependencies | |||
| @@ -2,6 +2,7 @@ | |||
| // in nodejs | |||
| import {writeFileSync} from "node:fs" | |||
| import {writeFileSync} from 'node:fs' | |||
| writeFileSync('src/viewer/version.ts', `export const VERSION = '${process.env.npm_package_version}'\n`) | |||
| writeFileSync("src/viewer/version.ts", `export const VERSION = '${process.env.npm_package_version}'\n`) | |||
| @@ -1,8 +1,8 @@ | |||
| import path from "node:path"; | |||
| import fs from "node:fs"; | |||
| import {execSync} from "node:child_process"; | |||
| import path from 'node:path'; | |||
| import fs from 'node:fs'; | |||
| import {execSync} from 'node:child_process'; | |||
| export function loopPluginDirs(callback){ | |||
| export function loopPluginDirs (callback) { | |||
| const pathname = new URL(import.meta.url).pathname.replace(/^\/([A-Za-z]:\/)/, '$1') | |||
| const __dirname = path.dirname(pathname); | |||
| const pluginsDir = path.resolve(__dirname, '../plugins') | |||
| @@ -17,7 +17,7 @@ export function loopPluginDirs(callback){ | |||
| } | |||
| export function execEachPlugin(command, templates = false){ | |||
| export function execEachPlugin (command, templates = false) { | |||
| loopPluginDirs((pluginDir, pluginFolder) => { | |||
| if(!templates && pluginFolder.startsWith('plugin-template-')) return; | |||
| console.log(`Executing ${command} in ${pluginDir}`) | |||