cleanexamples.js 500 B

12345678910111213141516
  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. // Clean all of the example folders.
  6. dirs = fs.readdirSync('examples');
  7. for (var i = 0; i < dirs.length; i++) {
  8. console.log('Cleaning: ' + dirs[i] + '...');
  9. process.chdir('examples/' + dirs[i]);
  10. childProcess.execSync('npm run clean', { stdio: [0, 1, 2] });
  11. process.chdir('../..');
  12. }
  13. console.log('\n********\nDone!');