-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathbin.js
More file actions
executable file
·27 lines (22 loc) · 803 Bytes
/
bin.js
File metadata and controls
executable file
·27 lines (22 loc) · 803 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env node
import { execSync } from 'child_process';
// This is the entry point that will be executed when someone runs your command with npx
console.log('Starting build process...');
// You can import any build logic from other files if needed
// const { runBuild } = require('./index.js');
// Or simply put your build logic directly here
function runBuild() {
try {
// Your build process here
console.log('Building the project...');
// Execute the build command - modify this to match your actual build command
execSync('npm run build', { stdio: 'inherit' });
console.log('Build completed successfully!');
return true;
} catch (error) {
console.error('Build failed:', error.message);
process.exit(1);
}
}
// Run the build process
runBuild();