try using minispade

This commit is contained in:
Sven Fuchs 2012-06-22 12:14:00 +02:00
parent c8246efab6
commit 23d74a53a7
29 changed files with 117 additions and 47 deletions

View File

@ -21,7 +21,12 @@ input 'assets/javascripts' do
end
match '**/*.hbs' do
handlebars
handlebars(
:key_name_proc => proc { |input|
input.path.sub(%r(^app/templates/), '').sub(/\.hbs$/, '')
}
)
concat 'app/templates.js'
end
match '{app,config,lib}/**/*.js' do
@ -29,10 +34,7 @@ input 'assets/javascripts' do
string: true,
rewrite_requires: true,
module_id_generator: proc { |input|
path = input.path.sub(%r(^(app|config|lib)/), '').sub(/\.js$/, '')
# path = input.path.sub(/\\.js$/, '')
p path
path
input.path.sub(%r(^(app|config|lib)/), '').sub(/\.js$/, '')
}
)
concat 'application.js'

12
Gemfile
View File

@ -1,4 +1,8 @@
gem 'rake-pipeline', github: 'livingsocial/rake-pipeline'
gem 'rake-pipeline-web-filters', github: 'wycats/rake-pipeline-web-filters'
gem 'coffee-script'
gem 'tilt'
group :assets do
gem 'rake-pipeline', github: 'livingsocial/rake-pipeline'
gem 'rake-pipeline-web-filters', github: 'wycats/rake-pipeline-web-filters'
gem 'coffee-script'
gem 'tilt'
gem 'guard'
end

View File

@ -22,9 +22,22 @@ GEM
coffee-script-source (1.3.3)
execjs (1.4.0)
multi_json (~> 1.0)
ffi (1.0.11)
guard (1.1.1)
listen (>= 0.4.2)
thor (>= 0.14.6)
listen (0.4.4)
rb-fchange (~> 0.0.5)
rb-fsevent (~> 0.9.1)
rb-inotify (~> 0.8.8)
multi_json (1.3.6)
rack (1.4.1)
rake (0.9.2.2)
rb-fchange (0.0.5)
ffi
rb-fsevent (0.9.1)
rb-inotify (0.8.8)
ffi (>= 0.5.0)
thor (0.15.2)
tilt (1.3.3)
@ -33,6 +46,7 @@ PLATFORMS
DEPENDENCIES
coffee-script
guard
rake-pipeline!
rake-pipeline-web-filters!
tilt

7
Guardfile Normal file
View File

@ -0,0 +1,7 @@
$: << 'lib'
guard 'assets' do
watch(%r(^AssetFile))
watch(%r(^assets))
end

View File

@ -1,17 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Travis CI - Distributed Continuous Integration Platform for the Open Source Community</title>
<link rel="stylesheet" href="stylesheets/application.css">
<script src="javascripts/vendor.js"></script>
<script src="javascripts/application.js"></script>
<script>
minispade.require('app')
</script>
</head>
<body>
<%= 'FOO' %>
</body>
</html>

View File

@ -1,13 +1,16 @@
require 'routes'
#= require_tree ./helpers
#= require_tree ./models
#= require_tree ./templates
#= require ./controllers.js
#= require ./views.js
#= require ./routes.js
#= require_self
@Travis = Em.Application.create()
Travis = window.Travis
require 'ext/jquery'
require 'locales'
require 'travis/data_store_adapter'
require 'helpers'
require 'models'
require 'views'
require 'templates'
require 'controllers'
require 'routes'
# Travis = window.Travis
Travis.store = DS.Store.extend(
revision: 4
adapter: Travis.FixtureAdapter.create()

View File

@ -0,0 +1,3 @@
require 'helpers/handlebars'
require 'helpers/helpers'
require 'helpers/urls'

View File

@ -1,3 +1,5 @@
require 'ext/ember/bound_helper'
safe = (string) ->
new Handlebars.SafeString(string)

View File

@ -0,0 +1,6 @@
require 'models/build'
require 'models/repository'
require 'models/commit'
require 'models/job'
require 'models/artifact'

View File

@ -1,3 +1,5 @@
require 'travis/model'
@Travis.Artifact = Travis.Model.extend
body: DS.attr('string')

View File

@ -1,3 +1,5 @@
require 'travis/model'
@Travis.Branch = Travis.Model.extend Travis.Helpers,
repository_id: DS.attr('number')
number: DS.attr('number')

View File

@ -1,3 +1,5 @@
require 'travis/model'
@Travis.Build = Travis.Model.extend
state: DS.attr('string')
number: DS.attr('number')

View File

@ -1,3 +1,5 @@
require 'travis/model'
@Travis.Commit = Travis.Model.extend
sha: DS.attr('string')
branch: DS.attr('string')

View File

@ -1,3 +1,5 @@
require 'travis/model'
@Travis.Job = Travis.Model.extend
repository_id: DS.attr('number')
build_id: DS.attr('number')

View File

@ -1,3 +1,5 @@
require 'travis/model'
@Travis.Repository = Travis.Model.extend
name: DS.attr('string')
owner: DS.attr('string')

View File

@ -1,3 +1,5 @@
require 'travis/model'
@Travis.ServiceHook = Travis.Model.extend
primaryKey: 'slug'
name: DS.attr('string')

View File

@ -1,3 +1,5 @@
require 'travis/model'
@Travis.WorkerGroup = Ember.ArrayProxy.extend
init: ->
@set('content', [])

View File

@ -1,4 +1,6 @@
Travis.Router = Em.Router.extend
require 'hax0rs'
@Travis.Router = Em.Router.extend
enableLogging: true
location: 'hash'

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,9 +0,0 @@
//= require_self
//= require ./vendor/ansiparse.js
//= require ./vendor/i18n.js
//= require ./vendor/jquery.timeago.js
//= require_tree ./config
//= require_tree ./lib
//= require app/app.js
Travis = Em.Application.create();

35
lib/guard/assets.rb Normal file
View File

@ -0,0 +1,35 @@
$stdout.sync = true
require 'guard'
require 'guard/guard'
module Guard
class Assets < Guard
def start
UI.info "Guard::Assets is running."
run
end
def run_all
run
end
def reload
run
end
def run_on_change(paths)
puts "change: #{paths.inspect}"
run
end
private
def run
system('bundle exec rakep')
end
end
end

View File

@ -11,7 +11,6 @@
</script>
</head>
<body>
FOO
</body>
</html>

File diff suppressed because one or more lines are too long