Skip to content
Permalink
Browse files

Replace dev scripts with ocular-dev-tools (#956)

  • Loading branch information...
Pessimistress committed Mar 11, 2019
1 parent 064ae13 commit fd7df13e8ccd2dcbcc0206b01e3bbf33e4fbdd2b
Showing with 996 additions and 1,519 deletions.
  1. +3 −9 .nycrc
  2. +4 −1 .travis.yml
  3. +0 −63 aliases.js
  4. +17 −79 babel.config.js
  5. +1 −1 modules/webgl-state-tracker/test/state-tracking/context-state.spec.js
  6. +1 −1 modules/webgl-state-tracker/test/state-tracking/track-context-state.spec.js
  7. +1 −1 modules/webgl-state-tracker/test/unified-parameter-api/set-parameters.spec.js
  8. +1 −1 modules/webgl2-polyfill/test/polyfill-context.spec.js
  9. +1 −1 modules/webgl2-polyfill/test/polyfill-get-parameter.spec.js
  10. +29 −0 ocular-dev-tools.config.js
  11. +17 −45 package.json
  12. +0 −25 scripts/bootstrap.sh
  13. +0 −56 scripts/collect-metrics-fast.sh
  14. +0 −62 scripts/collect-metrics.sh
  15. +0 −9 scripts/lint-markdown.sh
  16. +0 −11 scripts/lint.sh
  17. +0 −80 scripts/test.sh
  18. BIN static/cubemap-example.png
  19. BIN static/custom-picking-example.png
  20. BIN static/deferred-rendering-example.png
  21. BIN static/instancing-example.png
  22. BIN static/lesson-1.png
  23. BIN static/lesson-10.png
  24. BIN static/lesson-11.png
  25. BIN static/lesson-12.png
  26. BIN static/lesson-13.png
  27. BIN static/lesson-14.png
  28. BIN static/lesson-15.png
  29. BIN static/lesson-16.png
  30. BIN static/lesson-2.png
  31. BIN static/lesson-3.png
  32. BIN static/lesson-4.png
  33. BIN static/lesson-5.png
  34. BIN static/lesson-6.png
  35. BIN static/lesson-7.png
  36. BIN static/lesson-8.png
  37. BIN static/lesson-9.png
  38. BIN static/luma-icon.png
  39. BIN static/multicontext-example.png
  40. BIN static/particles-example.png
  41. BIN static/persistence-example.png
  42. BIN static/picking-example.png
  43. +0 −32 test/bench/node.js
  44. +2 −1 test/dev-modules/babel-plugin-inline-gl-constants.spec.js
  45. +1 −0 test/dev-modules/babel-plugin-remove-glsl-comments.spec.js
  46. +4 −4 test/index-webgl-dependent-tests.js
  47. +4 −0 test/index.js
  48. +1 −1 test/modules/core/core/animation-loop-proxy.spec.js
  49. +1 −1 test/modules/core/core/animation-loop.spec.js
  50. +1 −1 test/modules/core/core/attribute.spec.js
  51. +1 −1 test/modules/core/core/model.spec.js
  52. +1 −1 test/modules/core/core/shader-cache.spec.js
  53. +1 −1 test/modules/core/core/transform.spec.js
  54. +1 −1 test/modules/core/io/read-texture.js
  55. +1 −1 test/modules/core/webgl/classes/buffer.spec.js
  56. +1 −1 test/modules/core/webgl/classes/copy-and-blit.spec.js
  57. +1 −1 test/modules/core/webgl/classes/draw.spec.js
  58. +1 −1 test/modules/core/webgl/classes/framebuffer.spec.js
  59. +1 −1 test/modules/core/webgl/classes/program-configuration.spec.js
  60. +1 −1 test/modules/core/webgl/classes/program.spec.js
  61. +1 −1 test/modules/core/webgl/classes/query.spec.js
  62. +1 −1 test/modules/core/webgl/classes/renderbuffer.spec.js
  63. +1 −1 test/modules/core/webgl/classes/sampler.spec.js
  64. +1 −1 test/modules/core/webgl/classes/texture-2d-array.spec.js
  65. +1 −1 test/modules/core/webgl/classes/texture-2d.spec.js
  66. +1 −1 test/modules/core/webgl/classes/texture-3d.spec.js
  67. +1 −1 test/modules/core/webgl/classes/texture-cube.spec.js
  68. +1 −1 test/modules/core/webgl/classes/texture.spec.js
  69. +1 −1 test/modules/core/webgl/classes/transform-feedback.spec.js
  70. +1 −1 test/modules/core/webgl/classes/uniform-buffer-layout.spec.js
  71. +1 −1 test/modules/core/webgl/classes/uniforms.spec.js
  72. +1 −1 test/modules/core/webgl/classes/vertex-array-object.spec.js
  73. +1 −1 test/modules/core/webgl/classes/vertex-array.spec.js
  74. +1 −1 test/modules/core/webgl/features/features.spec.js
  75. +1 −1 test/modules/core/webgl/features/limits.spec.js
  76. +1 −1 test/modules/core/webgl/utils/texture-utils.spec.js
  77. +1 −1 test/modules/gpgpu/histopyramid.spec.js
  78. +1 −1 test/modules/shadertools/modules/fp64/fp64-arithmetic-transform.spec.js
  79. +1 −1 test/modules/shadertools/modules/picking.spec.js
  80. +0 −83 test/start.js
  81. +0 −226 test/webpack.config.js
  82. +15 −0 webpack.config.js
  83. +863 −696 yarn.lock
12 .nycrc
@@ -1,13 +1,7 @@
{
"require": [
"@babel/register"
],
"sourceMap": false,
"instrument": false,
"extends": "node_modules/ocular-dev-tools/templates/.nycrc",
"include": [
"modules/**/*.js"
],
"exclude": [
"test/**/*.js"
"dev-modules/**/*.js",
"modules/**/dist/es5/**/*.js"
]
}
@@ -13,8 +13,11 @@ addons:
- libxi-dev
node_js:
- '8.11.4'
install:
- yarn bootstrap
before_script:
- export DISPLAY=:99.0; sh -e /etc/init.d/xvfb start
- npm run build
script:
- npm run test ci
after_success:
- cat coverage/lcov.info | coveralls

This file was deleted.

Oops, something went wrong.
@@ -1,84 +1,22 @@
const TARGETS = {
chrome: '60',
edge: '15',
firefox: '53',
ios: '10.3',
safari: '10.1',
node: '8'
};

const CONFIG = {
default: {
presets: [
['@babel/env', {
targets: TARGETS
}]
],
plugins: [
'version-inline',
// NOTE: To debug our babel plugins, just reference the local modules
// './dev-modules/babel-plugin-inline-gl-constants',
'babel-plugin-inline-webgl-constants',
// ['./dev-modules/babel-plugin-remove-glsl-comments', {
['babel-plugin-remove-glsl-comments', {
const getBabelConfig = require('ocular-dev-tools/config/babel.config');

module.exports = api => {
const config = getBabelConfig(api);
config.plugins = config.plugins || [];

config.plugins.push(
'version-inline',
// NOTE: To debug our babel plugins, just reference the local modules
// './dev-modules/babel-plugin-inline-gl-constants',
'babel-plugin-inline-webgl-constants',
// ['./dev-modules/babel-plugin-remove-glsl-comments', {
[
'babel-plugin-remove-glsl-comments',
{
patterns: ['**/shadertools/src/modules/**/*.js']
}]
}
]
}
};

CONFIG.es6 = Object.assign({}, CONFIG.default, {
presets: [
['@babel/env', {
targets: TARGETS,
modules: false
}]
]
});

CONFIG.es6.plugins = CONFIG.es6.plugins.concat([
['@babel/plugin-transform-runtime', {useESModules: true}]
]);

CONFIG.esm = Object.assign({}, CONFIG.default, {
presets: [
['@babel/env', {
modules: false
}]
]
});

CONFIG.esm.plugins = CONFIG.esm.plugins.concat([
['@babel/plugin-transform-runtime', {useESModules: true}]
]);
);

CONFIG.es5 = Object.assign({}, CONFIG.default, {
presets: [
['@babel/env', {
forceAllTransforms: true,
modules: 'commonjs'
}]
]
});

CONFIG.es5.plugins = CONFIG.es5.plugins.concat([
['@babel/plugin-transform-runtime']
]);

CONFIG.cover = Object.assign({}, CONFIG.default);
// constant inlining seems to cause problems for nyc
CONFIG.cover.plugins = ['version-inline', 'istanbul'];

module.exports = function getConfig(api) {

// eslint-disable-next-line
var env = api.cache(() => process.env.BABEL_ENV || process.env.NODE_ENV);

const config = CONFIG[env] || CONFIG.default;
// Uncomment to debug
// eslint-disable-next-line
// console.error(env, config.plugins);
return config;
};

module.exports.config = CONFIG.es6;
@@ -21,7 +21,7 @@ function stringifyTypedArray(v) {
return JSON.stringify(v);
}

import {createTestContext} from 'luma.gl/test/setup';
import {createTestContext} from 'test/setup';
const fixture = {
gl: createTestContext(),
gl2: createTestContext({webgl2: true, webgl1: false})
@@ -1,5 +1,5 @@
import test from 'tape-catch';
import {createTestContext} from 'luma.gl/test/setup';
import {createTestContext} from 'test/setup';

import trackContextState, {
pushContextState,
@@ -10,7 +10,7 @@ import GL from '@luma.gl/constants';
import {Framebuffer} from 'luma.gl';
import {getKey} from 'luma.gl';

import {createTestContext} from 'luma.gl/test/setup';
import {createTestContext} from 'test/setup';

import {GL_PARAMETER_DEFAULTS} from '@luma.gl/webgl-state-tracker/unified-parameter-api/webgl-parameter-tables';

@@ -2,7 +2,7 @@ import polyfillContext from '@luma.gl/webgl2-polyfill';
import test from 'tape-catch';
import {makeSpy} from '@probe.gl/test-utils';

import {fixture} from 'luma.gl/test/setup';
import {fixture} from 'test/setup';

test('WebGL#polyfillContext', t => {
const {gl, gl2} = fixture;
@@ -2,7 +2,7 @@ import {getParameterPolyfill} from '@luma.gl/webgl2-polyfill/polyfill-get-parame
import GL from '@luma.gl/constants';
import test from 'tape-catch';

import {fixture} from 'luma.gl/test/setup';
import {fixture} from 'test/setup';

const WEBGL_PARAMETER_KEYS = [
// WebGL2 context parameters
@@ -0,0 +1,29 @@
const {resolve} = require('path');

module.exports = {
lint: {
paths: ['modules', 'test'],
extensions: ['js']
},

aliases: {
// DEV MODULES
// TODO - why is each module not listed?
'dev-modules': resolve(__dirname, './dev-modules'),

// TEST
test: resolve(__dirname, './test'),

// DEPRECATED - For backwards compatibility
'luma.gl/constants': resolve(__dirname, './modules/main/constants'),
'luma.gl': resolve(__dirname, './modules/main/src')
},

entry: {
test: 'test/index.js',
'test-browser': 'test/browser.js',
bench: 'test/bench/index.js',
'bench-browser': 'test/bench/browser.js',
size: 'test/size/import-nothing.js'
}
};
@@ -32,73 +32,45 @@
"fs": false
},
"scripts": {
"bootstrap": "scripts/bootstrap.sh",
"bootstrap": "yarn && ocular-bootstrap",
"start": "echo 'Please see luma.gl website for how to run examples' && open http://uber.github.io/luma.gl/#/documentation/getting-started/examples",
"clean": "lerna clean --yes && rm -rf node_modules",
"build": "lerna run build",
"cover": "NODE_ENV=cover nyc node test/start",
"lint": "scripts/lint.sh",
"lint-examples": "eslint examples",
"lint-yarn": "!(grep -q unpm.u yarn.lock) || (echo 'Please rebuild yarn.lock file using public npmrc' && false)",
"lint-docs": "scripts/lint-markdown.sh",
"publish-prod": "yarn bootstrap && yarn test && lerna publish --cd-version minor",
"publish-beta": "yarn bootstrap && yarn test && lerna publish --npm-tag beta --cd-version prerelease",
"test": "scripts/test.sh",
"test-ci": "scripts/test.sh cover && scripts/test.sh bench",
"test-browser": "node test/start.js browser",
"perf": "webpack-dev-server --config test/webpack.config.js --env.perf --progress --hot --open",
"bench-browser": "webpack-dev-server --config test/webpack.config.js --env.bench --progress --hot --open",
"collect-metrics": "scripts/collect-metrics.sh",
"pre-commit": "scripts/test.sh fast"
"clean": "ocular-clean",
"build": "ocular-clean && ocular-build",
"cover": "ocular-test cover",
"lint": "ocular-lint",
"publish": "ocular-publish",
"test": "ocular-test",
"test-fast": "ocular-test fast",
"test-browser": "ocular-test browser",
"perf": "ocular-test perf-browser",
"bench": "ocular-test bench",
"bench-browser": "ocular-test bench-browser",
"metrics": "ocular-metrics"
},
"devDependencies": {
"@babel/cli": "^7.0.0",
"@babel/core": "^7.0.0",
"@babel/plugin-transform-runtime": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/register": "^7.0.0",
"@loaders.gl/draco": "^0.8.0",
"@loaders.gl/gltf": "^0.8.1",
"@probe.gl/bench": "^3.0.0-alpha.6",
"@probe.gl/stats-widget": "^3.0.0-alpha.6",
"@probe.gl/test-utils": "^3.0.0-alpha.6",
"babel-eslint": "^9.0.0",
"babel-loader": "^8.0.0",
"babel-plugin-inline-webgl-constants": "^1.0.0",
"babel-plugin-istanbul": "^5.0.0",
"babel-plugin-remove-glsl-comments": "^1.0.0",
"babel-plugin-version-inline": "^1.0.0",
"codecov": "^3.1.0",
"coveralls": "^2.13.0",
"eslint": "4.13.1",
"eslint-config-prettier": "3.0.1",
"eslint-config-uber-es2015": "^3.0.0",
"eslint-plugin-luma-gl-custom-rules": "file:./eslint",
"eslint-plugin-tree-shaking": "^1.7.3",
"gl": "^4.1.1",
"html-webpack-plugin": "^3.0.7",
"lerna": "^2.9.1",
"markdownlint-cli": "^0.8.1",
"mkdirp": "^0.5.1",
"module-alias": "^2.0.0",
"nyc": "^13.0.0",
"ocular-dev-tools": "0.0.14",
"pre-commit": "^1.2.2",
"pre-push": "^0.1.1",
"prettier": "1.14.3",
"prettier-check": "2.0.0",
"raw-loader": "^0.5.1",
"reify": "^0.17.3",
"source-map-loader": "^0.2.1",
"reify": "^0.18.1",
"source-map-support": "^0.4.2",
"tape": "^4.9.0",
"tape-catch": "^1.0.4",
"tape-promise": "^1.1.0",
"webpack": "^4.20.2",
"webpack-bundle-analyzer": "^2.11.1",
"webpack-cli": "^3.1.2",
"webpack-dev-server": "^3.1.1"
"tape-promise": "^1.1.0"
},
"pre-commit": [
"pre-commit"
"test-fast"
]
}

This file was deleted.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit fd7df13

Please sign in to comment.
You can’t perform that action at this time.