Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

remove things that add complexity

  • Loading branch information...
commit de99d74639853325e6fe955d478ed29847bcb2e5 1 parent d23d17e
Matt Hodgson authored
1  bin/spar
View
@@ -1,6 +1,5 @@
#!/usr/bin/env ruby
-require 'rubygems'
require 'rbconfig'
if RUBY_VERSION < '1.9.2'
33 lib/spar/cli.rb
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'
3  lib/spar/generators/templates/base/Gemfile
View
@@ -1,3 +0,0 @@
-source "http://rubygems.org"
-
-gem "spar"
11 lib/spar/generators/templates/base/Rakefile
View
@@ -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  lib/spar/generators/templates/base/config.ru
View
@@ -1,4 +1,3 @@
-require 'rubygems'
require 'bundler/setup'
Bundler.require if File.exists?('Gemfile')
5 spar.gemspec
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
Please sign in to comment.
Something went wrong with that request. Please try again.