-
-
Notifications
You must be signed in to change notification settings - Fork 258
Conversation
6e46c3c
to
73f2fda
Compare
It would be nice in general that the tests maybe not use the rollup bundle, so that we can have proper unit tests, right now the only thing that can be tested is the public API. |
I changed it so that the tests run without rollup. |
"stage-0" | ||
] | ||
}, | ||
"development": { |
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.
I wonder if we should just combine development
and test
, since they're the same? Maybe just production
and development
?
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.
Oh I see, it's for the plugins
. Never mind!
I think the only part that would be concerning is not running any tests against the bundle in CI. It's possible Edit: Thinking about it more, we run the |
Yeah! Seems like we could run that CI test against the bundle?
Could it make sense to split this out into unit and integration/behavioral tests and not bundle for the first and then bundle for the latter? |
Maybe it would make more sense to separate these two tasks out? I don't think these two things have to be tied together. Seems like we could just do the watcher script in this one and we then have the env's to take it further for testing, etc. in a future PR? My intention with this was just to add a convenience for us devs :) |
I think @kaicataldo just wanted to be able to watch in dev as this PR. If it's simple enough we can just land that and then work on the other stuff. Also keep in mind we probably want to just move it back into the monorepo as well 😝 |
Yeah true, feel free to reset the branch to your commit and force push. |
762d81b
to
54a57e2
Compare
54a57e2
to
de5af31
Compare
Updated to just add a watch script |
@@ -10,6 +10,14 @@ | |||
"transform-flow-strip-types" | |||
], | |||
"env": { | |||
"watch": { | |||
"presets": [ | |||
["es2015", { |
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.
might be able to just do plugins commonjs here due to the inheriting of the top level presets/plugins but this works fine
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.
Ohh yeah that could be better 👍
👍 |
The watch script was removed in this PR when we started bundling Babylon with rollup (which is awesome!). This PR sets up a watch script for us (the big difference is that with Rollup the
es2015
preset'smodules
option must befalse
, while we need to enable transpiling to CommonJS modules when Babel is run).I tried Rollup's watcher, but it is currently WIP, and would crash and was unable to recover from saving files with syntax errors when I tried it.
This is more of a stop gap measure until the Rollup watcher is ready for primetime.
Thoughts on this? I personally was using the watcher and have continued to set up something like this up locally when I'm working on Babylon, so figured it might be nice to have a watch script again. Totally understand we probably want to use one of the two solutions above, but I figured having a watcher is better than not :)