Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

file 51 lines (41 sloc) 1.182 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
require 'yaml'
CONFIG = YAML.load_file('config/config.yml')[(ENV['ENVIRONMENT'] || 'development').to_sym]
# JBundle configuration file
# https://github.com/ismasan/jbundle

target_dir './dist'

src_dir './src'

version '1.12.3'

bundle 'pusher.js' do
  license 'pusher-licence.js'
  file 'pusher.js'
  file 'pusher_event_dispatcher.js'
  file 'pusher_machine.js'
  file 'net_info.js'
  file 'pusher_connection.js'
  file 'pusher_channels.js'
  file 'pusher_authorizer.js'
  file 'dependencies.js'
end

bundle 'flashfallback.js' do
  license 'web-socket-js-licence.js'
  file 'web-socket-js/swfobject.js'
  file 'web-socket-js/web_socket.js'
end

file 'json2.js'

# Just copy this file across
file 'web-socket-js/WebSocketMainInsecure.swf' => 'WebSocketMain.swf'

# Runs for every bundle and license source.
filter do |src, config|
  src.gsub! /<VERSION>/, config.version.to_s
  src.gsub! /<CDN_HTTP>/, CONFIG[:js][:cdn][:http]
  src.gsub! /<CDN_HTTPS>/, CONFIG[:js][:cdn][:https]
  src
end

# some_dependency.js
filter :src do |src, config|
  src.gsub /<DEPENDENCY_SUFFIX>/, ''
end

# some_dependency.min.js
filter :min do |src, config|
  src.gsub /<DEPENDENCY_SUFFIX>/, '.min'
end
Something went wrong with that request. Please try again.