Skip to content

Commit c1e25ba

Browse files
committed
fix: handpick fixes
1 parent 44b710c commit c1e25ba

File tree

10 files changed

+11200
-12446
lines changed

10 files changed

+11200
-12446
lines changed

.babelrc

Lines changed: 0 additions & 14 deletions
This file was deleted.

.eslintrc.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ module.exports = {
1313
env: {
1414
browser: true,
1515
jasmine: true,
16-
"jest/globals": true,
1716
},
18-
plugins: ["jest"],
1917
overrides: [
2018
{
2119
files: ["examples/**"],

jest.config.js

Lines changed: 0 additions & 184 deletions
This file was deleted.

karma.conf.js

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
const path = require("path");
2+
3+
module.exports = config => {
4+
config.set({
5+
client: {
6+
model: config.model,
7+
jasmine: {
8+
random: false,
9+
},
10+
},
11+
frameworks: ["jasmine"],
12+
files: [
13+
"src/index.js",
14+
"src/utils/*_test.js",
15+
`src/${config.model ? config.model : "**"}/*_test.js`,
16+
`src/${config.model ? config.model : "**"}/**/*_test.js`,
17+
],
18+
preprocessors: {
19+
"src/index.js": ["webpack"],
20+
"src/utils/*.js": ["webpack"],
21+
},
22+
webpack: {
23+
// TODO: This is duplication of the webpack.common.babel.js file, but they
24+
// use different import syntaxes so it's not easy to just require it here.
25+
// Maybe this could be put into a JSON file, but the include in the module
26+
// rules is dynamic.
27+
entry: ["babel-polyfill", "./src/index.js"],
28+
output: {
29+
libraryTarget: "umd",
30+
filename: "ml5.js",
31+
library: "ml5",
32+
},
33+
module: {
34+
rules: [
35+
{
36+
enforce: "pre",
37+
test: /\.js$/,
38+
exclude: /node_modules/,
39+
loader: "eslint-loader",
40+
},
41+
{
42+
test: /\.js$/,
43+
loader: "babel-loader",
44+
include: path.resolve(__dirname, "src"),
45+
},
46+
],
47+
},
48+
// Don't minify the webpack build for better stack traces
49+
optimization: {
50+
minimize: false,
51+
},
52+
node: {
53+
fs: "empty",
54+
},
55+
},
56+
webpackMiddleware: {
57+
noInfo: true,
58+
stats: "errors-only",
59+
},
60+
browserStack: {
61+
username: process.env.BROWSERSTACK_USERNAME,
62+
accessKey: process.env.BROWSERSTACK_ACCESS_KEY,
63+
},
64+
captureTimeout: 500000,
65+
reportSlowerThan: 500,
66+
browserNoActivityTimeout: 500000,
67+
customLaunchers: {
68+
bs_chrome_mac: {
69+
base: "BrowserStack",
70+
browser: "chrome",
71+
browser_version: "latest",
72+
os: "OS X",
73+
os_version: "Mojave",
74+
},
75+
},
76+
reporters: ["mocha"],
77+
port: 9876,
78+
colors: true,
79+
logLevel: config.LOG_INFO,
80+
autoWatch: true,
81+
browsers: ["Chrome"],
82+
singleRun: false,
83+
concurrency: Infinity,
84+
});
85+
};

0 commit comments

Comments
 (0)