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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c73bc49c1a774fc57b0c9d106af051b7f2a8bda5
4
- data.tar.gz: 3bd24fe745d33907c86aa1928bb086656eba2a14
3
+ metadata.gz: a3d2c392a2c8770db70caa24b770aa90f3e1df54
4
+ data.tar.gz: c4cbc9443eeda1d9fad9834d30b02e8a492d5cb4
5
5
  SHA512:
6
- metadata.gz: 308ad9d983e729cf74e8ba2f8ae71152f132d1b842f18cb0d3fc1b4d3d3c8ae5d10b5e70e855c31e6a610d5d042dd35efb91e037942ffdd878e77eb11175a76a
7
- data.tar.gz: 68f2f03b3a3fe0f33f94c2809f25dcbb96681d03b8fe01ab30182cf04b388308a4aea536536acf146acfbc29873534aec850402564fdb347b27519f6e6a3abda
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
- FileUtils.cp(src_dir.join('vue.config.js'), root.join('vue.config.js'))
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} #{@pm == :yarn ? '-- ' : ''}#{args}" if args.present?
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
@@ -1,5 +1,5 @@
1
1
  module VueCli
2
2
  module Rails
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vue_cli-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Chen