install.js 347 B

12345678910111213
  1. const { spawn } = require('child_process');
  2. const rebuildIfDarwin = () => {
  3. if (process.platform !== 'darwin') {
  4. console.log();
  5. console.log(`Skipping 'fsevents' build as platform ${process.platform} is not supported`);
  6. process.exit(0);
  7. } else {
  8. spawn('node-gyp', ['rebuild'], { stdio: 'inherit' });
  9. }
  10. };
  11. rebuildIfDarwin();