UNPKG

airouter.js

Version:

This is not the package you're looking for

39 lines (29 loc) 852 B
#!/usr/bin/env node const { Chalk } = require('chalk'); const chalk = new Chalk(); const fs = require('fs'); function why_is_output_hard(message) { try { if ( process.platform !== 'win32' ) { fs.writeFileSync('/dev/tty', message); return; } } catch (e) { console.error(e); } process.stderr.write(message); } const COLS = 40; const message = ` ${'\n' + '='.repeat(COLS)} ${chalk.red.bold('❌ WRONG PACKAGE!')} ${'='.repeat(COLS)} ${chalk.yellow('You probably meant to install:')} ${chalk.green.bold(' npm install @heyputer/airouter.js')} ${'\nThis package does nothing useful.'} ${'Please uninstall it with:'} ${chalk.cyan(' npm uninstall ' + process.env.npm_package_name)} ${'='.repeat(COLS)} `; fs.writeFileSync('testfiletoseeifitevenisrunning.txt', 'it is running i guess'); why_is_output_hard(message);