rails命令行(如new,generate)的源位于哪里



我想知道我们何时运行rails new、rails generate等命令。实际执行了哪些文件。通常,对于其他工具,如rake、rspec(不确定它们是否被称为命令行工具(或任何其他类似的gem,哪些文件首先执行(在开始时(。谢谢

它们中的大多数都位于此文件夹中https://github.com/rails/rails/tree/3be590edbedab8ddcacdf72790d50c3cf9354434/railties/lib/rails/commands

例如https://github.com/rails/rails/blob/3be590edbedab8ddcacdf72790d50c3cf9354434/railties/lib/rails/commands/application/application_command.rb调用应用程序生成器https://github.com/rails/rails/blob/3be590edbedab8ddcacdf72790d50c3cf9354434/railties/lib/rails/generators/rails/app/app_generator.rb

最新更新