mirror of
https://github.com/zhigang1992/RubyMotion-PixateFreestyle.git
synced 2026-01-12 17:52:19 +08:00
add "pixate:init" task
This commit is contained in:
@@ -44,7 +44,7 @@ motion-pixate provides "style" method in REPL. You could change the stylesheet a
|
||||
(main)> style "button { background-color: red; corner-radius: 20pt; }"
|
||||
```
|
||||
|
||||
motion-pixate supports [Sass](http://sass-lang.com/) to generate the stylesheet. Create the `sass` directory and `default.scss` into the `sass` directory. `rake pixate:sass` command generates the stylesheet from `default.scss`.
|
||||
motion-pixate supports [Sass](http://sass-lang.com/) to generate the stylesheet. Create the `sass` directory and `default.scss` with the `rake pixate:init` command. Then, `rake pixate:sass` command generates the stylesheet from `default.scss`.
|
||||
|
||||
You could specify the Sass output style through `style` environment variable. For example,
|
||||
```
|
||||
|
||||
@@ -63,6 +63,21 @@ module Motion; module Project; class Config
|
||||
end; end; end
|
||||
|
||||
namespace 'pixate' do
|
||||
desc "Create initial stylesheet files"
|
||||
task :init do
|
||||
unless File.exist?("sass/default.scss")
|
||||
mkdir_p "sass"
|
||||
touch "sass/default.scss"
|
||||
App.info 'Create', 'sass/default.scss'
|
||||
end
|
||||
|
||||
unless File.exist?("resources/default.css")
|
||||
mkdir_p "resources"
|
||||
touch "resources/default.css"
|
||||
App.info 'Create', 'resources/default.css'
|
||||
end
|
||||
end
|
||||
|
||||
desc "Compile SCSS file"
|
||||
task :sass do
|
||||
unless File.exist?("sass/default.scss")
|
||||
|
||||
Reference in New Issue
Block a user