takt/bin/takt
2026-01-25 15:16:27 +09:00

28 lines
648 B
JavaScript
Executable File

#!/usr/bin/env node
/**
* TAKT CLI wrapper for npm global/local installation
*
* This wrapper script ensures takt can be run via:
* - npm install -g takt && takt
* - npx takt
* - npm exec takt
*/
import { fileURLToPath } from 'node:url';
import { dirname, join } from 'node:path';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
// Import the actual CLI from dist
const cliPath = join(__dirname, '..', 'dist', 'cli.js');
try {
await import(cliPath);
} catch (err) {
console.error('Failed to load TAKT CLI. Have you run "npm run build"?');
console.error(err.message);
process.exit(1);
}