I'm trying to install Raphael.js in my project in the most modular way possible. Raphael has a registered bower component, so that seemed like my best best.
With some guidance from the Snap.svg readme (which did eventually allow me to install Snap), I've gotten the farthest with these steps (starting in my project root directory):
bower install raphael --save
cd dev/components/raphael/
npm install -g grunt-cli
cd dev/
npm install
grunt
The last step appears to begin to build the component, but fails immediately:
Running "build:dist" (build) task
Warning: Unable to read "../eve/eve.js" file (Error code: ENOENT). Use --force to continue.
Aborted due to warnings.
The error makes sense, since there is no eve.js
file at that path. I know that it's a dependency of Raphael, but where and how would I have installed that?
FWIW, I'm a bit green on bower & grunt, so I could just be missing a simple step. Unfortunately, an hour or two of experimenting and my best Google skills couldn't sort this out.
I think, bower install raphael
is enough. You don't need to build raphael, because bower already delivers the compiled raphael.js
and raphael-min.js
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.