我将用于流星包管理器

时间:2023-01-24 07:39:32

I understand meteor has their own package manager under the covers (that way meteor deploy works to include the packages) but I'm looking for a package manager for meteor. By package manager, i'm looking for like bundler/gemfile (ruby) or maven/pom file (java).

据我所知,meteor有自己的软件包管理器(这样meteor部署可以包含软件包)但我正在寻找meteor的软件包管理器。通过包管理器,我正在寻找像bundler / gemfile(ruby)或maven / pom文件(java)。

Again I understand the meteor install works fine, but I want to define my own "private" packages as well as have a file to put the package declarations in so when I go to update I can do it easily.

我再次理解meteor安装工作正常,但我想定义我自己的“私有”软件包以及有一个文件来放置软件包声明,所以当我去更新时我可以轻松地做到。

I saw meteorite, but I also read where as of meteor 0.9.0 it is no longer needed.

我看到陨石,但我也读到了流星0.9.0的地方,不再需要了。

Thanks!

EDIT:

so for example, in ruby you have the bundler gem which has a gemfile. in the gemfile you put

所以例如,在ruby中你有一个拥有gemfile的bundler gem。在你放的gemfile中

source 'https://rubygems.org'
gem '<gem_name>','<gem_version>' 
gem '<gem_name>','<gem_version>'

and anytime you want to install all the dependencies on a new machine you just run bundle install and it installs the dependencies into the new machine.

并且只要你想在新机器上安装所有依赖项,你就可以运行bundle install,它会将依赖项安装到新机器上。

I want to do something similar in meteor. example: I have a meteor project that takes the karma and angular-meteor packages (as well as a couple private packages in a bitbucket repo).

我想在流星中做类似的事情。例如:我有一个流星项目,它采用业力和角度流星包(以及一个bitbucket repo中的几个私人包)。

so in a gemfile, it would look something like this

所以在gemfile中,它看起来像这样

source 'http://<atmosphere_url>'
package 'uringo:angular','0.8.8'
package 'sanjo:karma','1.5.1'

source 'https://<my_bit_bucket_repo'>'
package 'name:package1','0.0.1'
package 'name:package2','0.0.1'

and then I just need the command to run the package manager to install the different packages.

然后我只需要命令来运行包管理器来安装不同的包。

1 个解决方案

#1


It looks like I have to keep packages with the code. So in the top level directory, there's the package folder and all my internal packages for the project will need to live there. Then I just modify the .meteor/project file to include which packages I want in that build. Then when I launch meteor then even though there are many packages in my /packages folder, only the packages in the .meteor/project file will be included.

看起来我必须使用代码保存包。所以在*目录中,有一个包文件夹,项目的所有内部包都需要存在。然后我只修改.meteor / project文件以包含我在该构建中需要的包。然后当我启动meteor时,即使我的/ packages文件夹中有很多包,也只包含.meteor / project文件中的包。

In addition to the packages in the official Meteor release being used by your app, meteor list and meteor add also search the packages directory at the top of your app. You can also use the packages directory to break your app into subpackages for your convenience, or to test packages that you might want to publish. See Writing Packages. -- http://docs.meteor.com/#/full/usingpackages

除了应用程序使用的官方Meteor版本中的软件包之外,meteor list和meteor add还会搜索应用程序顶部的packages目录。您还可以使用packages目录将应用程序分解为子包以方便使用,或者测试您可能要发布的包。请参阅编写包。 - http://docs.meteor.com/#/full/usingpackages

so this means just because the package is included in the /packages directory within the project, doesn't mean the project is actually 'using' the package.

所以这意味着只是因为包被包含在项目的/ packages目录中,并不意味着项目实际上是“使用”包。

#1


It looks like I have to keep packages with the code. So in the top level directory, there's the package folder and all my internal packages for the project will need to live there. Then I just modify the .meteor/project file to include which packages I want in that build. Then when I launch meteor then even though there are many packages in my /packages folder, only the packages in the .meteor/project file will be included.

看起来我必须使用代码保存包。所以在*目录中,有一个包文件夹,项目的所有内部包都需要存在。然后我只修改.meteor / project文件以包含我在该构建中需要的包。然后当我启动meteor时,即使我的/ packages文件夹中有很多包,也只包含.meteor / project文件中的包。

In addition to the packages in the official Meteor release being used by your app, meteor list and meteor add also search the packages directory at the top of your app. You can also use the packages directory to break your app into subpackages for your convenience, or to test packages that you might want to publish. See Writing Packages. -- http://docs.meteor.com/#/full/usingpackages

除了应用程序使用的官方Meteor版本中的软件包之外,meteor list和meteor add还会搜索应用程序顶部的packages目录。您还可以使用packages目录将应用程序分解为子包以方便使用,或者测试您可能要发布的包。请参阅编写包。 - http://docs.meteor.com/#/full/usingpackages

so this means just because the package is included in the /packages directory within the project, doesn't mean the project is actually 'using' the package.

所以这意味着只是因为包被包含在项目的/ packages目录中,并不意味着项目实际上是“使用”包。