-
Notifications
You must be signed in to change notification settings - Fork 5
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
Introduce tests & CI #15
Conversation
@@ -17,8 +18,7 @@ | |||
], | |||
"browserify": { | |||
"transform": [ | |||
"glslify", | |||
"bubleify" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. You no longer convert es6 -> es5?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bubleify does not do async/await bublejs/buble#125, and seems there is no more maintenance.
I wished there was a way for browserify to indicate this transform for main export, but ignore that for running tests.
Probably I should include babelify. Or just simply rewrite the thing in ES5, that is not a lot of hassle. Rollup maybe?
|
@etpinard there is a way to bundle the package as well, without sacrificing the dependencies. That is not as elegant as just browserify with That adds:
|
package.json
Outdated
"build": "browserify test.js -g bubleify | indexhtmlify | metadataify | github-cornerify | mobilify > gh-pages/no-snapping.html" | ||
"test": "node test", | ||
"test-browser": "budo test -- -t glslify", | ||
"prepublishOnly": "npm run buikd", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
build
Well, that's annoying. How many more bytes is that going to result in plotly.js? Oh well, maybe plotly.js is already too big to care about bundling glslify twice. |
@etpinard glslify does not get bundled, that just inlines glsl dependencies to a bundle. Now in plotly.js glslify does inlining whenever we run plotly build, but with that PR glslify is not required anymore, because glsl is inlined already, so plotly building gets faster. Moreover, right now plotly building also runs bubleify, that performs the same transpilation internally. With that PR we cut that as well, by providing transpiled code. More to that, with this PR glslify is not a production, but dev dependency, meaning that plotly.js package as a dependency is faster to run with browserify, and the component is quicker to install. |
@etpinard should we proceed with that? |
Looks like I was completely wrong in #15 (comment), building plotly.js off the latest commit on this branch results in a slightly smaller bundle: That said, looks like this PR here breaks a bunch of plotly.js tests:
errors.
|
Oh Lord, I've found that. regl-splom uses wrong regl-scatter2d entry, pointing to not a bundle. |
plotly.js tests are green, 💃 Thanks @dy ! |
This PR introduces a showcase for baseline tests (pilot).
Now CI is available for gl-components (yay).
That should reduce complexity of test coverage for gl-based traces in plotly.
Also that makes gl-component tests look way less messy, in standard tape- fashion.
@etpinard @archmoj please see test.js, hope that will make further dev simpler and fix regressions (seems that palette work may cause some).