README.md in motion-prime-0.2.1 vs README.md in motion-prime-0.3.0
- old
+ new
@@ -9,50 +9,47 @@
## Getting Started
### 1. Create MotionPrime project:
- $ motion create --template=git@github.com:droidlabs/motion-prime.git myapp
+ $ prime new myapp
-### 2. Install gems
+### 2. Setup application
- $ bundle
-
-### 3. Setup application
-
# edit Rakefile
-### 4. Run application
+### 3. Run application
$ rake
## Hello World (Sample)
+
```ruby
# app/app_delegate.rb
- class AppDelegate < MotionPrime::BaseAppDelegate
+ class AppDelegate < Prime::BaseAppDelegate
def on_load(app, options)
open_root_screen MainScreen.new
end
end
# app/screens/main_screen.rb
- class MainScreen < ApplicationScreen
+ class MainScreen < Prime::BaseScreen
title 'Main screen'
def render
@main_section = MyProfileSection.new(model: User.first)
@main_section.render(to: self)
end
end
# app/sections/my_profile.rb
- class MyProfileSection < MotionPrime::BaseSection
+ class MyProfileSection < Prime::BaseSection
element :title, text: "Hello World"
element :avatar, image: "images/avatar.png", type: :image
end
# app/styles/my_profile.rb
- MotionPrime::Styles.define :my_profile do
+ Prime::Styles.define :my_profile do
style :title,
width: 300, height: 20, color: :black,
top: 10, left: 5, background_color: :white
style :avatar,