high_five 0.3.10 → 0.3.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/high_five/config.rb +1 -0
- data/lib/high_five/thor/tasks/deploy.rb +21 -3
- data/lib/high_five/version.rb +1 -1
- data/template/config/high_five.rb +7 -3
- 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: 95f351ee5c768e9e7163c9197e0ba8e47b38208f
|
4
|
+
data.tar.gz: d6e17a9b092bed572f293fac1f6310c51eb3dd99
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8bce647103c00955a123953411574cdd81bd79f9c30a68d5d1a4cf5fce35e4385cffb00fda11e6a765714e0fc7de96da2ad4c8196bd33995c38c6a7c215af035
|
7
|
+
data.tar.gz: f359f826f80b92bbccbdd1b5843717cff13854b785800ffa490ab582a7e3efb7a68bffe336ab88d10eeed65fc42a48018e3db75fb4bb76eb922ad34f4e9e88e0
|
data/lib/high_five/config.rb
CHANGED
@@ -38,6 +38,7 @@ module HighFive
|
|
38
38
|
:manifest, # generate html5 manifest
|
39
39
|
:app_name, # App Name
|
40
40
|
:app_id, # App id (com.tenforwardconsulting.myapp)
|
41
|
+
:cordova_path, # Path to cordova, runs cordova prepare after deploy
|
41
42
|
# config options below are used in the dist/build tasks
|
42
43
|
:android_manifest, # Path to the android manifest, relative to the project root
|
43
44
|
:ios_target # ios target to be used by dist tasks
|
@@ -31,9 +31,15 @@ module HighFive
|
|
31
31
|
self.source_paths << asset_path
|
32
32
|
end
|
33
33
|
|
34
|
-
|
35
|
-
|
36
|
-
|
34
|
+
if @config.destination.nil?
|
35
|
+
if @config.cordova_path.nil?
|
36
|
+
raise "Please set config.destination"
|
37
|
+
else
|
38
|
+
self.destination_root = "#{@config.cordova_path}/www"
|
39
|
+
end
|
40
|
+
else
|
41
|
+
self.destination_root = @config.destination
|
42
|
+
end
|
37
43
|
FileUtils.rm_rf(self.destination_root)
|
38
44
|
FileUtils.mkdir_p(self.destination_root)
|
39
45
|
|
@@ -169,6 +175,18 @@ module HighFive
|
|
169
175
|
say "Cloning to #{@config.dev_index}"
|
170
176
|
FileUtils.cp(File.join(self.destination_root, "index.html"), File.join(@config.root, @config.dev_index))
|
171
177
|
end
|
178
|
+
|
179
|
+
if (@config.cordova_path)
|
180
|
+
cordova_path = File.join(base_config.root, @config.cordova_path)
|
181
|
+
Dir.chdir cordova_path do
|
182
|
+
say "Running cordova prepare in #{Dir.pwd}"
|
183
|
+
if system("`npm bin`/cordova prepare")
|
184
|
+
say "Cordova prepare complete"
|
185
|
+
else
|
186
|
+
raise "Error running cordova prepare, aborting build"
|
187
|
+
end
|
188
|
+
end
|
189
|
+
end
|
172
190
|
end
|
173
191
|
|
174
192
|
private
|
data/lib/high_five/version.rb
CHANGED
@@ -3,7 +3,10 @@ HighFive::Config.configure do |config|
|
|
3
3
|
config.app_id = "com.example.app"
|
4
4
|
|
5
5
|
config.root = File.join(File.dirname(__FILE__), '..')
|
6
|
-
config.destination = "www"
|
6
|
+
# config.destination = "www"
|
7
|
+
|
8
|
+
# This will run cordova prepare in this directory. Will also default your platform destination to cordova/www
|
9
|
+
# config.cordova_path "cordova"
|
7
10
|
|
8
11
|
# Uncomment this if you're on windows and having problems with a strange ExecJS RuntimeError
|
9
12
|
# config.windows!
|
@@ -29,16 +32,17 @@ HighFive::Config.configure do |config|
|
|
29
32
|
|
30
33
|
# Configure plaform specific settings like this
|
31
34
|
config.platform :ios do |ios|
|
32
|
-
ios.destination = "www-ios"
|
35
|
+
# ios.destination = "www-ios"
|
33
36
|
# ios.assets "resources/ios"
|
34
37
|
end
|
35
38
|
|
36
39
|
config.platform :android do |android|
|
37
|
-
android.destination = "www-android"
|
40
|
+
# android.destination = "www-android"
|
38
41
|
# android.assets "resources/android"
|
39
42
|
end
|
40
43
|
|
41
44
|
config.platform :Web do |web|
|
45
|
+
web.destination = "www"
|
42
46
|
web.manifest = true #generate app cache manifest (production env only)
|
43
47
|
web.dev_index = "index-debug.html" #copy generated index.html to index-debug (development env only)
|
44
48
|
end
|