I'm using Meteor 0.9.3, and I want to try to make some changes to a Meteor smart package. I'm using the package in my app already, let's call it: author:smartpackage.
First, I removed my reference to the published package:
meteor remove author:smartpackage
I've forked the repository on GitHub, and made a local clone in:
/somedir/meteor-smartpackage/
I've created a directory in my meteor app:
/meteor/myApp/packages
and created a symlink:
ln -s /somedir/meteor-smartpackage /meteor/myApp/packages/meteor-smartpackage
How do I now add this local package into my app? I've tried a variety of
meteor add xxxx
options, but I can't find the right command. Am I even close?
The steps you described look good to me, so maybe this is the symlink stuff which is messing around.
The proper way of maintaining private packages is to have a packages/
directory somewhere in your filesystem, let's say in ~/meteor/packages
, then you have to set a special environment variable that is called PACKAGE_DIRS
, which is looked up by the meteor command line tool to find local packages that reside out of official package repositories.
So let's set this environment variable in your .bashrc
and resource it :
echo "export PACKAGE_DIRS=$HOME/meteor/packages" >> ~/.bashrc;
. ~/.bashrc
Then assuming your forked package resides in ~/meteor/packages
, meteor add author:package
should work normally.
Update to saimeunt's answer, for Meteor 1.2+
I found that loading the local package requires leaving out the author when running meteor add
.
Loads Local Package
meteor add cocos2d-meteor
Loads Remote Package
meteor add jakelin:cocos2d-meteor
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With