Class: Soca::Plugins::Jim

Inherits:
Soca::Plugin show all
Defined in:
lib/soca/plugins/jim.rb

Instance Attribute Summary

Attributes inherited from Soca::Plugin

#options, #pusher

Instance Method Summary collapse

Methods inherited from Soca::Plugin

#app_dir, #config, #initialize, #logger, name, plugins

Constructor Details

This class inherits a constructor from Soca::Plugin

Instance Method Details

#before_buildObject



9
10
11
12
13
14
15
16
17
# File 'lib/soca/plugins/jim.rb', line 9

def before_build
  jimfile = File.join(app_dir, 'Jimfile')
  ::Jim.logger = logger
  logger.debug "bundling js"
  bundler = ::Jim::Bundler.new(File.read(jimfile), ::Jim::Index.new(app_dir))
  # set the base dir relative to the app
  bundler.bundle_dir = app_dir + bundler.bundle_dir
  bundler.bundle!
end