Reputation: 333
I am using a Meteor package called ryanswapp:fabricjs which is just a wrapper for the fabric.js library. Now I want to modify some of the files of the fabric.js library but can't work out how to do it.
I have done this successfully with other packages where I have cloned the git repository of the package into the /packages folder and then added the package with meteor add package:name
but with ryanswapp:fabricjs, it is just a few files (I guess because it is a wrapper).
I can clone the original git repo for fabric.js (https://github.com/kangax/fabric.js), but then doing a meteor add ryanswapp:fabricjs
doesn't utilise it.
Thanks
Upvotes: 0
Views: 38
Reputation: 7777
Further to @kooc's answer, you can clone the npm repository, and then use the npm link command to get your project to use your local copy of it. If you think your changes could be useful to others you can submit a pull request, or you could fork the repo and publish it under another name.
Upvotes: 1
Reputation: 146
Meteor wrapper packages are an artifact from when Meteor apps did not have easy access to npm packages. The wrapper package doesn't do any fancy wiring like pointing to a cloned github repo. It just takes a static version of the package code and packages it for Atmosphere, the Meteor package manager. Wrapper packages are no longer necessary since Meteor 1.3 -- apps can now install npm packages directly with npm install
.
However, if you're going to modify the fabric.js code, from their README it looks like that may all be irrelevant -- after you make your changes you'll have to build it locally and include the resulting file directly in your project.
Upvotes: 1