@atomazing-org/mock-plop
Version:
The `@atomazing-org/mock-plop` library is a configuration script designed for Plop, a tool aimed at automating code generation within projects utilizing templates. Specifically, this script focuses on generating and updating files associated with mocks (p
17 lines (14 loc) • 539 B
JavaScript
const { execSync } = require('child_process');
process.argv.push('--plopfile ' + __dirname + '/plopfile.js');
// Extract arguments passed to your package
const args = process.argv.slice(2);
// Construct the Plop command with the --plopfile argument
const plopCommand = `npx plop ${args.join(' ')}`;
// Execute the constructed command
try {
execSync(plopCommand, { stdio: 'inherit' });
} catch (error) {
console.error(`Failed to execute Plop command: ${error.message}`);
process.exit(1);
}