cleanexamples.js 527 B

123456789101112131415161718
  1. // Copyright (c) Jupyter Development Team.
  2. // Distributed under the terms of the Modified BSD License.
  3. var childProcess = require('child_process');
  4. var fs = require('fs');
  5. childProcess.execSync('rimraf examples/node_modules', { stdio: 'inherit' });
  6. // Clean all of the example folders.
  7. dirs = fs.readdirSync('examples');
  8. for (var i = 0; i < dirs.length; i++) {
  9. if (dirs[i].indexOf('.') !== -1) {
  10. continue;
  11. }
  12. var cmd = 'rimraf examples/' + dirs[i] + '/build';
  13. childProcess.execSync(cmd, { stdio: [0, 1, 2] });
  14. }