Class: ProjectGenerator
- Inherits:
-
Sprout::Generator::NamedBase
- Object
- Sprout::Generator::NamedBase
- ProjectGenerator
- Defined in:
- lib/sprout/generators/project/project_generator.rb
Overview
Generate a new ActionScript 2.0 Project This generator can be executed as follows:
sprout -n as2 SomeProject
Instance Method Summary collapse
-
#manifest ⇒ Object
:nodoc:.
Instance Method Details
#manifest ⇒ Object
:nodoc:
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/sprout/generators/project/project_generator.rb', line 9 def manifest record do |m| base = class_name m.directory base m.directory File.join(base, 'assets/skins', project_name + 'Skin') m.directory File.join(base, 'bin') m.directory File.join(base, 'lib') m.directory File.join(base, 'script') m.directory File.join(base, 'src') m.directory File.join(base, 'test') m.file 'ProjectSprouts.png', File.join(base, 'assets/skins', project_name + 'Skin', 'ProjectSprouts.png') m.template 'rakefile.rb', File.join(base, "rakefile.rb") m.template 'README.txt', File.join(base, "README.txt") m.template 'generate', generate_script_path, :chmod => 0755 m.template 'MainClass.as', File.join(base, 'src', "#{class_name}.as") m.template 'TestRunner.as', File.join(base, 'test', "#{class_name}Runner.as") end end |