Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed Rakefile to create public/.

  • Loading branch information...
commit a51f497d797631e75da54e43de3154372ff94a3f 1 parent 977892c
@psobot authored
Showing with 40 additions and 17 deletions.
  1. +6 −0 Gemfile
  2. +11 −16 Rakefile
  3. +22 −0 Readme.md
  4. +1 −1  source/index.haml
View
6 Gemfile
@@ -0,0 +1,6 @@
+source 'http://rubygems.org'
+
+gem 'coffee-script'
+gem 'haml'
+gem 'sass'
+gem 'bourbon'
View
27 Rakefile
@@ -1,11 +1,15 @@
require 'rubygems'
require 'coffee-script'
+require 'haml'
require 'sass'
require 'bourbon'
require 'fileutils'
-require 'haml'
-extensions = ['js', 'css', 'html', 'json', 'jpg', 'png']
+convert_extensions = %w(coffee haml sass)
+
+task :dir do
+ FileUtils.mkdir 'public'
+end
task :coffee do
Dir.glob "source/*.coffee" do |file|
@@ -32,10 +36,6 @@ task :sass do
Bourbon::Generator.new(['install']).run
end
- FileUtils.cd 'source' do
- Bourbon::Generator.new(['install']).run
- end
-
Dir.glob "source/*.sass" do |file|
print "Compiling #{file}..."
target = 'public/' + File.basename(file).split('.sass')[0] + '.css'
@@ -43,26 +43,21 @@ task :sass do
puts " done!"
end
- FileUtils.rm_rf 'source/bourbon'
- FileUtils.rm_rf '.sass-cache'
+ FileUtils.rm_rf %w(source/bourbon .sass-cache)
end
task :copy do
- extensions.each do |ext|
- Dir.glob "source/*.#{ext}" do |file|
+ Dir.glob "source/*.*" do |file|
+ unless File.directory?(file) or convert_extensions.include?(file.split('.')[-1])
FileUtils.cp file, 'public/' + File.basename(file)
end
end
end
task :clean do
- extensions.each do |ext|
- FileUtils.rm Dir.glob("public/*.#{ext}")
- end
- FileUtils.rm_rf 'source/bourbon'
- FileUtils.rm_rf '.sass-cache'
+ FileUtils.rm_rf %w(public/ source/bourbon .sass-cache)
end
-task :run => %w(coffee haml sass copy)
+task :run => %w(dir coffee haml sass copy)
task :fresh => %w(clean run)
task :default => :run
View
22 Readme.md
@@ -0,0 +1,22 @@
+# A Meal for Me #
+
+What should I make for dinner? *A Meal for Me* is a one-bite site, using the
+Punchfork API, that tries to answer that question. For more info, see [the
+blog post](http://petersobot.com/blog/a-site-for-dinner) or [visit the site
+itself](http://amealfor.me).
+
+## I want to build it! ##
+
+Cool, a user! Make sure you've got
+
+ git clone git@github.com:psobot/amealforme.git
+ cd amealforme
+ bundle install
+ rake
+
+If you're running [Pow](http://pow.cx), you can do this afterwards:
+
+ ln -s `pwd` ~/.pow/amealforme
+ open http://amealforme.dev
+
+Feel free to fork this project (no pun intended) and enjoy.
View
2  source/index.haml
@@ -42,4 +42,4 @@
%a{:href => "http://punchfork.com", :class => 'punchfork'}
%img{:src => 'punchfork.png', :title => "powered by Punchfork"}
%span
- 2012
+ %a{:href => "https://github.com/psobot/amealforme"} on github
Please sign in to comment.
Something went wrong with that request. Please try again.