meteor create命令的文档



在使用Angular 2创建Meteor应用的教程中,你被要求在终端窗口中执行以下命令:

meteor create --example angular2-boilerplate socially

我无法找到任何解释meteor create命令的各种选项的文档,这将深入了解--example angular2-boilerplate参数正在做什么。我发现最接近的是在流星文档中的命令行,但这只提到了--package选项,没有进一步的细节。

你能解释meteor create所有可用的选项,以及它们是如何工作的吗?

Meteor CLI工具包含自己的文档。

您可以使用meteor help(或更标准的meteor --helpmeteor -h)来获取通用命令列表。注意下面的一行

$ meteor help
Usage: meteor [--release <release>] [--help] <command> [args]
       meteor help <command>
       meteor [--version] [--arch]
With no arguments, 'meteor' runs the project in the current
directory in local development mode. You can run it from the root
directory of the project or from any subdirectory.
Use 'meteor create <path>' to create a new Meteor project.
Commands:
   run                [default] Run this project in local development mode.
   debug              Run the project, but suspend the server process for debugging.
   create             Create a new project.
...
   show               Show detailed information about a release or package.
See 'meteor help <command>' for details on a command.
因此,对于create命令的帮助,您应该输入:
$ meteor help create
Usage: meteor create [--release <release>] <path>
       meteor create [--release <release>] --example <example_name> [<path>]
       meteor create --list
       meteor create --package [<package_name>]
Make a subdirectory named <path> if it doesn't exist and create a new Meteor app
there. You can pass an absolute path, relative path, or '.' for the current
directory.
With the --package option, creates a Meteor package instead of an app. If you're
in an app, the package will go in the app's top-level 'packages' directory;
otherwise it will be created in the current directory.
The app will use the release of Meteor specified with the --release
option, or the latest available version if the option is not specified. (A
package created in an app, will be created using the application's version of
meteor and a package created outside a meteor app will use the latest release).
You can pass --example to start off with a copy of one of the Meteor
sample applications. Use --list to see the available examples. There are
currently no package examples.
Options:
  --package  Create a new meteor package instead of an app.
  --example  Example template to use.
  --list     Show list of available examples.

和示例列表:

$ meteor create --list
Available examples:
  clock: https://github.com/meteor/clock      
  leaderboard: https://github.com/meteor/leaderboard
  localmarket: https://github.com/meteor/localmarket
  simple-todos: https://github.com/meteor/simple-todos
  simple-todos-react: https://github.com/meteor/simple-todos-react
  simple-todos-angular: https://github.com/meteor/simple-todos-angular
  todos: https://github.com/meteor/todos      
  todos-react: https://github.com/meteor/todos#react
  angular2-boilerplate: https://github.com/bsliran/angular2-meteor-base
To create an example, simply git clone the relevant repository and branch (run
'meteor create --example <name>'  to see the full command).

(这是Meteor v1.4.2的输出)

meteor create <project>

--example angular2-boilerplate只是从这里拉代码https://github.com/Urigo/angular2-meteor-base而不是做一个骨架,标准流星应用

您的项目名称是socially

最新更新