Permalink
Browse files

remove things that add complexity

  • Loading branch information...
1 parent d23d17e commit de99d74639853325e6fe955d478ed29847bcb2e5 Matt Hodgson committed Sep 24, 2012
View
@@ -1,6 +1,5 @@
#!/usr/bin/env ruby
-require 'rubygems'
require 'rbconfig'
if RUBY_VERSION < '1.9.2'
View
@@ -12,29 +12,24 @@ def self.source_root
File.expand_path('../../..', __FILE__)
end
- # desc 'build [asset1 asset2..]', 'Build project'
+ desc 'build [asset1 asset2..]', 'Build project'
- # method_option :target, :aliases => '-t', :desc => 'Directory to compile assets to'
-
- # def build(*assets)
- # target = Pathname(options[:target] || './public/assets')
+ method_option :target, :aliases => '-t', :desc => 'Directory to compile assets to'
- # if options[:compile]
- # Catapult.environment.js_compressor = Compressor::JS.new
- # Catapult.environment.css_compressor = Compressor::CSS.new
- # end
+ def build(*assets)
+ target = Pathname(options[:target] || './public')
- # say "Building: #{Catapult.root}"
+ say "Building: #{Spar.root}"
- # Catapult.environment.each_logical_path(assets) do |logical_path|
- # if asset = Catapult.environment.find_asset(logical_path)
- # filename = target.join(logical_path)
- # FileUtils.mkpath(filename.dirname)
- # say "Write asset: #{filename}"
- # asset.write_to(filename)
- # end
- # end
- # end
+ Spar.sprockets.each_logical_path(assets) do |logical_path|
+ if asset = Spar.sprockets.find_asset(logical_path)
+ filename = target.join(logical_path)
+ FileUtils.mkpath(filename.dirname)
+ say "Write asset: #{filename}"
+ asset.write_to(filename)
+ end
+ end
+ end
desc 'server', 'Serve spar application'
@@ -1,3 +0,0 @@
-source "http://rubygems.org"
-
-gem "spar"
@@ -1,8 +1,5 @@
-require 'bundler'
-Bundler.require
+require 'spar'
-task :environment do
- require './config/application'
-end
-
-require 'spar/tasks'
+task assets:precompile do
+ Spar.build()
+end
@@ -1,4 +1,3 @@
-require 'rubygems'
require 'bundler/setup'
Bundler.require if File.exists?('Gemfile')
View
@@ -6,10 +6,10 @@ Gem::Specification.new do |s|
s.name = "spar"
s.version = Spar::VERSION
s.authors = ["Matt Hodgson"]
- s.email = ["matt@boundlesslearning.com"]
+ s.email = ["matt@boundless.com"]
s.homepage = "http://github.com/BoundlessLearning/spar"
s.summary = %q{A simple framework for developing single page web apps with support for haml, sass, coffeescript, and pretty much anything else.}
- s.description = %q{Spar uses Sprockets and Sinatra to provide an asset development environment very similar to the asset pipeline found in Rails. It allows you to use all the awesome features of the asset pipeline without all the heft of Rails.}
+ s.description = %q{Spar uses Sprockets to provide an asset development environment very similar to the asset pipeline found in Rails. It allows you to use all the awesome features of the asset pipeline without all the heft of Rails.}
s.required_ruby_version = '>= 1.9.2'
@@ -42,5 +42,4 @@ Gem::Specification.new do |s|
s.add_dependency 'cloudfront-invalidator', '~> 0.2'
s.add_dependency 'rack-livereload'
s.add_dependency 'yui-compressor'
-
end

0 comments on commit de99d74

Please sign in to comment.