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 +4 -4
- data/bin/roda-hyper-it-make +23 -22
- data/lib/hyper-backend-roda/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f29c2c8efbd1ad8e9538d6d6b92fde560c6f0aaa154ea7861a137bca2824f5d
|
4
|
+
data.tar.gz: 8806a39cdc5c6fac351ebedfae37dca782944b0ef72a81306e75c31668bfe570
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f88aae59824c557a1574870f10d2120f3cc9240f8a1712f54987f24b0038885d2662e3dceb4e7ac328444e649b017021893cdae3d661a277cac054309742f2c5
|
7
|
+
data.tar.gz: bb42dbdd5e035acfab470451675ff7d5f75ee5fd292ec9d0fce060edc8d6c7cd79a03440673d21399fb4d436ba6e64fb343a7e42a7ab7830442d458dceddd44d
|
data/bin/roda-hyper-it-make
CHANGED
@@ -12,16 +12,16 @@ cordova = ARGV[1] == 'cordova'
|
|
12
12
|
# react_native = ARGV[1] == 'react-native'
|
13
13
|
|
14
14
|
# helper methods
|
15
|
-
def
|
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.
|
20
|
+
Dir.makedir(dir_name)
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
|
-
def
|
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
|
-
|
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
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
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
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
#
|
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
|
-
|
122
|
-
|
123
|
-
#
|
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
|
-
|
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
|
-
|
136
|
+
confcopy('hyperloop_webpack_loader.rb', 'config/hyperloop', 'hyperloop')
|
136
137
|
puts
|
137
138
|
puts 'Things to do:'
|
138
139
|
puts 'Please run:'
|