14 lines
305 B
JavaScript
14 lines
305 B
JavaScript
#!/usr/bin/env node
|
|
|
|
const path = require('path');
|
|
const fs = require('fs');
|
|
|
|
const distPath = path.resolve(__dirname, 'dist/cli.js');
|
|
|
|
if (fs.existsSync(distPath)) {
|
|
require(distPath);
|
|
} else {
|
|
console.error('Error: TypeFlow has not been built yet. Run "npm run build" first.');
|
|
process.exit(1);
|
|
}
|