Export "webpack helper" function to aid usage in downstream Webpack projects#473
Export "webpack helper" function to aid usage in downstream Webpack projects#473
Conversation
This is listed as a "feature" because it will make it easier for users of the library to use require() or import statements to include specific files in their own projects.
|
@mgrauer, we can use this branch to try out importing Candela piecemeal into TrackerDash. |
682e463 to
e9db735
Compare
|
Is this ready for me to try, or would it be better to debug it together? I've got in my downstream should that change? ☃️ |
|
You should be able to try it yourself, though I assume we will need to follow up with some debugging (either together or just me). Here are the steps to try it out:
|
|
Interesting. So this removes src and puts the components dir at the top level? |
|
Yes, and also the |
This also removes font-awesome from the dependencies list; it doesn't seem to be necessary.
…nfusion between import styles i.e. the following line ````javascript import candela from 'candela'; ```` will import the UMD bundle, while ````javascript import candela from 'candela/candela'; ```` will import the top-level file directly (allowing downstream Webpack to build it into something probably similar to the original bundle).
25bb0f3 to
f9ef3ba
Compare
f9ef3ba to
6248a22
Compare
|
This is ready for review. |
Codecov Report
@@ Coverage Diff @@
## master #473 +/- ##
==========================================
+ Coverage 40.38% 40.66% +0.28%
==========================================
Files 38 36 -2
Lines 1263 1237 -26
==========================================
- Hits 510 503 -7
+ Misses 753 734 -19
Continue to review full report at Codecov.
|
|
When building from scratch just now, the Resize and Serialization examples give a |
|
I pushed a fix for the Resize and Serialization examples. It was because candela.js was not going through Babel. I'm ok with the OnSet error getting offloaded to another issue that we solve separately. |
jeffbaumes
left a comment
There was a problem hiding this comment.
This has been out there a while and its working to use this branch externally with a prototype Girder plugin, so LGTM.
|
Thanks Jeff. I notice that in addition to the undefined- |
candela/webpack.jsto aid in adding loaders and other peculiar-to-Candela configuration to a downstream project's Webpack configuration in a black-box waysrc/candelainto the top level of the repo - this makes it easier for downstreams to include Candela sources in their projects:instead of
TODO:
.npmignoreto restrict what gets published to NPM