Skip to content

Commit

Permalink
Tons of improvements. Parity with current ember gem
Browse files Browse the repository at this point in the history
  • Loading branch information
Devin Torres committed Mar 30, 2012
1 parent 2789315 commit 5603f65
Show file tree
Hide file tree
Showing 18 changed files with 2,990 additions and 410 deletions.
10 changes: 9 additions & 1 deletion Assetfile
Expand Up @@ -100,6 +100,14 @@ input 'app' do
concat 'app.js'
end

match 'tests/**/*.js' do
filter LoaderFilter,
:module_id_generator => proc { |input|
input.path.sub(/^lib\//, "#{APPNAME}/").sub(/\.js$/, '')
}
concat 'app-tests.js'
end

match 'css/**/*.css' do
if ENV['RAKEP_MODE'] == 'production'
yui_css
Expand All @@ -122,4 +130,4 @@ input 'app' do
end
end

# vim: filetype=ruby
# vim: filetype=ruby
25 changes: 15 additions & 10 deletions Gemfile
@@ -1,14 +1,19 @@
source "http://rubygems.org"
source :rubygems

gem "rack"
gem "rack-rewrite"
# gem "rack-streaming-proxy"
gem 'colored'

gem "sass"
gem "compass"
gem 'guard'
gem 'guard-rake'

gem "uglifier"
gem "yui-compressor"
gem 'rack'
gem 'rack-rewrite'
# gem 'rack-streaming-proxy'

gem "rake-pipeline", :git => "https://github.com/livingsocial/rake-pipeline.git"
gem "rake-pipeline-web-filters", :git => "https://github.com/wycats/rake-pipeline-web-filters.git"
gem 'sass'
gem 'compass'

gem 'uglifier'
gem 'yui-compressor'

gem 'rake-pipeline', :git => 'https://github.com/livingsocial/rake-pipeline.git'
gem 'rake-pipeline-web-filters', :git => 'https://github.com/wycats/rake-pipeline-web-filters.git'
21 changes: 16 additions & 5 deletions Gemfile.lock
@@ -1,14 +1,14 @@
GIT
remote: https://github.com/livingsocial/rake-pipeline.git
revision: f71caeb1406dafd6af5ab8453db8c5ac53947c92
revision: b70ca6cad7655e58d13031f3e24df7dfc74f9030
specs:
rake-pipeline (0.6.0)
rake (~> 0.9.0)
thor

GIT
remote: https://github.com/wycats/rake-pipeline-web-filters.git
revision: e58b9d055de666f6ca972151c125ccfb997c1b1c
revision: ba0b8a00356b4c854930a8e849b5629d51ffd70f
specs:
rake-pipeline-web-filters (0.6.0)
rack
Expand All @@ -22,21 +22,29 @@ GEM
open4
Platform (0.4.0)
chunky_png (1.2.5)
compass (0.11.7)
colored (1.2)
compass (0.12.1)
chunky_png (~> 1.2)
fssm (>= 0.2.7)
sass (~> 3.1)
execjs (1.3.0)
multi_json (~> 1.0)
ffi (1.0.11)
fssm (0.2.8.1)
multi_json (1.1.0)
guard (1.0.1)
ffi (>= 0.5.0)
thor (~> 0.14.6)
guard-rake (0.0.5)
guard
rake
multi_json (1.2.0)
open4 (1.3.0)
rack (1.4.1)
rack-rewrite (1.2.1)
rake (0.9.2.2)
sass (3.1.15)
thor (0.14.6)
uglifier (1.2.3)
uglifier (1.2.4)
execjs (>= 0.3.0)
multi_json (>= 1.0.2)
yui-compressor (0.9.6)
Expand All @@ -46,7 +54,10 @@ PLATFORMS
ruby

DEPENDENCIES
colored
compass
guard
guard-rake
rack
rack-rewrite
rake-pipeline!
Expand Down
3 changes: 3 additions & 0 deletions Guardfile
@@ -0,0 +1,3 @@
guard :rake, :task => :test do
watch(%r{^app/.+\.js$})
end
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,4 +1,4 @@
Copyright (c) 2011 Interline Vacations, Inc.
Copyright (c) Your Name Here

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
Expand Down
16 changes: 8 additions & 8 deletions README.md
Expand Up @@ -17,14 +17,14 @@ App Structure
├── Gemfile - Package dependencies for rakep/rack
├── Gemfile.lock - Here be dragons: don't touch, always include
├── app - App specific code
   ├── css - App CSS or SCSS (.scss)
   ├── lib - App code, *modularized during build*
   ├── modules - Module code, *already modularized*
   ├── plugins - Plugins (e.g. jquery.jsonrpc.js)
   │ └── loader.js - JS module loader
   ├── static - Static files, never touched, copied over during build
   ├── templates - Handlebars templates, *modularized during build*
   └── vendor - Vendor code, *modularized during build*
├── css - App CSS or SCSS (.scss)
├── lib - App code, *modularized during build*
├── modules - Module code, *already modularized*
├── plugins - Plugins (e.g. jquery.jsonrpc.js)
│ └── loader.js - JS module loader
├── static - Static files, never touched, copied over during build
├── templates - Handlebars templates, *modularized during build*
└── vendor - Vendor code, *modularized during build*
├── assets - Built out asset files, minified in production
│ ├── app.css - Built out app CSS/SCSS
│ ├── loader.js - Built out JS module loader
Expand Down
29 changes: 29 additions & 0 deletions Rakefile
@@ -0,0 +1,29 @@
APPNAME = 'ember-skeleton'

require 'colored'
require 'rake-pipeline'

desc "Build #{APPNAME}"
task :build do
Rake::Pipeline::Project.new('Assetfile').invoke
end

desc "Run tests with PhantomJS"
task :test => :build do
unless system("which phantomjs > /dev/null 2>&1")
abort "PhantomJS is not installed. Download from http://phantomjs.org/"
end

cmd = "phantomjs tests/qunit/run-qunit.js \"file://#{File.dirname(__FILE__)}/tests/index.html\""

# Run the tests
puts "Running #{APPNAME} tests"
success = system(cmd)

if success
puts "Tests Passed".green
else
puts "Tests Failed".red
exit(1)
end
end

0 comments on commit 5603f65

Please sign in to comment.