clumsy-graphics
Version:
a tool for rapidly developing animations where frames are described using svg elements à la react 🙃
23 lines (22 loc) • 1.41 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const child_process_1 = __importDefault(require("child_process"));
const decodeData_1 = require("./helpers/decodeData");
const ClumsyGraphicsCommand_1 = require("./models/ClumsyGraphicsCommand");
runClumsyGraphics();
async function runClumsyGraphics() {
const startDevelopmentCommand = await (0, decodeData_1.decodeData)({
targetCodec: ClumsyGraphicsCommand_1.StartDevelopmentCommandCodec,
inputData: (0, ClumsyGraphicsCommand_1.parseCommandLineArgs)({
processArgv: ['', '', 'startDevelopment', ...process.argv.slice(2)],
}),
});
const clientServerPort = startDevelopmentCommand.commandApi.clientServerPort || 3000;
child_process_1.default.execSync(`PROJECT_DIRECTORY_PATH=${process.cwd()} docker compose --file ${__dirname}/clumsy-graphics-package.docker-compose.yml build && ANIMATION_MODULE_PATH="${startDevelopmentCommand.commandApi.animationModulePath}" CLIENT_SERVER_PORT="${clientServerPort}" PROJECT_DIRECTORY_PATH=${process.cwd()} docker compose --file ${__dirname}/clumsy-graphics-package.docker-compose.yml run -p ${clientServerPort}:${clientServerPort} --rm clumsy-graphics`, {
stdio: 'inherit',
});
}