Skip to content

Commit 26bc244

Browse files
Merge pull request #499 from Symbitic/develop
First working port to Rollup
2 parents 64330ba + 8007bb3 commit 26bc244

File tree

360 files changed

+72406
-55803
lines changed

Some content is hidden

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

360 files changed

+72406
-55803
lines changed

.editorconfig

+18
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
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

.gitignore

+36-36
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
1-
# Logs
2-
logs
3-
*.log
4-
npm-debug.log*
5-
6-
# Runtime data
7-
pids
8-
*.pid
9-
*.seed
10-
11-
# Directory for instrumented libs generated by jscoverage/JSCover
12-
lib-cov
13-
14-
# Coverage directory used by tools like istanbul
15-
coverage
16-
17-
# node-waf configuration
18-
.lock-wscript
19-
20-
# Dependency directory
21-
node_modules
22-
23-
# Optional npm cache directory
24-
.npm
25-
26-
# Optional REPL history
27-
.node_repl_history
28-
29-
# intellij
30-
.idea
31-
32-
#yarn
33-
yarn.lock
34-
35-
# OSX .DS_Store
36-
.DS_Store
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
6+
# Runtime data
7+
pids
8+
*.pid
9+
*.seed
10+
11+
# Directory for instrumented libs generated by jscoverage/JSCover
12+
lib-cov
13+
14+
# Coverage directory used by tools like istanbul
15+
coverage
16+
17+
# node-waf configuration
18+
.lock-wscript
19+
20+
# Dependency directory
21+
node_modules
22+
23+
# Optional npm cache directory
24+
.npm
25+
26+
# Optional REPL history
27+
.node_repl_history
28+
29+
# intellij
30+
.idea
31+
32+
#yarn
33+
yarn.lock
34+
35+
# OSX .DS_Store
36+
.DS_Store

build-tests.js

+48
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)