jasmine-core.js 962 B

12345678910111213141516171819202122232425262728293031323334353637
  1. module.exports = require("./jasmine-core/jasmine.js");
  2. module.exports.boot = require('./jasmine-core/node_boot.js');
  3. var path = require('path'),
  4. fs = require('fs');
  5. var rootPath = path.join(__dirname, "jasmine-core"),
  6. bootFiles = ['boot.js'],
  7. nodeBootFiles = ['node_boot.js'],
  8. cssFiles = [],
  9. jsFiles = [],
  10. jsFilesToSkip = ['jasmine.js'].concat(bootFiles, nodeBootFiles);
  11. fs.readdirSync(rootPath).forEach(function(file) {
  12. if(fs.statSync(path.join(rootPath, file)).isFile()) {
  13. switch(path.extname(file)) {
  14. case '.css':
  15. cssFiles.push(file);
  16. break;
  17. case '.js':
  18. if (jsFilesToSkip.indexOf(file) < 0) {
  19. jsFiles.push(file);
  20. }
  21. break;
  22. }
  23. }
  24. });
  25. module.exports.files = {
  26. path: rootPath,
  27. bootDir: rootPath,
  28. bootFiles: bootFiles,
  29. nodeBootFiles: nodeBootFiles,
  30. cssFiles: cssFiles,
  31. jsFiles: ['jasmine.js'].concat(jsFiles),
  32. imagesDir: path.join(__dirname, '../images')
  33. };