UNPKG

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