UNPKG

yarpm

Version:

CLI tool to run npm scripts with either npm, pnpm or yarn, depending on how it was started

15 lines (12 loc) 281 B
#!/usr/bin/env node 'use strict'; const commandExists = require('command-exists'); const { run } = require('./bin-executor'); commandExists('yarn').then( () => run({ npmPath: 'yarn', env: { ...process.env, npm_config_loglevel: 'warn' } }), () => run() );