2016-11-15 72 views
0

tutorial for creating a Meteor app using Angular 2,你被要求在一个终端窗口中执行以下命令:文档的流星创建命令

meteor create --example angular2-boilerplate socially 

我一直无法找到解释了meteor create命令的各种选项的任何文件,这可以深入了解--example angular2-boilerplate参数正在做什么。我发现的最接近的是Meteor docs for the commandline,但这只提到--package选项,没有进一步的细节。

您能解释一下meteor create的所有选项,以及它们的工作原理吗?

+1

'meteor help create' – MasterAM

回答

2

流星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). 

(这是流星。5.0输出)