pyprism
pyprism

Reputation: 3008

how to create Meteor package

I read documentation about packaging https://atmosphere.meteor.com/wtf/package . And also watch the video https://eventedmind.com/feed/G6K5WCcxpt534yYrw .According to those I made package.js and smart.json file in package folder. Now my main problem is how to turn this simple example code below to reusable package ?

Meteor.methods({
    Tweets: function (key,url,method) {
    var key = key;
    var response = Meteor.http.call( method, url,
             { params: { appkey: key ,uid: "something" }});
    return response.content;
       }
    });

Here is my package.js file :

Package.describe({
    summary: "bla bla"
});

Package.on_use(function (api){
api.use(["http"],["server"]);

api.add_files("script.js","server");
});

and smart.json file:


    {

        "name": "Pacage name",
        "description": "description etc",
        "homepage":"http://example.com" ,
        "author" : "myname",
        "version" : "0.1",
        "packages": {}
        }

Upvotes: 2

Views: 599

Answers (1)

Łukasz Jagodziński
Łukasz Jagodziński

Reputation: 3089

If I understand you correctly, you want to create Meteorite package.

  1. First, you have to create Git repository e.g. on http://github.com
  2. Add git attribute in smart.json file with the link to the repository: { git: "https://github.com/yourlogin/repo.git" }
  3. Now, you have to register on atmosphere.meteor.com -> Sign in > Create account
  4. In terminal go to the package directory and write mrt release .

Should work

Upvotes: 3

Related Questions