谁知道为什么?
解决方法
从init和new命令的文档(http://www.ember-cli.com/#using-ember-cli):
ember new< project-name>描述:
“Creates a folder called
<project-name
> and generates an application structure for you.”
ember init描述:
“Generates an application structure for you in the current folder.”
可以在init和new命令的源代码(https://github.com/ember-cli/ember-cli/blob/18d377b264859548f41aba6c3ea2015b90978068/lib/commands/new.js和https://github.com/ember-cli/ember-cli/blob/18d377b264859548f41aba6c3ea2015b90978068/lib/commands/init.js)中找到更好的描述:
ember new< project-name>描述是:
“Creates a new folder and runs
ember init
in it.”
ember init描述是:
“Creates a new ember-cli project in the current folder.”
ember new< project-name>的相关部分.代码是:
return createAndStepIntoDirectory .run({ directoryName: packageName,dryRun: commandOptions.dryRun }) .then(initCommand.run.bind(initCommand,commandOptions,rawArgs)) .then(gitInit.run.bind(gitInit,rawArgs));
因此,新命令会创建并进入您传递给它的项目目录名,然后在该目录中运行init,从而生成所有的余烬.
请注意,ember new< project-name>命令还会为您创建一个git存储库(如果您在计算机上设置了git),但是ember init命令却没有.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。