UNPKG

atlasgql

Version:

A self-composing GraphQL server library using TypeScript, Express and Apollo Server

22 lines 829 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CommonHelpers = void 0; const child_process_1 = require("child_process"); class CommonHelpers { static executeNpmScript(scriptName, useExplore = false) { const npmCmd = /^win/.test(process.platform) ? `npm.cmd` : `npm`; const child = (0, child_process_1.spawn)(npmCmd, useExplore ? ['explore', 'atlasgql', '--', npmCmd, 'run', scriptName] : ['run', scriptName], { stdio: 'pipe' }); child.stdout.on('data', (data) => { process.stdout.write(data); }); child.stderr.on('data', (data) => { process.stdout.write(data); }); child.on('exit', () => { }); } } exports.CommonHelpers = CommonHelpers; //# sourceMappingURL=common.js.map