-
Notifications
You must be signed in to change notification settings - Fork 199
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
Added a polyserve option doNotCompile and speed up WCT tests #168
Conversation
…lude /components/web-component-tester/browser.js
aa32b47
to
5bd1fdf
Compare
@@ -69,6 +71,11 @@ export function babelCompile( | |||
if (isPolyfill.test(request.url)) { | |||
return false; | |||
} | |||
if (doNotCompile.length > 0 && | |||
!!doNotCompile.find((p) => minimatch(request.url, p))) { | |||
console.log('SKIPPY MA-DOO-DAH',request.url); |
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.
lol
@@ -36,6 +36,14 @@ export const args: ArgDescriptor[] = [ | |||
type: String, | |||
defaultValue: 'auto', | |||
}, | |||
{ | |||
name: 'do-not-compile', | |||
description: 'Disables compilation for file(s) matching given pattern. ' + |
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.
Can we clarify what we mean by compilation? As currently written, it bypasses ES5 compilation, but also name-to-path transformation and AMD transformation. compile-middleware is already probably too aggressive in this regard, since the compile=never
returns false
from shouldTransform
in the same way.
@@ -36,6 +36,14 @@ export const args: ArgDescriptor[] = [ | |||
type: String, | |||
defaultValue: 'auto', | |||
}, | |||
{ | |||
name: 'do-not-compile', |
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.
Now we have --compile
and --do-not-compile
, which might be slightly confusing. I guess we should just document the interaction between the two, especially that this takes precedence over --compile=always
?
(I was also thinking we could update the --compile
flag to take glob patterns (and minimatch already supports the !
operator), but then you still have the auto
vs always
difference that needs to be represented somehow. Not sure if this idea makes sense.)
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.
Possible alternate names:
--pass-thru
--do-not-modify
--serve-as-is
--as-is
--no-transform
--no-rewrite
--immutable
--static
--constant
--invariant
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.
But do we want to disable all the transforms, or is this just about ES5 compilation?
Are we still going to do this? Can close PR otherwise? |
Closing PR because not important right now and this is rotting on the vine. |
tslib is a peer dependency of ix, so adding to dependencies, since ix is used in code (not just in dev/test)
--do-not-compile
/doNotCompile
= Array of glob string patterns to match against request url paths in polyserve to skip babelCompile middleware. WCT uses this to specify NOT to compile the/components/web-component-tester/browser.js
file to speed tests up.