Class: Xmvc::Builder::Vendor
- Inherits:
-
Thor
- Object
- Thor
- Xmvc::Builder::Vendor
- Includes:
- Thor::Actions
- Defined in:
- lib/xmvc/builders/vendor.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
6 7 8 |
# File 'lib/xmvc/builders/vendor.rb', line 6 def self.source_root Xmvc.public_path end |
Instance Method Details
#app(environment) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/xmvc/builders/vendor.rb', line 11 def app(environment) pkgs = [] Xmvc.secretary.reset!({ :source_files => Xmvc::Config[:javascripts] }) filename = Xmvc.public_build_path(:js, "app", nil, "debug") create_file(filename, Xmvc.secretary.concatenation) pkgs << { :vendor => :host, :filename => filename, :source_files => Xmvc.secretary.preprocessor.source_files } end |
#build(spec, pkgs = []) ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/xmvc/builders/vendor.rb', line 30 def build(spec, pkgs=[]) if spec["dependencies"] spec["dependencies"].each do |vendor| each_vendor do |vspec| builder = Vendor.new([], {}) builder.invoke("build", [vspec, pkgs]) end end end Xmvc.secretary.reset!({ :source_files => spec["javascripts"] }) filename = Xmvc.public_build_path(:js, spec["name"], spec["version"], "debug") create_file(filename, Xmvc.secretary.concatenation) pkgs << { :vendor => spec, :filename => filename, :source_files => Xmvc.secretary.preprocessor.source_files } end |