UNPKG

skypager-project-types-electron-app

Version:

skypager electron app project type

16 lines (14 loc) 668 B
import { spawn } from 'child_process' export function configure(program) { return program .command('launch [app id or entry point]') .description('launch an electron app in this project') .option('--electron-path <electronPath>', 'the path to electron') .option('--app-id <appId>', 'which electron application to run') .option('--hot', 'use skypager development server in HMR to serve the app') .option('--repl', 'launch the electron process with a repl') } export function execute(entryPoint, options = {}, context = {}) { const { project } = context const { appId = entryPoint, electronPath = require.resolve('electron') } = options }