Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Second working port to Rollup #525

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
18 changes: 18 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
root = true

[*]
charset = utf-8
end_of_line = crlf
indent_size = 2
indent_style = space
insert_final_newline = true
max_line_length = 80
tab_width = 2
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[{package.json,.travis.yml}]
indent_style = space
indent_size = 2
39 changes: 19 additions & 20 deletions ISSUE_TEMPLATE.md → .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
<!-- If you don't mind add a fun gif or meme, but no pressure -->
![A GIF or MEME to give some spice of the internet](url)

## *What* is wrong?
<!-- Ex. run takes really long -->

## *Where* does it happen?
<!-- Ex. In GPU.js when trying to run a math function in node.js on my mac -->

## *How* do we replicate the issue?
<!-- Please be specific as possible. Use dashes (-) or numbers (1.) to create a list of steps -->

## *How* important is this (1-5)?
<!-- On a scale from 1-5 where 5 is the most important how would you rate it? -->

## Expected behavior (i.e. solution)
<!-- What do you think should have happened? -->


## Other Comments
<!-- If you don't mind add a fun gif or meme, but no pressure -->
![A GIF or MEME to give some spice of the internet](url)

## *What* is wrong?
<!-- Ex. run takes really long -->

## *Where* does it happen?
<!-- Ex. In GPU.js when trying to run a math function in node.js on my mac -->

## *How* do we replicate the issue?
<!-- Please be specific as possible. Use dashes (-) or numbers (1.) to create a list of steps -->

## *How* important is this (1-5)?
<!-- On a scale from 1-5 where 5 is the most important how would you rate it? -->

## Expected behavior (i.e. solution)
<!-- What do you think should have happened? -->

## Other Comments
72 changes: 36 additions & 36 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
# Logs
logs
*.log
npm-debug.log*

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# node-waf configuration
.lock-wscript

# Dependency directory
node_modules

# Optional npm cache directory
.npm

# Optional REPL history
.node_repl_history

# intellij
.idea

#yarn
yarn.lock

# OSX .DS_Store
.DS_Store
# Logs
logs
*.log
npm-debug.log*
# Runtime data
pids
*.pid
*.seed
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# node-waf configuration
.lock-wscript
# Dependency directory
node_modules
# Optional npm cache directory
.npm
# Optional REPL history
.node_repl_history
# intellij
.idea
#yarn
yarn.lock
# OSX .DS_Store
.DS_Store
48 changes: 48 additions & 0 deletions build-tests.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/**
* Question: Why are we even using QUnit?
*
* We should be migrating to a more modern unit testing framework like Jest or Ava.
* I hear some people have even gotten WebGL-related testing done with Jest.
*/

const fs = require('fs');
const path = require('path');
const util = require('util');
const { readDirDeep } = require('read-dir-deep');

const readFile = util.promisify(fs.readFile)
const unlink = util.promisify(fs.unlink)
const writeFile = util.promisify(fs.writeFile)

const CWD = process.cwd();

async function main () {
const folder = 'test';
const output = path.resolve(CWD, folder, 'all.html');
const template = path.resolve(CWD, folder, 'all-template.html');
const rootPath = path.resolve(CWD, folder);
const warning = '<!-- the following list of javascript files is built automatically -->\n';

await unlink(output).catch(e => {});

const files = await readDirDeep(rootPath, {
patterns: [ '**/*.js' ],
ignore: [ '*.js' ]
});

const str = warning + files
.map(file => file.replace(/^test\//, ''))
.map(file => `<script type="module" src="${file}"></script>`)
.join('\n');

const file = await readFile(template, 'utf8');

const data = file.replace('{{test-files}}', str);

await writeFile(output, data);
};

main().catch(err => {
console.error(err.message)
process.exit(1)
});
Loading