vega-frontend-monorepo/ignore-netlify-build.js
2022-03-14 16:52:02 +01:00

10 lines
422 B
JavaScript

const currentProject = process.env.NX_PROJECT_NAME;
const execSync = require('child_process').execSync;
const getAffected = `nx print-affected`;
const output = execSync(getAffected).toString();
//get the list of changed projects from the output
const changedProjects = JSON.parse(output).projects; // array of affected projects
process.exitCode = changedProjects.some((project) => project === currentProject)
? 0
: 1;