init_directories.js 574 B

1234567891011121314151617181920212223
  1. #!/usr/bin/env node
  2. /**
  3. * On a fresh clone, the local platforms/ and plugins/ directories will be
  4. * missing, so ensure they get created before the first platform is added.
  5. */
  6. var fs = require('fs');
  7. var path = require('path');
  8. var platformsDir = path.resolve(__dirname, '../../platforms');
  9. var pluginsDir = path.resolve(__dirname, '../../plugins');
  10. try {
  11. fs.mkdirSync(platformsDir, function (err) {
  12. if (err) { console.error(err); }
  13. });
  14. } catch(ex) {}
  15. try {
  16. fs.mkdirSync(pluginsDir, function (err) {
  17. if (err) { console.error(err); }
  18. });
  19. } catch(ex) {}