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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ac25efc89736970d596cb10c3e7811ddc2426012
4
- data.tar.gz: 7bdff4ed0f1f55933fb7627e7556fbaaa032fd18
3
+ metadata.gz: 95f351ee5c768e9e7163c9197e0ba8e47b38208f
4
+ data.tar.gz: d6e17a9b092bed572f293fac1f6310c51eb3dd99
5
5
  SHA512:
6
- metadata.gz: 0361360589521dcf2d1da0c97d1845672cbabe9455bbcbb924aec2b5244de22e4eb1f5cbf739b0be1675d8987c004e540105a1193f561c7720fdfaedb3d4ee78
7
- data.tar.gz: 7ca3795e426640c71a9920a087f0018576a355b57f79f4bfddb245d3ea309c701689f6f13a597694e27b6c1ec32072ce283417851433996542ff60a3e89b1ead
6
+ metadata.gz: 8bce647103c00955a123953411574cdd81bd79f9c30a68d5d1a4cf5fce35e4385cffb00fda11e6a765714e0fc7de96da2ad4c8196bd33995c38c6a7c215af035
7
+ data.tar.gz: f359f826f80b92bbccbdd1b5843717cff13854b785800ffa490ab582a7e3efb7a68bffe336ab88d10eeed65fc42a48018e3db75fb4bb76eb922ad34f4e9e88e0
@@ -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
- raise "Please set config.destination" if @config.destination.nil?
36
- self.destination_root = @config.destination
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
@@ -1,3 +1,3 @@
1
1
  module HighFive
2
- VERSION = "0.3.10"
2
+ VERSION = "0.3.11"
3
3
  end
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: high_five
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.10
4
+ version: 0.3.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Samson