(project: string, target: string)
| 39 | (lower ? str.toLowerCase() : str).replace(/(?:^|\s|["'([{])+\S/g, match => match.toUpperCase()); |
| 40 | |
| 41 | export const targetExists = (project: string, target: string): boolean => { |
| 42 | const output = execSync(`npx nx show projects --withTarget="${target}" -p "${project}"`) |
| 43 | .toString() |
| 44 | .trim(); |
| 45 | |
| 46 | return output === project; |
| 47 | }; |
| 48 | |
| 49 | export const execAsync = async (command: string): Promise<string> => { |
| 50 | return promisify(exec)(command).then(({ stdout }) => stdout); |