In this post I am going to create a Meteor package for QuantumUI, a UI component library based on AngularJs and Bootstrap. QuatumUI has many stylish components which you can checkout on their demo page.
I created a folder to hold the package source and a meteor application to create and test the package.
mkdir src && cd src
Then I created a new application with the Meteor and AngularJs generator and selected the Bootstrap css library in the creation dialog
yo angular-meteor webApp
Next to create the package.
meteor create --package waynethompson:quantum-ui
If you look in the folder created you can see that it has created a skeleton package for you
quantum-ui | -- package.js | -- quantum-ui.js | -- quantum-ui-tests.js | -- README.md
you will notice that it automatically creates a test file and a dependency to the tiny test package.
Copy the QuantumUI code in to the package folder.
Now we want to test in the webApp project by changing directory to the webapp folder and creating a package folder. Then creating a link to the package folder and installing it into the webApp
mkdir -p packages ln -s ~/Documents/meteor/childCareNumbers/src/quantum-ui packages/quantum-ui meteor add quantum-ui
inside the package.js that was created you need to make sure that there is a reference to all of the files that you want to be in the package.
Once the package was tested and I was sure that it had everything it needed then it's time to publish it.
meteor publish --create