coronate 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/README.md +6 -7
- data/lib/coronate/cli.rb +9 -2
- data/lib/coronate/templates/build.settings.tt +1 -1
- data/lib/coronate/templates/config.tt +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YzgyNzg4MDRiNzkyMDc3ZjYwNGFmNWMyNWU0MDI5OWQ3Zjk3YzVjYw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NGQ3YzllNmQxYjNkMDA5OGEwNWFlNzZmZDNmZjgzMDc0YWNhNDdlMQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NWNjNmQ0MWU3Y2NmMmVkNjU2MDdhOTZkMmQwMmU1YTllMWZiNTg3YjVlNzdm
|
10
|
+
MTBkMzNlZDdlN2RiNGFlZmU1YmFiZTBhZDUxZWVjNWYyNWNlNDVmMThlZDYz
|
11
|
+
NmNkNDVhNjhhZGNhYmE5ODY4M2EwYWE0NWFiMmE2MmYwZGYxMzc=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZDRhNTMzNDU1ODAzMzNiMGY4NjcyYzhmMGViNjUzYjliNmY5NWZlODNmYjUz
|
14
|
+
YWQzOTA4MmFiMWFjMTU0MWEyNmIxMDFmN2I3MjJiYTk1MTdkNDhhMTdmNjAw
|
15
|
+
NDE1NmI1MmMxM2RiODRlM2E3MTRjMjk0YmZhY2ExMTA1NTY2NDU=
|
data/README.md
CHANGED
@@ -10,16 +10,15 @@
|
|
10
10
|
$ coronate
|
11
11
|
Commands:
|
12
12
|
coronate help [COMMAND] # Describe available commands or one specific command
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
coronate project [NAME] # generate a corona project
|
14
|
+
coronate scene [NAME] # generate an scene
|
15
|
+
|
17
16
|
### Generate Corona Porject
|
18
17
|
|
19
|
-
$ cb project helloworld
|
20
|
-
|
18
|
+
$ cb project helloworld # default width=320 height=480 orientation=landscape
|
19
|
+
$ cb project helloworld -w 320 -h 568 --no-landscape # width=320 height=568 orientation=portrait
|
21
20
|
|
22
21
|
### Generate a scene file
|
23
22
|
|
24
|
-
$
|
23
|
+
$ coronate scene page1
|
25
24
|
|
data/lib/coronate/cli.rb
CHANGED
@@ -8,14 +8,21 @@ class CLI < Thor
|
|
8
8
|
File.dirname(__FILE__)
|
9
9
|
end
|
10
10
|
|
11
|
-
desc "scene", "generate an scene"
|
11
|
+
desc "scene [NAME]", "generate an scene"
|
12
12
|
def scene(name='scene1')
|
13
13
|
template 'templates/scene.tt', "#{name}.lua"
|
14
14
|
end
|
15
15
|
|
16
|
-
desc "project", "generate a corona project"
|
16
|
+
desc "project [NAME]", "generate a corona project"
|
17
|
+
|
18
|
+
method_option :width, :type => :numeric, :default => 320, :required => false, :aliases => "-w", :desc => "width"
|
19
|
+
method_option :height, :type => :numeric, :default => 480, :required => false, :aliases => "-h", :desc => "height"
|
20
|
+
method_option :landscape, :type => :boolean, :default => true, :required => false, :aliases => "-l", :desc => "landscape or not"
|
17
21
|
def project(name='project1')
|
18
22
|
empty_directory "#{name}/assets"
|
23
|
+
@width = options[:width]
|
24
|
+
@height = options[:height]
|
25
|
+
@orient = options[:orient] ? %{ "landscapeLeft", "landscapeRight" } : %{ "portrait", "portraitUpsideDown" }
|
19
26
|
template 'templates/main.tt', "#{name}/main.lua"
|
20
27
|
template 'templates/utils.tt', "#{name}/utils.lua"
|
21
28
|
template 'templates/titleScene.tt', "#{name}/titleScene.lua"
|