prepare.js 377 B

123456789101112
  1. #! /usr/bin/env node
  2. var cp = require('child_process');
  3. var fs = require('fs');
  4. var os = require('os');
  5. if (fs.existsSync('src')) {
  6. cp.spawn('npm', ['run', 'build:dts'], { stdio: 'inherit', shell: os.platform() === 'win32' });
  7. } else {
  8. if (!fs.existsSync('lib')) {
  9. console.warn('MongoDB: No compiled javascript present, the driver is not installed correctly.');
  10. }
  11. }