Removing bower?
Closed this issue · 2 comments
If we can require d3, rgbcolor and colorbrewer via npm, we could remove bower right?
This way we could remove:
<script type="text/javascript" src="./bower_components/d3/d3.js"></script>
<script type="text/javascript" src="./bower_components/rgb-color/rgb-color.js"></script>
from index.html
. And have it all nicely bundled in the /build/complexviewer.js
.
This is the situation with these libraries -
rgb-color is only used by the demo code for making a legend (code
contained in index.html, there is code for two types of legend - html or
SVG). The SVG demo code was added to index.html to help @julie-sullivan
https://github.com/julie-sullivan with #93.
Similarly, the line:
|<script type="text/javascript" src="./bower_components/d3/d3.js"></script>|
is only in index.html so that the code for the SVG legend has access to d3.
d3 and colorbrewer are already required via npm
(https://github.com/MICommunity/interaction-viewer/blob/master/src/controller/Controller.js#L14L15)
and should be nicely bundled into complexviewer.js.
However, it seems we still can't get rid of bower? If you run 'npm
start' before 'bower install' it results in following message:
Error: could not resolve dependency d3 : bower returns the module as
known but not found (did you forget to run bower install ?)
Maybe there is a way to access d3 more directly, without using bower?
(@joshkh?)
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
OK, bower removed