Permalink
Browse files

Use new version of jbundle, now provides a dev server

  • Loading branch information...
1 parent 6fd0b63 commit c478cbbb7214a8b2df105e0fda995e42c5116deb @mloughran mloughran committed Jun 18, 2011
Showing with 10 additions and 48 deletions.
  1. +1 −1 Gemfile
  2. +7 −4 Gemfile.lock
  3. +2 −2 README.markdown
  4. +0 −41 devserver.rb
View
2 Gemfile
@@ -2,7 +2,7 @@
source "http://rubygems.org"
group :development do
- gem 'jbundle', "~> 0.0.8"
+ gem 'jbundle'
gem 'sinatra'
gem 'pusher'
gem 'aws-s3'
View
11 Gemfile.lock
@@ -6,25 +6,28 @@ GEM
mime-types
xml-simple
builder (2.1.2)
- closure-compiler (0.3.3)
+ closure-compiler (1.1.1)
crack (0.1.8)
httparty (0.6.1)
crack (= 0.1.8)
- jbundle (0.0.8)
+ jbundle (0.1.2)
closure-compiler
+ rack
+ thor
json (1.4.6)
mime-types (1.16)
pusher (0.6.0)
crack
json
ruby-hmac
signature
- rack (1.2.1)
+ rack (1.3.0)
ruby-hmac (0.4.0)
signature (0.1.1)
ruby-hmac
sinatra (1.0)
rack (>= 1.0)
+ thor (0.14.6)
xml-simple (1.0.12)
PLATFORMS
@@ -33,6 +36,6 @@ PLATFORMS
DEPENDENCIES
aws-s3
httparty
- jbundle (~> 0.0.8)
+ jbundle
pusher
sinatra
View
4 README.markdown
@@ -114,9 +114,9 @@ and create a local config file
mv config/config.yml.example config/config.yml # and edit
-Run a development server which serves bundled javascript from <http://localhost:4500/dev/version/pusher.js> so that you can edit files in /src freely.
+Run a development server which serves bundled javascript from <http://localhost:5555/pusher.js> so that you can edit files in /src freely.
- ruby devserver.rb
+ bundle exec jbundle server
In order to build the minified versions:
View
41 devserver.rb
@@ -1,41 +0,0 @@
-require 'rubygems'
-require 'bundler/setup'
-
-$:.unshift(File.expand_path('../lib', __FILE__))
-
-require 'jbundle'
-require 'sinatra'
-
-set :port, 4500
-
-use Rack::Static, :urls => ["/src", "/dist"], :root => File.expand_path("..", __FILE__)
-
-before do
- JBundle.config_from_file 'JFile'
-end
-
-helpers do
- def bundle(dep, mode)
- b = JBundle.build(dep + '.js')
- mode == nil ? b.src : b.min
- end
-end
-
-get '/dev/:version/WebSocketMain.swf' do
- content_type("application/x-shockwave-flash")
- File.read(File.expand_path("../src/web-socket-js/WebSocketMainInsecure.swf", __FILE__))
-end
-
-# == Catch all for:
-# /dev/:version/pusher.js
-# /dev/:version/pusher.min.js
-# /dev/:version/json2.js
-# /dev/:version/json2.min.js
-# /dev/:version/flashfallback.js
-# /dev/:version/flashfallback.min.js
-# Note: :version is not used but it's easier to have it so it's consistent with production asset URLs
-#
-get %r{/dev/([\w\d\.]+)/([\d\w]+)(\.min)?} do |version, dep, mode|
- content_type('application/javascript')
- bundle dep, mode
-end

0 comments on commit c478cbb

Please sign in to comment.