Skip to content

Commit 0a6df4f

Browse files
committed
Added rollup
1 parent 61c15cf commit 0a6df4f

File tree

132 files changed

+97861
-51095
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+97861
-51095
lines changed

.editorconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = crlf
6+
indent_size = 2
7+
indent_style = space
8+
insert_final_newline = true
9+
max_line_length = 80
10+
tab_width = 2
11+
trim_trailing_whitespace = true
12+
13+
[*.md]
14+
trim_trailing_whitespace = false
15+
16+
[{package.json,.travis.yml}]
17+
indent_style = space
18+
indent_size = 2
Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
1-
<!-- If you don't mind add a fun gif or meme, but no pressure -->
2-
![A GIF or MEME to give some spice of the internet](url)
3-
4-
## *What* is wrong?
5-
<!-- Ex. run takes really long -->
6-
7-
## *Where* does it happen?
8-
<!-- Ex. In GPU.js when trying to run a math function in node.js on my mac -->
9-
10-
## *How* do we replicate the issue?
11-
<!-- Please be specific as possible. Use dashes (-) or numbers (1.) to create a list of steps -->
12-
13-
## *How* important is this (1-5)?
14-
<!-- On a scale from 1-5 where 5 is the most important how would you rate it? -->
15-
16-
## Expected behavior (i.e. solution)
17-
<!-- What do you think should have happened? -->
18-
19-
20-
## Other Comments
1+
<!-- If you don't mind add a fun gif or meme, but no pressure -->
2+
![A GIF or MEME to give some spice of the internet](url)
3+
4+
## *What* is wrong?
5+
<!-- Ex. run takes really long -->
6+
7+
## *Where* does it happen?
8+
<!-- Ex. In GPU.js when trying to run a math function in node.js on my mac -->
9+
10+
## *How* do we replicate the issue?
11+
<!-- Please be specific as possible. Use dashes (-) or numbers (1.) to create a list of steps -->
12+
13+
## *How* important is this (1-5)?
14+
<!-- On a scale from 1-5 where 5 is the most important how would you rate it? -->
15+
16+
## Expected behavior (i.e. solution)
17+
<!-- What do you think should have happened? -->
18+
19+
## Other Comments

build-tests.js

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/**
2+
* Question: Why are we even using QUnit?
3+
*
4+
* We should be migrating to a more modern unit testing framework like Jest or Ava.
5+
* I hear some people have even gotten WebGL-related testing done with Jest.
6+
*/
7+
8+
const fs = require('fs');
9+
const path = require('path');
10+
const util = require('util');
11+
const { readDirDeep } = require('read-dir-deep');
12+
13+
const readFile = util.promisify(fs.readFile)
14+
const unlink = util.promisify(fs.unlink)
15+
const writeFile = util.promisify(fs.writeFile)
16+
17+
const CWD = process.cwd();
18+
19+
async function main () {
20+
const folder = 'test';
21+
const output = path.resolve(CWD, folder, 'all.html');
22+
const template = path.resolve(CWD, folder, 'all-template.html');
23+
const rootPath = path.resolve(CWD, folder);
24+
const warning = '<!-- the following list of javascript files is built automatically -->\n';
25+
26+
await unlink(output).catch(e => {});
27+
28+
const files = await readDirDeep(rootPath, {
29+
patterns: [ '**/*.js' ],
30+
ignore: [ '*.js' ]
31+
});
32+
33+
const str = warning + files
34+
.map(file => file.replace(/^test\//, ''))
35+
.map(file => `<script type="module" src="${file}"></script>`)
36+
.join('\n');
37+
38+
const file = await readFile(template, 'utf8');
39+
40+
const data = file.replace('{{test-files}}', str);
41+
42+
await writeFile(output, data);
43+
};
44+
45+
main().catch(err => {
46+
console.error(err.message)
47+
process.exit(1)
48+
});

0 commit comments

Comments
 (0)