buildexamples.js 565 B

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