Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
7a2c5399
R
rails
项目概览
张重言
/
rails
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rails
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
7a2c5399
编写于
5月 26, 2017
作者:
A
ash
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Do not show --webpack option in the plugin help message
上级
3beb5e53
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
5 addition
and
4 deletion
+5
-4
railties/lib/rails/generators/app_base.rb
railties/lib/rails/generators/app_base.rb
+0
-4
railties/lib/rails/generators/rails/app/app_generator.rb
railties/lib/rails/generators/rails/app/app_generator.rb
+5
-0
未找到文件。
railties/lib/rails/generators/app_base.rb
浏览文件 @
7a2c5399
...
...
@@ -13,7 +13,6 @@ class AppBase < Base # :nodoc:
DATABASES
=
%w( mysql postgresql sqlite3 oracle frontbase ibm_db sqlserver )
JDBC_DATABASES
=
%w( jdbcmysql jdbcsqlite3 jdbcpostgresql jdbc )
DATABASES
.
concat
(
JDBC_DATABASES
)
WEBPACKS
=
%w( react vue angular )
attr_accessor
:rails_template
add_shebang_option!
...
...
@@ -31,9 +30,6 @@ def self.add_shared_options_for(name)
class_option
:database
,
type: :string
,
aliases:
"-d"
,
default:
"sqlite3"
,
desc:
"Preconfigure for selected database (options:
#{
DATABASES
.
join
(
'/'
)
}
)"
class_option
:webpack
,
type: :string
,
default:
nil
,
desc:
"Preconfigure for app-like JavaScript with Webpack (options:
#{
WEBPACKS
.
join
(
'/'
)
}
)"
class_option
:skip_yarn
,
type: :boolean
,
default:
false
,
desc:
"Don't use Yarn for managing JavaScript dependencies"
...
...
railties/lib/rails/generators/rails/app/app_generator.rb
浏览文件 @
7a2c5399
...
...
@@ -205,6 +205,8 @@ module Generators
RESERVED_NAMES
=
%w[application destroy plugin runner test]
class
AppGenerator
<
AppBase
# :nodoc:
WEBPACKS
=
%w( react vue angular )
add_shared_options_for
"application"
# Add bin/rails options
...
...
@@ -217,6 +219,9 @@ class AppGenerator < AppBase # :nodoc:
class_option
:skip_bundle
,
type: :boolean
,
aliases:
"-B"
,
default:
false
,
desc:
"Don't run bundle install"
class_option
:webpack
,
type: :string
,
default:
nil
,
desc:
"Preconfigure for app-like JavaScript with Webpack (options:
#{
WEBPACKS
.
join
(
'/'
)
}
)"
def
initialize
(
*
args
)
super
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录