hyper-backend-roda 0.0.7 → 0.0.8

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
  SHA256:
3
- metadata.gz: 0cd9bc52929209476172104bb8601e5409eca8856ee856e7170293357ed5f97c
4
- data.tar.gz: 4038401652c1c8d949ab8a6ceb4a011a5647753b86a95472a44077809156cce2
3
+ metadata.gz: 4f29c2c8efbd1ad8e9538d6d6b92fde560c6f0aaa154ea7861a137bca2824f5d
4
+ data.tar.gz: 8806a39cdc5c6fac351ebedfae37dca782944b0ef72a81306e75c31668bfe570
5
5
  SHA512:
6
- metadata.gz: 255d3ab9bb86ec75dbdc1ec992b02dc97ec4915fb97221c4bc744c377c32308a5fc3c6e9d67ce4e9ad4cd8134be91cef0af1fcd4f54e089fd5d050200bb9de55
7
- data.tar.gz: b274f36b728933cac3f91a70ef0fc4d2ee16154c8f9d4827f16038dcd85655e770fa1257e08d4aef827f84c47f855caebab11d983ecdc672c7c3c72079a37358
6
+ metadata.gz: f88aae59824c557a1574870f10d2120f3cc9240f8a1712f54987f24b0038885d2662e3dceb4e7ac328444e649b017021893cdae3d661a277cac054309742f2c5
7
+ data.tar.gz: bb42dbdd5e035acfab470451675ff7d5f75ee5fd292ec9d0fce060edc8d6c7cd79a03440673d21399fb4d436ba6e64fb343a7e42a7ab7830442d458dceddd44d
@@ -12,16 +12,16 @@ cordova = ARGV[1] == 'cordova'
12
12
  # react_native = ARGV[1] == 'react-native'
13
13
 
14
14
  # helper methods
15
- def mkdir(dir_name)
15
+ def makedir(dir_name)
16
16
  if Dir.exist?(dir_name)
17
17
  puts "Directory #{dir_name} exists, very nice."
18
18
  else
19
19
  puts "Creating directory: #{dir_name}"
20
- Dir.mkdir(dir_name)
20
+ Dir.makedir(dir_name)
21
21
  end
22
22
  end
23
23
 
24
- def copy(filename, source_dir, target_dir)
24
+ def confcopy(filename, source_dir, target_dir)
25
25
  target_path = File.join(target_dir, filename)
26
26
  source_path = File.join(File.dirname(__FILE__),'..', source_dir, filename)
27
27
  if File.exist?(target_path)
@@ -34,6 +34,7 @@ end
34
34
 
35
35
  def package_json
36
36
  if File.exist?('package.json')
37
+ puts "Merging new config with existing one."
37
38
  # read existing package.json
38
39
  target = JSON.parse(File.read('package.json'))
39
40
  # read wanted config
@@ -43,7 +44,7 @@ def package_json
43
44
  # write
44
45
  File.write('package.json', JSON.pretty_generate(target, indent: ' ', object_nl: "\n", array_nl: "\n"))
45
46
  else
46
- copy('package.json', 'config', '.')
47
+ confcopy('package.json', 'config', '.')
47
48
  end
48
49
  end
49
50
 
@@ -101,29 +102,29 @@ def gemfile
101
102
  end
102
103
 
103
104
  # create directories for configuration and code
104
- mkdir('assets')
105
- mkdir('assets/stylesheets')
106
- mkdir('public')
107
- mkdir('webpack')
108
- mkdir('hyperloop')
109
- mkdir('hyperloop/components')
110
- mkdir('hyperloop/models')
111
- mkdir('hyperloop/stores')
105
+ makedir('assets')
106
+ makedir('assets/stylesheets')
107
+ makedir('public')
108
+ makedir('webpack')
109
+ makedir('hyperloop')
110
+ makedir('hyperloop/components')
111
+ makedir('hyperloop/models')
112
+ makedir('hyperloop/stores')
112
113
  puts
113
114
  puts 'Webpack config:'
114
- copy('production.js', 'config/webpack', 'webpack')
115
- copy('development.js', 'config/webpack', 'webpack')
116
- copy('test.js', 'config/webpack', 'webpack')
117
- copy('cordova.js', 'config/webpack', 'webpack') if cordova
118
- # copy('react-native.js', 'config/webpack', 'webpack') if react_native
115
+ confcopy('production.js', 'config/webpack', 'webpack')
116
+ confcopy('development.js', 'config/webpack', 'webpack')
117
+ confcopy('test.js', 'config/webpack', 'webpack')
118
+ confcopy('cordova.js', 'config/webpack', 'webpack') if cordova
119
+ # confcopy('react-native.js', 'config/webpack', 'webpack') if react_native
119
120
  puts
120
121
  puts 'Application entry points:'
121
- copy('app.js', 'config/entry', 'assets')
122
- copy('cordova.js', 'config/entry', 'assets') if cordova
123
- # copy('react-native.js', 'config/entry', 'assets') if react_native
122
+ confcopy('app.js', 'config/entry', 'assets')
123
+ confcopy('cordova.js', 'config/entry', 'assets') if cordova
124
+ # confcopy('react-native.js', 'config/entry', 'assets') if react_native
124
125
  puts
125
126
  puts 'Procfile:'
126
- copy('Procfile', 'config', '.')
127
+ confcopy('Procfile', 'config', '.')
127
128
  puts
128
129
  puts 'package.json:'
129
130
  package_json
@@ -132,7 +133,7 @@ puts 'Gemfile:'
132
133
  gemfile
133
134
  puts
134
135
  puts 'Hyperloop loader:'
135
- copy('hyperloop_webpack_loader.rb', 'config/hyperloop', 'hyperloop')
136
+ confcopy('hyperloop_webpack_loader.rb', 'config/hyperloop', 'hyperloop')
136
137
  puts
137
138
  puts 'Things to do:'
138
139
  puts 'Please run:'
@@ -1,3 +1,3 @@
1
1
  module HyperBackendRoda
2
- VERSION = '0.0.7'
2
+ VERSION = '0.0.8'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hyper-backend-roda
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Biedermann