diff --git a/bin/typeflow b/bin/typeflow new file mode 100644 index 0000000..6a56c65 --- /dev/null +++ b/bin/typeflow @@ -0,0 +1,13 @@ +#!/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); +}