packages/cli/src/commands/server/copyToClipBoard.js
function copyToClipBoard(content) {
  switch (process.platform) {
    case 'darwin': {
      const child = spawn('pbcopy', []);
      child.stdin.end(Buffer.from(content, 'utf8'));
      return true;
    }
    case 'win32': {
      const child = spawn('clip', []);
      child.stdin.end(Buffer.from(content, 'utf8'));
      return true;
    }
    case 'linux': {
      const child = spawn(xsel, ['--clipboard', '--input']);
      child.stdin.end(Buffer.from(content, 'utf8'));
      return true;
    }
    default:
      return false;
  }
}
function copyToClipBoard(content) {
  switch (process.platform) {
    case 'darwin': {
      const child = spawn('pbcopy', []);
      child.stdin.end(Buffer.from(content, 'utf8'));
      return true;
    }
    case 'win32': {
      const child = spawn('clip', []);
      child.stdin.end(Buffer.from(content, 'utf8'));
      return true;
    }
    case 'linux': {
      const child = spawn(xsel, ['--clipboard', '--input']);
      child.stdin.end(Buffer.from(content, 'utf8'));
      return true;
    }
    default:
      return false;
  }
}
function copyToClipBoard ( content ) { switch ( process . platform ) { case 'darwin' : { const child = spawn ( 'pbcopy' , [ ] ) ; child . stdin . end ( Buffer . from ( content , 'utf8' ) ) ; return true ; } case 'win32' : { const child = spawn ( 'clip' , [ ] ) ; child . stdin . end ( Buffer . from ( content , 'utf8' ) ) ; return true ; } case 'linux' : { const child = spawn ( xsel , [ '--clipboard' , '--input' ] ) ; child . stdin . end ( Buffer . from ( content , 'utf8' ) ) ; return true ; } default : return false ; } }
Copy the content to host system clipboard.
Copy the content to host system clipboard .