vue_cli-rails 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tasks/vue.rake +5 -2
- data/lib/vue_cli/rails/node_env.rb +3 -2
- data/lib/vue_cli/rails/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: a3d2c392a2c8770db70caa24b770aa90f3e1df54
|
4
|
+
data.tar.gz: c4cbc9443eeda1d9fad9834d30b02e8a492d5cb4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 32cf498f71dee9a13a68d91a748ca940e38de76d7e59501903ec60defc54866b3299d0d442c004e5478e00ff6e9c0146a2e8ea9ecfa35671876501ffc69336e5
|
7
|
+
data.tar.gz: 61c43a19b5aa1192943b140e4a9246d1080ba08ff29ac58c55fc1a47f08597c9cbf163a04316bcc29b9ebafcfea35519e300431c27b8e8b49e08796a97cf364b
|
data/lib/tasks/vue.rake
CHANGED
@@ -8,14 +8,17 @@ namespace :vue do
|
|
8
8
|
# generate config/vue.yml
|
9
9
|
FileUtils.chdir root
|
10
10
|
# `vue create .` and dependencies
|
11
|
-
pm.exec('vue create', "-n -m #{pm.package_manager} .")
|
11
|
+
pm.exec('vue create', '', "-n -m #{pm.package_manager} .")
|
12
12
|
pm.add '-D webpack-assets-manifest js-yaml'
|
13
13
|
FileUtils.rm_rf root.join('src')
|
14
14
|
|
15
15
|
# dirs under `app`
|
16
16
|
src_dir = Pathname.new(__FILE__).dirname.join('..', 'source')
|
17
17
|
FileUtils.cp_r(src_dir.join('app'), root)
|
18
|
-
|
18
|
+
binding.pry
|
19
|
+
Dir[src_dir.join('vue.*.js')].each do |fn|
|
20
|
+
FileUtils.cp(fn, "#{root}/")
|
21
|
+
end
|
19
22
|
|
20
23
|
yml = src_dir.join('vue.yml').read
|
21
24
|
yml = yml.sub('#PACKAGE_MANAGER', pm.package_manager.to_s)
|
@@ -33,7 +33,7 @@ module VueCli
|
|
33
33
|
@pm
|
34
34
|
end
|
35
35
|
|
36
|
-
def exec(command, args = nil)
|
36
|
+
def exec(command, args = nil, extra = nil)
|
37
37
|
cmd = COMMAND_LINE[command.to_sym] || {}
|
38
38
|
if @pm == :yarn && cmd[:yarn]
|
39
39
|
cmd = cmd[:yarn]
|
@@ -45,7 +45,8 @@ module VueCli
|
|
45
45
|
cmd = @pm == :yarn ? "yarn exec #{command}" : "npx #{command}"
|
46
46
|
end
|
47
47
|
|
48
|
-
cmd = "#{cmd} #{
|
48
|
+
cmd = "#{cmd} #{args}" if args.present?
|
49
|
+
cmd = "#{cmd} #{@pm == :yarn ? '-- ' : ''}#{extra}" if extra.present?
|
49
50
|
puts "run: #{cmd}"
|
50
51
|
system(cmd)
|
51
52
|
end
|