UNPKG

@naxodev/gonx

Version:

Modern Nx plugin to use Go in a Nx workspace

22 lines 739 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = runExecutor; const utils_1 = require("../../utils"); /** * This executor runs code generation using the `go generate` command. * * @param options options passed to the executor * @param context context passed to the executor */ async function runExecutor(options, context) { return (0, utils_1.executeCommand)(buildParams(options), { cwd: (0, utils_1.extractCWD)(options, context), env: options.env, executable: 'go', }); } const buildParams = (options) => { var _a; return ['generate', ...((_a = options.flags) !== null && _a !== void 0 ? _a : []), './...']; }; //# sourceMappingURL=executor.js.map