ror_generators 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/generators/ror_generators/new_generator.rb +8 -3
- data/lib/ror_generators/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f97e275974b99ac44bb312c93d90317043ec5de0
|
|
4
|
+
data.tar.gz: 821f047a16093431d1cab36a34a88171ba1fc635
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 198b25837f4645710a3693e218531721d86f77635b2ced5a3052b38b576751b383039e87364f732ec8f8cda70e9bb8a78989ef871c407d8f2960ea43df2a3053
|
|
7
|
+
data.tar.gz: c6293fcef1229243aabe6ae9be00293948b0090120071f952633ae6067391fb1d484eb7cacbdb546dfdaa0d6f1d1d7807b59cc57ea5297e0d57331cccf00477f
|
|
@@ -49,8 +49,8 @@ module RorGenerators
|
|
|
49
49
|
def copy_webpack_config
|
|
50
50
|
if dest_file_exists?("client/webpack.config.js")
|
|
51
51
|
inject_into_file "client/webpack.config.js", after: "'babel-polyfill',\n" do
|
|
52
|
-
"'./app/bundles/#{module_name}/startup/registration',\n"
|
|
53
|
-
end
|
|
52
|
+
"\t\t\t'./app/bundles/#{module_name}/startup/registration',\n"
|
|
53
|
+
end unless in_bundle?
|
|
54
54
|
else
|
|
55
55
|
template "client/webpack.config.js.erb", "client/webpack.config.js"
|
|
56
56
|
end
|
|
@@ -131,8 +131,13 @@ module RorGenerators
|
|
|
131
131
|
contents.gsub!(regexp, replacement)
|
|
132
132
|
File.open(client_package_json, "w+") { |f| f.puts contents }
|
|
133
133
|
end
|
|
134
|
+
|
|
135
|
+
def in_bundle?
|
|
136
|
+
File.readlines('client/webpack.config.js').find do |line|
|
|
137
|
+
line.match("'./app/bundles/#{module_name}/startup/registration',\n")
|
|
138
|
+
end
|
|
139
|
+
end
|
|
134
140
|
|
|
135
141
|
end
|
|
136
|
-
|
|
137
142
|
end
|
|
138
143
|
end
|